X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/e7a169d1998971353b53b767cc355ddf1b3d6fdc..e81c7cd4fecdf9d04f687922ccaea85454a23f2d:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 09b790d..0d23dfe 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1598,19 +1598,23 @@ For disabling the behaviour for certain buffers and/or modes." ;; (: gnus-registry-split-fancy-with-parent) ;; (: gnus-group-split-fancy "INBOX" t "INBOX") ;; gnu - (list "\\(.*\\).\\(non\\)?gnu.org" "l.\\1") + (list ".*<\\(.*\\)\\.\\(non\\)?gnu\\.org>.*" "l.\\1") + ;; *@lists.sr.ht, omitting one dot if present + ;; add more \\.?\\([^.@]*\\) if needed + (list ".*<~\\(.*\\)/\\([^.@]*\\)\\.?\\([^.@]*\\)@lists.sr.ht>.*" "l.~\\1.\\2\\3") ;; webmasters (from "webmasters\\(-comment\\)?@gnu\\.org" "webmasters") - ;; haskell - (list ".*haskell-art.we.lurk.org" "l.haskell.art") - (list ".*haskell-cafe.haskell.org" "l.haskell.cafe") ;; other (list ".*atreus.freelists.org" "l.atreus") (list ".*deepspec.lists.cs.princeton.edu" "l.deepspec") - (list ".*notmuch.notmuchmail.org" "l.notmuch") - (list ".*dev.lists.parabola.nu" "l.parabola-dev") - ;; *@lists.sr.ht - (list ".*~\\(.*\\)/\\(.*\\)@lists.sr.ht" "l.~\\1.\\2") + ;; (list ".*haskell-art.we.lurk.org" "l.haskell.art") ;d + (list ".*haskell-cafe.haskell.org" "l.haskell.cafe") + ;; (list ".*notmuch.notmuchmail.org" "l.notmuch") ;u + ;; (list ".*dev.lists.parabola.nu" "l.parabola-dev") ;u + ;; ---------------------------------- + ;; legend: (u)nsubscribed | (d)ead + ;; ---------------------------------- + ;; otherwise, leave mail in INBOX "INBOX"))) (nnimap "uw" (nnimap-stream plain) @@ -1622,9 +1626,9 @@ For disabling the behaviour for certain buffers and/or modes." (nnimap-split-methods 'nnimap-split-fancy) (nnimap-split-fancy (| ;; (: gnus-registry-split-fancy-with-parent) - ;; se463-s19 - ("subject" "\\(SE\\s-?463\\|Deliverable\\)" "course.se463-s19") - (from "\\(SE\\s-?463\\|Gema\\|Hemant\\|Davood\\|Camilo\\|Reza\\|Michael\\|Sandy\\)" "course.se463-s19") + ;; se212-f19 + ("subject" "SE\\s-?212" "course.se463-s19") + (from "SE\\s-?212" "course.se463-s19") ;; catch-all "INBOX"))) (nnimap "csc" @@ -1679,7 +1683,7 @@ For disabling the behaviour for certain buffers and/or modes." (to-address . "gnewsense-dev@nongnu.org") (to-list . "gnewsense-dev@nongnu.org") (list-identifier . "\\[Gnewsense-dev\\]")) - ("l\\.gnewsense-dev" + ("l\\.gnewsense-users" (to-address . "gnewsense-users@nongnu.org") (to-list . "gnewsense-users@nongnu.org") (list-identifier . "\\[gNewSense-users\\]")) @@ -1782,6 +1786,12 @@ For disabling the behaviour for certain buffers and/or modes." (require 'ebdb-mua) (require 'ebdb-gnus) + (when (version< emacs-version "27") + (add-to-list + 'nnmail-split-abbrev-alist + '(list . "list-id\\|list-post\\|x-mailing-list\\|x-beenthere\\|x-loop") + t)) + ;; (gnus-registry-initialize) (with-eval-after-load 'recentf @@ -1843,9 +1853,9 @@ Cheriton School of Computer Science University of Waterloo https://bandali.eu.org") (defvar b/csc-signature "Amin Bandali -Termcom, Computer Science Club -University of Waterloo -https://bandali.eu.org") +Systems Committee +Computer Science Club, University of Waterloo +https://csclub.uwaterloo.ca/~abandali") (setq gnus-posting-styles '((".*" (address "amin@shemshak.org") @@ -2077,7 +2087,80 @@ https://bandali.eu.org") (add-to-list 'erc-modules 'notifications) (add-to-list 'erc-modules 'spelling) (add-to-list 'erc-modules 'scrolltoplace) - (erc-update-modules)) + (erc-update-modules) + + (when (and (version<= "24.4" emacs-version) + (version< emacs-version "27")) + ;; fix erc-lurker bug + ;; patch submitted: https://bugs.gnu.org/36843#10 + ;; TODO: remove when patch is merged and emacs 27 is released + (defvar erc-message-parsed) + (defun erc-display-message (parsed type buffer msg &rest args) + "Display MSG in BUFFER. + +ARGS, PARSED, and TYPE are used to format MSG sensibly. + +See also `erc-format-message' and `erc-display-line'." + (let ((string (if (symbolp msg) + (apply #'erc-format-message msg args) + msg)) + (erc-message-parsed parsed)) + (setq string + (cond + ((null type) + string) + ((listp type) + (mapc (lambda (type) + (setq string + (erc-display-message-highlight type string))) + type) + string) + ((symbolp type) + (erc-display-message-highlight type string)))) + + (if (not (erc-response-p parsed)) + (erc-display-line string buffer) + (unless (erc-hide-current-message-p parsed) + (erc-put-text-property 0 (length string) 'erc-parsed parsed string) + (erc-put-text-property 0 (length string) 'rear-sticky t string) + (when (erc-response.tags parsed) + (erc-put-text-property 0 (length string) 'tags (erc-response.tags parsed) + string)) + (erc-display-line string buffer))))) + + (defun erc-lurker-update-status (_message) + "Update `erc-lurker-state' if necessary. + +This function is called from `erc-insert-pre-hook'. If the +current message is a PRIVMSG, update `erc-lurker-state' to +reflect the fact that its sender has issued a PRIVMSG at the +current time. Otherwise, take no action. + +This function depends on the fact that `erc-display-message' +lexically binds `erc-message-parsed', which is used to check if +the current message is a PRIVMSG and to determine its sender. +See also `erc-lurker-trim-nicks' and `erc-lurker-ignore-chars'. + +In order to limit memory consumption, this function also calls +`erc-lurker-cleanup' once every `erc-lurker-cleanup-interval' +updates of `erc-lurker-state'." + (when (and (boundp 'erc-message-parsed) + (erc-response-p erc-message-parsed)) + (let* ((command (erc-response.command erc-message-parsed)) + (sender + (erc-lurker-maybe-trim + (car (erc-parse-user (erc-response.sender erc-message-parsed))))) + (server + (erc-canonicalize-server-name erc-server-announced-name))) + (when (equal command "PRIVMSG") + (when (>= (cl-incf erc-lurker-cleanup-count) + erc-lurker-cleanup-interval) + (setq erc-lurker-cleanup-count 0) + (erc-lurker-cleanup)) + (unless (gethash server erc-lurker-state) + (puthash server (make-hash-table :test 'equal) erc-lurker-state)) + (puthash sender (current-time) + (gethash server erc-lurker-state)))))))) (use-package erc-fill :after erc