Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
####### # # E-scripts on rcirc. # # 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/rcirc.e> # or at <http://angg.twu.net/e/rcirc.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/>. # ####### # «.eepitch-simple» (to "eepitch-simple") # «.eepitch-full» (to "eepitch-full") # «.wrapping» (to "wrapping") # «.low-priority» (to "low-priority") # «.defun-rcirc-command» (to "defun-rcirc-command") # «.buffer-local-variables» (to "buffer-local-variables") # «.listing-users» (to "listing-users") # «.ping-timeout» (to "ping-timeout") # «.rcirc-log-mode» (to "rcirc-log-mode") # «.rcirc-authinfo» (to "rcirc-authinfo") # «.tls» (to "tls") # «.SASL-low-level» (to "SASL-low-level") # «.SASL-email-1» (to "SASL-email-1") # «.rcirc-robots» (to "rcirc-robots") # «.msg» (to "msg") # «.query» (to "query") # «.rcirc-color» (to "rcirc-color") # «.rewrite-2019» (to "rewrite-2019") # «.libera-chat» (to "libera-chat") # «.header-line-format» (to "header-line-format") # «.rcirc-fill-column» (to "rcirc-fill-column") # «.deleted-20211017» (to "deleted-20211017") # «.email-2021oct12» (to "email-2021oct12") # «.revisions-in-emacs28» (to "revisions-in-emacs28") # «.bisection-2021oct12» (to "bisection-2021oct12") # «.fixes-20211017» (to "fixes-20211017") # «.squeeze-spaces» (to "squeeze-spaces") # «.mateus-santos-tls-ssl» (to "mateus-santos-tls-ssl") # «.oftc» (to "oftc") # «.rcirc-log-flag» (to "rcirc-log-flag") # «.propertize» (to "propertize") # (find-esgrep "grep -nH -e rcirc *.e") # (find-efile "net/rcirc.el") # (find-efile "net/rcirc.el" "rcirc-fill-flag") # (find-efile "net/rcirc.el" "header-line-format") # https://wikemacs.org/wiki/Rcirc ##### # # An eepitch script to connect to freenode (simple version) # 2011nov25 # ##### # «eepitch-simple» (to ".eepitch-simple") # (find-eev "eepitch.readme" "rcirc") ##### # # An eepitch script to connect to freenode (full version) # 2011nov25 # ##### # «eepitch-full» (to ".eepitch-full") # (find-eev "eepitch.readme" "rcirc") * (rcirc-defs) * (eepitch-freenode) /join #eev * (eepitch '(find-ebuffer "#eev@irc.freenode.net")) * (require 'rcirc) * (setq rcirc-authinfo '(("freenode" nickserv "edrx" "Blop"))) * (rcirc-track-minor-mode 1) * (setq rcirc-read-only-flag nil) * (setq rcirc-time-format "") * (setq rcirc-prompt "(%n) ") * (set-face-foreground 'rcirc-prompt "sienna") * (make-face 'rcirc-mode-line-nick) * (set-face-bold-p 'rcirc-mode-line-nick nil) * (set-face-foreground 'rcirc-mode-line-nick "sienna") * (make-face 'rcirc-track-nick) * (set-face-inverse-video-p 'rcirc-track-nick nil) * (set-face-foreground 'rcirc-track-nick "sienna") * (global-set-key [f2] 'rcirc-next-active-buffer) * * (eepitch-freenode) /msg NickServ identify Blop * (eepitch '(find-ebuffer "NickServ@irc.freenode.net")) /join #eev * (eepitch '(find-ebuffer "#eev@irc.freenode.net")) /join #org-mode /join #blocky /join #blocky ;; (setq rcirc-time-format "") ;; (find-ecolors) ;; (set-face-background 'rcirc-prompt-face bg) ;; (find-efunction 'rcirc) ;; (find-node "(rcirc)Top") ;; (find-efile "net/rcirc.el") ##### # # Line wrapping # 2011nov27 # ##### # «wrapping» (to ".wrapping") <edrx> (describe-variable 'rcirc-fill-flag) <edrx> (make-local-variable 'rcirc-fill-flag) <edrx> (setq rcirc-fill-flag nil) <edrx> my test: aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa aaaa *** sake JOIN *** sake QUIT Remote host closed the connection <edrx> I was going to ask someone else to also send a very long line to the channel to test, but my test failed 8-( - rcirc ran a "fill-paragraph" in what I sent above... what is the right way to disable filling on just one channel? # (find-fline "~/LOGS/2011nov30.eev" "larger fill-column") ##### # # Low-priority channels # 2013feb11 # ##### # «low-priority» (to ".low-priority") # (find-rcircnode "Channels") # (find-rcircnode "Channels" "low-priority channel") # (find-efunction 'rcirc-toggle-low-priority) ##### # # defun-rcirc-command # 2019apr14 # ##### # «defun-rcirc-command» (to ".defun-rcirc-command") # (find-efile "net/rcirc.el" "(defvar rcirc-client-commands" "defun-rcirc-command") # (find-efile "net/rcirc.el" "(defmacro defun-rcirc-command") # (find-efile "net/rcirc.el" "(defun-rcirc-command join") # (find-efile "net/rcirc.el" "(defvar rcirc-mode-map") # (find-efile "net/rcirc.el" "(defvar rcirc-mode-map" "'rcirc-cmd-join") # (find-epp rcirc-client-commands) ##### # # buffer-local-variables # 2019apr14 # ##### # «buffer-local-variables» (to ".buffer-local-variables") # (find-es "emacs" "buffer-local") Run this in an rcirc buffer: (find-epp (buffer-local-variables)) ##### # # Listing all users in a channel with "/who #channel" # 2019apr27 # ##### # «listing-users» (to ".listing-users") # (find-rcircnode "") # http://www.irchelp.org/ # https://www.livinginternet.com/r/ru_who.htm # (find-efile "net/rcirc.el" "/who") # http://www.irchelp.org/misc/ccosmos.html ##### # # ping-timeout # 2019jun11 # ##### # «ping-timeout» (to ".ping-timeout") # (find-efile "net/rcirc.el" "rcirc-timeout-seconds") # (find-elgrep "zgrep --color -nH -e keepalive net/rcirc.el.gz") (find-efile "net/rcirc.el" "rcirc-timeout-seconds") (find-elgrep "zgrep --color -nH -e keepalive net/rcirc.el.gz") ##### # # rcirc-log-mode # 2019aug11 # ##### # «rcirc-log-mode» (to ".rcirc-log-mode") # (find-node "(rcirc)Top") # (find-efile "net/rcirc.el") # https://mail.google.com/mail/ca/u/0/#sent/KtbxLvhRbdVXqkWsFfpfmpDTbxGZZhTdfg # rcirc-log-mode.el? Hi rcy, I have lots of files with logs of rcirc chats, with names like "~/LOGS/2019aug11.emacs", where what comes after the "." is the channel name... Are you aware of some kind of "rcirc-log-mode.el" that is able to fontify these log files with the colors used in active rcirc buffers, even if in a simplified way? Btw, I use this to save these logs: (defun save-buffer-keep-buffer-name (&rest args) "Like save-buffer, but doesn't changes the buffer name or the major mode." (interactive "p") (let ((bname (buffer-name)) (change-major-mode-with-file-name nil)) (save-excursion (apply 'save-buffer args)) (rename-buffer bname))) (define-key rcirc-mode-map (kbd "C-x C-s") 'save-buffer-keep-buffer-name) Thanks in advance! Cheers =), Eduardo Ochs http://angg.twu.net/#eev http://angg.twu.net/eev-intros/find-rcirc-intro.html ##### # # How rcirc authenticates using rcirc-authinfo - low-level view # 2019aug25 # ##### # «rcirc-authinfo» (to ".rcirc-authinfo") # (find-evardescr 'rcirc-authinfo) # (find-evariable 'rcirc-authinfo) # (find-rcircnode "Configuration" "rcirc-authinfo") # (find-rcircnode "Configuration" "rcirc-authinfo" "nickserv") # (find-ebuffer "*irc.freenode.net*") # (find-ebuffer "*irc.freenode.net*" "/msg NickServ") # (find-fline "~/LOGS/2019aug26.irc.freenode.net") # (find-fline "~/LOGS/2019aug26.irc.freenode.net" "/msg NickServ") -NickServ- This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>. ##### # # tls # 2019aug26 # ##### # «tls» (to ".tls") # (find-es "erc" "erc-ssl") # (find-efile "net/rcirc.el" "rcirc-server-alist") # (find-efile "net/rcirc.el" "rcirc-server-alist" "Don't use the TLS port by default") # (find-efile "net/rcirc.el" "rcirc-server-alist" "`:encryption'") # (find-efunction 'rcirc-connect) # (find-efunction 'rcirc-connect "open-network-stream") # (find-efunction 'rcirc-connect "open-network-stream" "encryption") # (find-elnode "Index" "* open-network-stream:") # (find-elnode "Network" "Transport Layer Security") (setq rcirc-server-alist '(("irc.freenode.net" :channels ("#rcirc") ;; :port 7000 :port 6697 ; circe uses this :encryption tls )) (rcirc-connect "irc.freenode.net") ;; (defun rcirc-connect (server &optional port nick user-name ;; full-name startup-channels password encryption) # (find-efunction 'find-libera) # (find-efunction 'find-rcirc-buffer) # (find-efunction 'ee-rcirc-connect) # (find-efunctiondescr 'rcirc-connect) (rcirc-connect SERVER &optional PORT NICK USER-NAME FULL-NAME STARTUP-CHANNELS PASSWORD ENCRYPTION SERVER-ALIAS) (defun ee-rcirc-connect (server channels) "If we are not already connected to the irc server SERVER then connect to it and join the channels CHANNELS." (if (not (ee-rcirc-connected server)) (rcirc-connect server nil nil nil nil (ee-split channels)))) (defun ee-rcirc-connect (server channels) "If we are not already connected to the irc server SERVER then connect to it and join the channels CHANNELS." (if (not (ee-rcirc-connected server)) (rcirc-connect server nil nil nil nil (ee-split channels)))) ##### # # SASL-low-level # 2019aug26 # ##### # «SASL-low-level» (to ".SASL-low-level") # (find-fline "~/LOGS/2019aug25.freenode" "Format is username:password") ##### # # My (first) e-mail to rcy and deniz about adding SASL to rcirc # 2019aug26 # ##### # «SASL-email-1» (to ".SASL-email-1") # https://mail.google.com/mail/ca/u/0/#sent/FFNDWMGdpGhdhzrQVGVqXsmlzMNvPLbh SASL authentication for rcirc Hi Rcy and Deniz, are you still maintaining rcirc? I am trying to add SASL authentication to it and I feel that I am halfway there... Here is the full story. I am again working a lot on a package that I wrote ages ago - eev; I called it "my project to save the world" for many years - and now it has become quite beginner-friendly and I proposed to the campus where I work a project in which I'll be in the library for some hours every week teaching Emacs/eev/rcirc/etc to beginners... eev has some support for rcirc, and I used it in a minicourse about LaTeX and Emacs that I gave. See: http://angg.twu.net/eev-intros/find-rcirc-intro.html Anyways. The campus looks like this: http://angg.twu.net/blergh.html and its internets look like the last picture - the one of the entrance of the campus in a rainy day - so sometimes I prefer to use 4G and cellphone tethering instead of the wifi of the campus. It turns out that when I connect to Freenode using tethering then Freenode considers that my IP is blacklisted or graylisted, and it requires SASL authentication. I added some logging hacks to Circe, and I discovered that the commands that Circe sends to the irc server to authenticate via SASL are like these: CAP LS CAP REQ :sasl extended-join AUTHENTICATE PLAIN AUTHENTICATE ZWRyeABlZHJ4AEZvb0Jhcg== CAP END JOIN #emacs-circe where the string after the second AUTHENTICATE is obtained by: (let ((username "edrx") (password "FooBar")) (base64-encode-string (format "%s\x00%s\x00%s" username username password))) My "executable notes" about SASL, circe and rcirc are full of eev-isms, but here is something easy to understand - my hack to log some circe commands... --snip--snip-- (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)) --snip--snip-- (setq circe-network-options '(("Freenode" :tls t :nick "edrx" :sasl-username "edrx" :sasl-password "FooBar" :channels ("#emacs-circe") ))) (circe "Freenode") --snip--snip-- Can we chat about the next steps, or discuss by e-mail? Or are you both too busy or whatevers? Should I just do everything by myself and then send you a(n ugly) port to rcirc of circe's SASL code? Cheers =) =) =), Eduardo Ochs http://angg.twu.net/#eev <neverwas> mplsCorwin: re ERC and SASL (14:35-ish). It seems SASL is an IRCv3 thing, which I've been looking into more broadly, perhaps with an eye toward contacting the maintainers (after studying up). What little intel I've gathered so far: https://gitlab.com/jpneverwas/erc-cap3/-/wikis/IRCv3-Notes https://gitlab.com/jpneverwas/erc-cap3/-/wikis/IRCv3-Notes https://www.emacswiki.org/emacs/ErcSASL ##### # # rcirc-robots # 2019aug26 # ##### # «rcirc-robots» (to ".rcirc-robots") # https://github.com/nicferrier/rcirc-robots ##### # # msg # 2019aug31 # ##### # «msg» (to ".msg") # (find-efunction-links 'rcirc-cmd-msg) # (find-egrep "zgrep --color -nH -e rcirc-handler- net/rcirc.el*") # (find-efile "net/rcirc.el" "C-c C-m" "rcirc-cmd-msg") # (find-efile "net/rcirc.el" "(defun-rcirc-command msg") ##### # # query # 2019aug31 # ##### # «query» (to ".query") # (find-evariable 'rcirc-mode-map "C-c C-q" "rcirc-cmd-query") # (find-efile "net/rcirc.el" "(defun-rcirc-command query") # (find-rcircnode "rcirc commands" "C-c C-q") # (find-rcircnode "rcirc commands" "C-c C-q" "Starts a one-to-one conversation") ##### # # rcirc-color # 2021feb27 # ##### # «rcirc-color» (to ".rcirc-color") # (find-epackage-links 'rcirc-color) # (find-epackage 'rcirc-color) # (code-c-d "rcirccolor" "~/.emacs.d/elpa/rcirc-color-0.4.2/") # (find-rcirccolorfile "") # (find-rcirccolorfile "rcirc-color.el") ##### # # rewrite-2019 # 2019aug31 # ##### # «rewrite-2019» (to ".rewrite-2019") # (find-eev "eev-rcirc.el") # (find-efunction 'rcirc-connect) (defun ee-rcirc-connect-server (server) (rcirc-connect server)) (ee-rcirc-connect-server "irc.freenode.net") ##### # # libera-chat # 2021may26 # ##### # «libera-chat» (to ".libera-chat") # https://en.wikipedia.org/wiki/Libera_Chat (ee-rcirc-connect-server "irc.freenode.net") (ee-rcirc-connect "irc.libera.chat" "") ##### # # header-line-format # 2021aug21 # ##### # «header-line-format» (to ".header-line-format") # (find-efunction 'rcirc-handler-ctcp-KEEPALIVE "header-line-format" "%f") # (find-elnode "Header Lines") # (find-efile "net/rcirc.el") # (find-efile "net/rcirc.el" "header-line-format") ##### # # rcirc-fill-column # 2021oct02 # ##### # «rcirc-fill-column» (to ".rcirc-fill-column") # (find-efile "net/rcirc.el" "rcirc-fill-column") # (find-efile "net/rcirc.el" "window-text-width") fill-column rcirc-fill-column (defun eejump-70 () (setq rcirc-fill-column nil)) (defun eejump-120 () (setq rcirc-fill-column 120)) ##### # # Rcirc-related code deleted from my .emacs in 20211017 # 2021oct17 # ##### # «deleted-20211017» (to ".deleted-20211017") ;; Fossils - for old rcircs only '( (make-face 'rcirc-special-modeline-face) (set-face-foreground 'rcirc-special-modeline-face "sienna") (defun rcirc-activity-string-for-buffer (b) "Return how the name of a buffer B looks in the mode-line string." (let ((s (rcirc-short-buffer-name b))) (with-current-buffer b (if (not (eq rcirc-activity-type 'nick)) s (rcirc-facify s 'rcirc-special-modeline-face))))) ;; (find-rcircfile "rcirc.el" "defun rcirc-update-activity-string") (defun rcirc-update-activity-string () "Update mode-line string." (setq rcirc-activity-string (if (not rcirc-activity) "" (concat " [" (mapconcat 'rcirc-activity-string-for-buffer rcirc-activity ",") "]")))) ) ;; Abbreviations for channel names ;; From ayrnieu - 2005aug05 ;; http://paste.lisp.org/display/10527 '( ;;; added to rcirc.el (defvar rcirc-abbreviated-channels nil "Alist of channels to specially abbreviate in the modeline. Each element looks like (CHANNEL . ABBREVIATION). E.g., ((\"#vectorprogramming\" . \"#vp\")).") ;;; modified in rcirc.el (defun rcirc-short-buffer-name (buffer) "Return a short name for BUFFER to use in the modeline indicator." (with-current-buffer buffer (let ((bn (or rcirc-target (process-name rcirc-process)))) (or (cdr (assoc bn rcirc-abbreviated-channels)) bn)))) ;;; added to ~/.emacs (add-to-list 'rcirc-abbreviated-channels '("#emacs-br" . "#eb")) (add-to-list 'rcirc-abbreviated-channels '("#opensolaris" . "#os")) ) (defun rcirc-steps () (interactive) (rcirc-defs) (find-angg ".emacs" "rcirc") (message "%S" (eesteps '( (rcirc-freenode) (rcirc-bitlbee) (switch-to-buffer "&bitlbee@im.bitlbee.org") ;; (eek0 "identify xxx\r") (eek0 (format "identify %s\r" (passwds-tcl-get "bitlbee"))) )))) (defun rcirc-freenode-old () (interactive) (rcirc "irc.freenode.net" 6667 "edrx" '("#debian-rj" "#eev" "#emacs" "#rcirc"))) ;; (find-node "(rcirc)Configuration") ;; (rcirc-freenode) ;; (find-efunction 'rcirc) ;; (find-efunction 'rcirc-connect) ;; (rcirc-connect server port nick user-name full-name startup-channels) ;; http://freenode.net/irc_servers.shtml ;; (find-rcircnode "Configuration") ;; (defun rcirc-freenode () (interactive) (rcirc-connect "irc.freenode.net" "6667" "edrx" "Eduardo Ochs <http://angg.twu.net/>" "Eduardo Ochs <http://angg.twu.net/>" '("#eev" ;; "#emacs" ;; "#lua" ;; "#forth" ;; "#agda" "#clojure" "#retro" ;; "##forth" "#coq" "#maxima" ;; "#forthcafe" "#tcl" ;; "#truta.org" "#omnisys" ;; "#rcirc" ;; "#fvwm" ;; "#ruby-lang" ;; "#debian-rj" ;; "#concatenative" "#debian-br" "#fvwm" "#gimp" ;; "#gnu-smalltalk" "#squeak" "#uclibc" "Txt2tags" ))) (defun rcirc-oftc () (interactive) (rcirc-connect "irc.oftc.net" "6667" "edrx" "Eduardo Ochs <http://angg.twu.net/>" "Eduardo Ochs <http://angg.twu.net/>" '("#swig" "#debian-eeepc"))) (defun rcirc-bitlbee () (interactive) (rcirc-connect "im.bitlbee.org" "6667" "edrx")) ;; (defun rcirc-defs () (interactive) ;; (require 'rcirc) ;; (global-set-key [f2] 'rcirc-next-active-buffer) ;; ;; (define-key rcirc-mode-map (kbd "C-c C-s") 'rcirc-save-buffer) ;; (define-key rcirc-mode-map (kbd "C-x C-s") 'save-buffer-keep-buffer-name) ;; (setq rcirc-time-format "") ;; (setq rcirc-read-only-flag nil) ;; (setq rcirc-user-full-name "Eduardo Ochs <http://angg.twu.net/>") ;; ;; (find-efunction 'rcirc) ;; ;; (find-efile "net/rcirc.el") ;; (setq rcirc-prompt "(%n) ") ;; ;; (find-ecolors) ;; ;; (set-face-background 'rcirc-prompt-face bg) ;; (rcirc-track-minor-mode 1) ;; new rcirc ;; (make-face 'rcirc-mode-line-nick) ;; (set-face-foreground 'rcirc-prompt "sienna") ;; new rcirc ;; (set-face-foreground 'rcirc-mode-line-nick "sienna") ;; new rcirc ;; (set-face-bold-p 'rcirc-mode-line-nick nil) ;; new rcirc ;; (setq rcirc-show-maximum-output nil) ;; (make-face 'rcirc-track-nick) ;; (set-face-foreground 'rcirc-track-nick "sienna") ;; (set-face-inverse-video-p 'rcirc-track-nick nil) ;; (make-face 'rcirc-nick-in-message-full-line) ;; (set-face-bold-p 'rcirc-nick-in-message-full-line nil) ;; ;; (progn (setq rcirc-prompt "<%n> ") (rcirc-set-prompt)) ;; ) ##### # # email-2021oct12 # 2021oct12 # ##### # «email-2021oct12» (to ".email-2021oct12") # https://mail.google.com/mail/ca/u/0/#sent/FFNDWNFVNFcRFwvFfpLtZcxJrFCZxVKh # "Tassilo Horn" <tsdh@gnu.org>, "Philip Kaludercic" <philipk@posteo.net> # https://ruzkuku.com/ Help with rcirc - eev-rcirc.el is currently broken Hi Philip and Tassilo, I am the author of a package called eev, that I often use in workshops to teach Emacs to beginners - I even use it in workshops about LaTeX, in which I have to pretend that Emacs is something secondary... So: eev contains a tutorial about using rcirc, and contains some functions for using rcirc "in the eev way" (whatever that means). The tutorial is here: http://angg.twu.net/eev-intros/find-rcirc-intro.html The tutorial and the functions were originally written when we all used Freenode and #emacs needed registration, so the participants of the workshop would first join #eev, learn the basics of how IRC works, and then would become registered users at Freenode. I updated eev-rcirc.el for Liberachat in may/2021, and it worked for some months, but recently it broke in several ways... My code is here, http://angg.twu.net/eev-current/eev-rcirc.el http://angg.twu.net/eev-current/eev-rcirc.el.html and the problem is that I wrote its low-level functions, that are here, http://angg.twu.net/eev-current/eev-rcirc.el.html#low-level http://angg.twu.net/eev-current/eepitch.el.html#ee-split-and-expand by just looking at the code of rcirc and chatting with rcyeske ages ago, and now I need to rewrite them in a more standard-ish way that will work on both on old rcircs and on new ones... What is the right place for discussing how to rewrite them? Do you meet on IRC sometimes? Can I join? Do you prefer that I use help-gnu-emacs, or another mailing list, or just send e-mails to both of you? Should I include someone else? Are you the right people? Etc etc? Thanks in advance! Eduardo Ochs http://angg.twu.net/#eev ##### # # revisions-in-emacs28 # 2021oct12 # ##### # «revisions-in-emacs28» (to ".revisions-in-emacs28") # (find-angg ".zshrc" "git-show-my") # (find-es "git" "git-bisect-by-hand") # (find-es "git" "git-bisect-by-hand" "oegsh") # (find-fline "/tmp/oegsh") # (find-fline "~/bigsrc/emacs28/lisp/net/") # (find-efile "net/") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) export PAGER=cat cd ~/bigsrc/emacs28/lisp/net/ git log --oneline rcirc.el |& tee /tmp/oglor # (find-fline "/tmp/oglor") cat > /tmp/oglor.lua <<'%%%' bigstr = ee_readfile "/tmp/oglor" for n,li in ipairs(splitlines(bigstr)) do local hash, descr = li:match("^([^ ]+) (.*)") printf("f %d %s \"%s\"\n", n, hash, descr:gsub("[\"`'!$\\]", ""):sub(1,60)) end %%% lua51 /tmp/oglor.lua lua51 /tmp/oglor.lua > /tmp/oglor3 # (find-fline "/tmp/oglor3") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/bigsrc/emacs28/lisp/net/ cd ~/bigsrc/emacs28 git show a1789fd67b:lisp/net/rcirc.el | head -n 60 cd ~/bigsrc/emacs28/ f () { DIR=$HOME/usrc/rcirc/$1 mkdir -p $DIR echo "$2 $3" > $DIR/README git show ${2}:lisp/net/rcirc.el > $DIR/rcirc.el } f 7 5ebad79e62 "Fix interactive forms for rcirc-define-command" set -v . /tmp/oglor3 set +v # (find-fline "~/usrc/rcirc/") # (find-fline "~/usrc/rcirc/7/") # (find-fline "/tmp/oglor3") # «bisection-2021oct12» (to ".bisection-2021oct12") good: (load "~/usrc/rcirc/100/rcirc.el") good: (load "~/usrc/rcirc/50/rcirc.el") good: (load "~/usrc/rcirc/37/rcirc.el") good: (load "~/usrc/rcirc/30/rcirc.el") good: (load "~/usrc/rcirc/27/rcirc.el") bad: (load "~/usrc/rcirc/26/rcirc.el") bad: (load "~/usrc/rcirc/25/rcirc.el") test: (find-libera-3a "#emacs") good: (find-fline "~/usrc/rcirc/27/") good: (find-fline "~/usrc/rcirc/27/README" "0034067f47") good: (find-fline "~/usrc/rcirc/27/rcirc.el") bad: (find-fline "~/usrc/rcirc/26/") bad: (find-fline "~/usrc/rcirc/26/README" "608b2ec9be") bad: (find-fline "~/usrc/rcirc/26/rcirc.el") (find-tkdiff "~/usrc/rcirc/27/rcirc.el" "~/usrc/rcirc/26/rcirc.el") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) export PAGER=cat cd ~/bigsrc/emacs28/ # This rcirc.el works for me: # 0034067f47 2021-07-28 13:42:05 Avoid cl-lib alias for cadadr and friends git-show-my 0034067f47 # This rcirc.el doesn't work: # 608b2ec9be 2021-09-05 1:39:52 Replace with-current-buffer with buffer-local-value where applicable git-show-my 608b2ec9be ##### # # fixes-20211017 # 2021oct17 # ##### # «fixes-20211017» (to ".fixes-20211017") # (find-angg "rcirc/README" "ee-rcirc-connected-bug") # (find-fline "~/LOGS/2021oct16.rcirc") # (find-eev "eev-rcirc.el") # (find-eev "eev-rcirc.el" "low-level") (ee-rcirc-process ee-libera-server) (ee-rcirc-connect ee-libera-server "#eev") (ee-rcirc-join-channels ee-libera-server "#eev #emacs") (find-rcirc-buffer0 ee-libera-server "#eev") (find-rcirc-buffer0 ee-libera-server "#emacs") ##### # # squeeze-spaces # 2021oct24 # ##### # «squeeze-spaces» (to ".squeeze-spaces") # (find-efile "net/rcirc.el" "squeeze spaces out of text") ##### # # Mateus Santos: TLS/SSL errors on erc and rcirc # 2021nov02 # ##### # «mateus-santos-tls-ssl» (to ".mateus-santos-tls-ssl") Opening connection.. [22:58] -*.joseon.kr- *** Looking up your ident... -*.joseon.kr- *** Looking up your hostname... -*.joseon.kr- *** You must use TLS/SSL and authenticate via SASL to connect to freenode please visit https://irc.com/login/sso in order to create an account. SASL Configuration: https://freenode.net/kb/answer/sasl - Webchat: https://webchat.freenode.net/ -*.joseon.kr- *** Could not resolve your hostname: Request timed out; <rico> Hello No target ERC> ##### # # oftc # 2023jan26 # ##### # «oftc» (to ".oftc") # Based on: (find-eev "eev-rcirc.el" "find-libera") (defvar ee-oftc-server "irc.oftc.net") (defvar ee-oftc-ichannels nil) (defvar ee-oftc-achannels nil) (defun find-oftc (&optional channel &rest pos-spec-list) (apply 'find-rcirc-buffer ee-oftc-server ee-oftc-ichannels ee-oftc-achannels channel pos-spec-list)) (defun find-oftc-2a (channel) (find-rcirc-buffer-2a ee-oftc-server ee-oftc-ichannels ee-oftc-achannels channel)) (defun find-oftc-3a (channel) (find-rcirc-buffer-3a ee-oftc-server ee-oftc-ichannels ee-oftc-achannels channel)) (defun lin2 () (interactive) (find-oftc-2a "#linode")) (defun lin3 () (interactive) (find-oftc-3a "#linode")) ##### # # rcirc-log-flag # 2024may12 # ##### # «rcirc-log-flag» (to ".rcirc-log-flag") # (find-evariable 'rcirc-log-flag) # (find-customizegroup 'rcirc) ##### # # propertize # 2024oct06 # ##### # «propertize» (to ".propertize") # (find-angg "LUA/ParseRcircLogs1.lua") ;; (ee-copy-rest-3m nil ";;-- end" "/tmp/a.el") (concat "<" (propertize "edrx" 'face 'rcirc-my-nick) ">" "<" (propertize "Lumie" 'face 'rcirc-other-nick) ">" ) ;; (load "/tmp/a.el") ;; (ee-read-file "/tmp/a.el") ;; (ee-read (ee-read-file "/tmp/a.el")) ;; (ee-eval (ee-read (ee-read-file "/tmp/a.el"))) ;; (find-estring (ee-eval (ee-read (ee-read-file "/tmp/a.el")))) ;;-- end https://www.domain.com/registration/?flow=domainDFE&search=anggtwu.net#/domainDFE/1 add-to-list (if (not (ee-rcirc-connected server)) (rcirc-connect server nil nil nil nil (ee-split channels)) (rcirc-join-channels (ee-rcirc-process server) (ee-split channels)))) (ee-rcirc-connect server (ee-split ichannels)) (ee-rcirc-join-channels server (ee-split (or achannels ichannels))) (ee-rcirc-join-channel server channel) (apply 'find-rcirc-buffer0 server channel pos-spec-list)) (defvar ee-libera-server "irc.libera.chat") (setq ee-libera-server "irc.libera.chat") (setq ee-libera-server "*irc.libera.chat*") # (find-rcirc-intro) # (find-eev "eev-rcirc.el" "low-level") # (find-eev "eev-rcirc.el" "find-libera") (setq rcirc-default-nick "hakuryo") (setq ee-libera-ichannels "#eev") (find-libera-3a "#eev") (find-efunction 'find-libera-3a) (find-efunction 'find-libera) (find-efunction 'find-rcirc-buffer) (find-efunction 'ee-rcirc-connect) (ee-rcirc-connected "*irc.libera.chat*") (find-libera) rcirc-send-string: Network connection to irc.libera.chat is not open rcirc-send-string: Network connection to *irc.libera.chat* is not open # (find-efunction 'circe) # (find-efunction 'rcirc-connect) # (find-efunction 'rcirc-generate-new-buffer-name) # (find-efunction 'rcirc-generate-new-buffer-name) # (find-rcirc-intro) # (find-efunction 'find-libera-3a) # (find-efunction 'find-rcirc-buffer0) # (find-efunction 'ee-rcirc-buffer) # (find-efunction 'ee-rcirc-connect) # (find-efunction 'ee-rcirc-connected) # (find-eev "eev-rcirc.el" "low-level") (ee-rcirc-connected ee-libera-server) (ee-rcirc-connect server (ee-split ichannels)) (ee-rcirc-join-channels server (ee-split (or achannels ichannels))) (ee-rcirc-join-channel server channel) (find-rcirc-buffer0 ee-libera-server) (find-rcirc-buffer0 ee-libera-server "#eev") (ee-rcirc-connect ee-libera-server "#eev") (ee-rcirc-buffer ee-libera-server) (find-ebuffer (ee-rcirc-buffer ee-libera-server) ) (find-ebuffer (ee-rcirc-buffer ee-libera-server "#eev") ) (ee-rcirc-buffer server channel) (setq rcirc-default-nick "edrx4") (setq ee-libera-achannels "#eev") (setq ee-libera-ichannels "#eev") (find-libera-3a "#eev") (find-libera "#eev") strikethrough https://modern.ircdocs.horse/formatting.html#characters https://github.com/rcy/rcirc <hominoidea> corwin: #emacs is +c, formatting is stripped. you're only seeing italic at your client. <parsnip0> *you're only seeing italic at the sending client <edrx> what is +c? what is the low-level way to see the flags of a channel? <edrx> I use rcirc, so low-level ways have more chance to work <corwin> /mode <channel> <hominoidea> https://libera.chat/guides/channelmodes <edrx> both "/mode #emacs" and "/mode emacs" give "malformed input" here =/ <edrx> thanks! <corwin> Sounds like an issue with your client then edrx. Works fine from ERC https://lists.gnu.org/archive/html/bug-gnu-emacs/2022-08/msg02590.html twb on rcirc's bugs # (find-fline "~/LOGS/2022sep07.emacs" "(setq rcirc-authinfo") <bremner> k-man: spwhitton has pgtk .debs. See /topic of #debian-emacs on oftc if you're on that network # Local Variables: # coding: utf-8-unix # modes: (fundamental-mode emacs-lisp-mode) # End: