erc fixes
authorIan Kelling <iank@fsf.org>
Wed, 27 Mar 2024 20:23:53 +0000 (16:23 -0400)
committerIan Kelling <iank@fsf.org>
Wed, 27 Mar 2024 20:23:53 +0000 (16:23 -0400)
init.el

diff --git a/init.el b/init.el
index 22068c8a263858d2a9e2a92d63fd57b8ebf2fcd5..1b3b6d1550d39c112493c77865cc2f9dd7a955d4 100644 (file)
--- a/init.el
+++ b/init.el
@@ -1756,38 +1756,72 @@ or else the number of characters matched by `outline-regexp'."
                                   "324" "329" "332" "333" "353")
         ;; seems good, i don't care about the server buffer generally
         erc-track-exclude-server-buffer t
-        ;; dont highlight channels just cuz of new messages
-        erc-track-priority-faces-only 'all
-        ;; so that we don't show channels where i havent been mmentioned
-        erc-track-faces-priority-list '(erc-current-nick-face
-                                erc-keyword-face
-                                erc-pal-face
-                                erc-nick-msg-face
-                                erc-direct-msg-face
-                                erc-fool-face)
-
-
-        ) ; end setq
-
-  :config
-  (add-hook 'erc-server-PRIVMSG-functions
-            'erc-my-privmsg-sound)
-  (add-hook 'erc-text-matched-hook 'erc-sound-if-not-server)
-  (erc-track-mode 1)
-  (defun erc-track--switch-buffer (fun arg)
-    (if (not erc-track-mode)
-        (message (concat "Enable the ERC track module if you want to use the"
-                        " tracking minor mode"))
-      (cond (erc-modified-channels-alist
-            ;; if we're not in erc-mode, set this buffer to return to
-             (if-let ((buf (erc-track-get-active-buffer arg))
-                      ((buffer-live-p buf)))
-                 (funcall fun buf)
-               (erc-modified-channels-update)
-               (erc-track--switch-buffer fun arg)))
-           ;; if no active channels, switch back to what we were doing before
-           (t (switch-to-buffer "#fsfsys")))))
-  )
+        ;; dont highlight channels just cuz of new messages, except for pms or some new channel I haven't listed in my config.
+
+        erc-track-shorten-cutoff 40
+        ;; sed -rn 's/.*(#[^>]*).*/"\1"/p' /p/c/machine_specific/li/filesystem/var/lib/znc/configs/znc.conf
+        erc-track-priority-faces-only (list
+                                        "#conservancy"
+                                        "#fosdem"
+                                        "#fsf"
+                                        "#fsf-licensing"
+                                        "#fsfe"
+                                        "#fsfsys"
+                                        "#gnu"
+                                        "#librecmc"
+                                        "#libreplanet-tech-support"
+                                        "#libreplanet"
+                                        "#mnt-reform"
+                                        "#nouveau"
+                                        "#pump.io"
+                                        "#savannah"
+                                        "#seagl"
+                                        "#social"
+                                        "#spamassassin"
+                                        "#talos-workstation"
+                                        "#trisquel"
+                                        "#trisquel-dev"
+                                        "#overseers"
+                                        "#gdb"
+                                        "#gcc"
+                                        "#glibc"
+                                        "#binutils"
+                                        "#gnu-linux-libre"
+                                        "#parabola"
+                                        "#guix"
+                                        "#gnu-ops"
+                                        "#gcc"
+                                        )
+  ;; so that we don't show channels where i havent been mmentioned
+  erc-track-faces-priority-list '(erc-current-nick-face
+                                  erc-keyword-face
+                                  erc-pal-face
+                                  erc-nick-msg-face
+                                  erc-direct-msg-face
+                                  erc-fool-face)
+
+
+  ) ; end setq
+
+:config
+(add-hook 'erc-server-PRIVMSG-functions
+          'erc-my-privmsg-sound)
+(add-hook 'erc-text-matched-hook 'erc-sound-if-not-server)
+(erc-track-mode 1)
+(defun erc-track--switch-buffer (fun arg)
+  (if (not erc-track-mode)
+      (message (concat "Enable the ERC track module if you want to use the"
+                      " tracking minor mode"))
+    (cond (erc-modified-channels-alist
+          ;; if we're not in erc-mode, set this buffer to return to
+           (if-let ((buf (erc-track-get-active-buffer arg))
+                    ((buffer-live-p buf)))
+               (funcall fun buf)
+             (erc-modified-channels-update)
+             (erc-track--switch-buffer fun arg)))
+         ;; if no active channels, switch back to what we were doing before
+         (t (switch-to-buffer "#fsfsys")))))
+)
 ;;; named commands
 (defun rm-file-and-buffer ()
   "Removes file connected to current buffer and kills buffer."