Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on circe - an IRC client for emacs.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/circe.e>
#           or at <http://angg.twu.net/e/circe.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.circe-elpa»			(to "circe-elpa")
# «.logging»			(to "logging")
# «.circe-git»			(to "circe-git")
# «.time-stamps»		(to "time-stamps")
# «.faces»			(to "faces")
# «.ee-circe-connect»		(to "ee-circe-connect")
# «.ee-circe-connect-server»	(to "ee-circe-connect-server")
# «.help-on-circe-support-for-eev»	(to "help-on-circe-support-for-eev")



https://www.emacswiki.org/emacs/Circe



#####
#
# circe from ELPA
# 2019aug26
#
#####

# «circe-elpa» (to ".circe-elpa")
# (find-angg ".emacs" "circe")
# (find-epackage 'circe)

;; (find-fline    "~/.emacs.d/elpa/circe-20190322.1242/")
(code-c-d "circe" "~/.emacs.d/elpa/circe-20190322.1242/")
;; (find-circefile "")
;; (find-elpafile "circe-readme.txt")

# (require 'circe)
# (find-efunction 'circe)

(circe (network-or-server &rest server-options)

> offby1: hey, thanks, I am using circe now, and I think that I just
    have to redefine irc-send-AUTHENTICATE to add logging to discover
    how to authenticate with SASL in a low-level way =)




#####
#
# Improvised logging (an attempt to understand SASL authentication)
# 2019aug26
#
#####

# «logging» (to ".logging")
# (find-circegrep "grep --color -nH -e irc-send *.el")
# (find-circegrep "grep --color -nH -e irc-send-AUTHENTICATE *.el")
# (find-efunctiondescr 'irc-send-raw)
# (find-efunction 'irc-send-raw)
# (find-circefile "irc.el" "To send commands to the server")

(defun o-log (str) 
  "Go to the end of /tmp/o and insert STR and a newline there."
  (save-window-excursion
    (find-file "/tmp/o")
    (goto-char (point-max))
    (insert str "\n"))
  str)

(defun irc-send-raw-o (conn line &optional flood-handling)
  "Like irc-send-raw but also writes LINE to /tmp/o."
  (o-log line)
  (irc-send-raw conn line flood-handling))

(defun irc-send-command-o (conn command &rest args)
  "Like irc-send-command but also writes LINE to /tmp/o."
  (irc-send-raw-o conn (apply #'irc--format-command command args)))

;; Original, without logging
(defun irc-send-JOIN (conn channel &optional key)
  "Join CHANNEL.
If KEY is given, use it to join the password-protected channel."
  (if key
      (irc-send-command conn "JOIN" channel key)
    (irc-send-command conn "JOIN" channel)))

;; Version with logging
(defun irc-send-JOIN (conn channel &optional key)
  "Join CHANNEL.
If KEY is given, use it to join the password-protected channel."
  (if key
      (irc-send-command-o conn "JOIN" channel key)
    (irc-send-command-o conn "JOIN" channel)))

;; Original, without logging
(defun irc-send-AUTHENTICATE (conn arg)
  "Send an AUTHENTICATE message with ARG.
See https://github.com/atheme/charybdis/blob/master/doc/sasl.txt
for details."
  (irc-send-command conn "AUTHENTICATE" arg))

;; Version with logging
(defun irc-send-AUTHENTICATE (conn arg)
  "Send an AUTHENTICATE message with ARG.
See https://github.com/atheme/charybdis/blob/master/doc/sasl.txt
for details."
  (irc-send-command-o conn "AUTHENTICATE" arg))

;; Original, without logging
(defun irc-send-CAP (conn &rest args)
  "Send a CAP message.
See https://tools.ietf.org/html/draft-mitchell-irc-capabilities-01
for details."
  (apply #'irc-send-command conn "CAP" args))

;; Version with logging
(defun irc-send-CAP (conn &rest args)
  "Send a CAP message.
See https://tools.ietf.org/html/draft-mitchell-irc-capabilities-01
for details."
  (apply #'irc-send-command-o conn "CAP" args))



;; (find-efunction 'irc-send-JOIN)
;;

(circe "Freenode")


CAP LS
CAP REQ :sasl extended-join
AUTHENTICATE PLAIN
AUTHENTICATE ZWRyeABlZHJ4AFNub2JvbDQ=
CAP END
JOIN #emacs-circe




;; (find-2a nil '(find-fline "/tmp/o" :end))
;; (o-log "foo")
;; (o-log (find-sh0 "date"))

;; (find-efunction 'irc-send-command)
;; (find-efunction 'irc-send-raw)
;; (find-efunction 'irc--format-command)
;; (find-efunction 'irc-send-JOIN)
;;










#####
#
# circe from the git repo
# 2019aug26
#
#####

# «circe-git» (to ".circe-git")
# (find-es "emacs" "circe")
# (find-es "irc" "SASL-circe")
# https://github.com/jorgenschaefer/circe
# https://www.emacswiki.org/emacs/JorgenSchaefer
# https://www.nongnu.org/circe/
# https://lists.nongnu.org/mailman/listinfo/circe-help
# https://lists.nongnu.org/archive/html/circe-help/2014-02/msg00001.html moved to github

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# rm -Rfv ~/usrc/circe/
cd      ~/usrc/
git clone https://github.com/jorgenschaefer/circe
cd      ~/usrc/circe/

git branch --list -a
git for-each-ref
PAGER=cat git log --oneline --graph --all -20

# (find-fline "~/usrc/")
# (find-fline "~/usrc/circe/")
# (find-gitk  "~/usrc/circe/")

# (code-c-d "circe" "~/usrc/circe/")
# (find-circefile "")
# (find-circegrep "grep --color -niRH -e sasl *")
# (find-circefile "README.md" "GnuTLS")
# (find-circefile "irc.el" "irc-send-AUTHENTICATE")
# (find-circefile "irc.el" "irc-send-AUTHENTICATE" "charybdis")
#   https://github.com/jorgenschaefer/circe/blob/master/irc.el
#     https://github.com/atheme/charybdis/blob/master/doc/sasl.txt
#     -> https://github.com/charybdis-ircd/charybdis/blob/master/doc/features/sasl.txt
#   https://github.com/jorgenschaefer/circe/issues/354 Bad link in ... irc-send-AUTHENTICATE

# (find-es "irc" "charybdis")

# (find-fline "~/LOGS/2019aug25.emacs" "<edrx> forcer:")
<edrx> forcer: hey, you around? there is a broken link at
       <https://github.com/jorgenschaefer/circe/blob/master/irc.el>...
       https://github.com/atheme/charybdis/blob/master/doc/sasl.txt
       should be replaced by
       https://github.com/charybdis-ircd/charybdis/blob/master/doc/features/sasl.txt
       (I think)




#####
#
# time-stamps
# 2019aug26
#
#####

# «time-stamps» (to ".time-stamps")
# (find-es "emacs" "intangible")
# (find-circegrep "grep --color -niH -e stamp *.el")
# (find-efunction 'lui-time-stamp)
# (find-efunction 'lui-time-stamp "intangible")



#####
#
# faces
# 2019aug26
#
#####

# «faces» (to ".faces")
# (find-efaces "\ncirce-server-face ")




#####
#
# ee-circe-connect
# 2019aug31
#
#####

# «ee-circe-connect» (to ".ee-circe-connect")
# (find-circegrep "grep --color -nH -e connect *.el")
# (find-eev "eev-rcirc.el" "low-level")



#####
#
# Help on adding circe support to eev
# 2019aug31
#
#####

# «help-on-circe-support-for-eev» (to ".help-on-circe-support-for-eev")
# https://github.com/jorgenschaefer/circe/issues/355

Help on adding circe support to eev

Is it ok to ask for help here?

I am trying to add circe support to eev. Eev already has support for
rcirc - tersely described here:
http://angg.twu.net/eev-intros/find-rcirc-intro.html - and I've been
using it successfully in workshops, but in some situations rcirc
doesn't work because it doesn't have SASL authentication... I think
that the best solution would be to add circe support to eev now, and
then work with the rcirc maintainers over the next months to add SASL
authentication to it.

I only need help to create the functions with the skeletons below. I
spent the last hours reading circe.el, and I didn't see any _elegant_
way of testing if we're already connected to Freenode and reusing the
existing connection instead of creating a second one...

(defun ee-circe-connect-server (irc-network-or-server)
  "Connect to IRC-NETWORK-OR-SERVER, or reuse an existing connection.
Return the buffer name of the server buffer."
  )

(defun ee-circe-connect-channel (irc-network-or-server channel)
  "Connect to the channel CHANNEL in IRC-NETWORK-OR-SERVER.
Reuse an existing connection if possible. CHANNEL should be a
string like \"#emacs\" for a standard channel or like \"fsbot\"
for a query channel. This function returns the buffer name of the
channel buffer."
  )





#####
#
# ee-circe-connect-server
# 2019aug31
#
#####

# «ee-circe-connect-server» (to ".ee-circe-connect-server")
# (find-efunction 'circe)
# (find-efunction 'circe--server-generate-buffer)
# (find-circefile "circe.el" "(defun circe-command-QUERY")
# https://github.com/jorgenschaefer/circe/wiki/Commands

(circe "Freenode")





Return the buffer name
of the server buffer.






#  Local Variables:
#  coding:               utf-8-unix
#  ee-anchor-format:     "«%s»"
#  modes:  (fundamental-mode emacs-lisp-mode)
#  End: