Mercurial > hg > xemacs
comparison gnus-init.el @ 32:cb9b76219c55
attempt to merge mail read and send from all over
| author | Henry S Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Sun, 08 Oct 2023 16:36:27 +0100 |
| parents | 0e5b39d2f8bb |
| children | eee08de75336 |
comparison
equal
deleted
inserted
replaced
| 31:129123962e51 | 32:cb9b76219c55 |
|---|---|
| 1 ;; Last edited: Fri Aug 20 14:49:23 1999 | |
| 2 ;; gnus customisation | 1 ;; gnus customisation |
| 2 | |
| 3 (site-caseq (edin | |
| 4 (require 'mail-from-inf)) | |
| 5 (maritain | |
| 6 (require 'mail-from-m) | |
| 7 )) | |
| 8 | |
| 9 ;; things based on my-mail-dir, which is set in one of the above | |
| 10 | |
| 11 (setq gnus-article-save-directory (concat my-mail-dir "/Mail") | |
| 12 nnml-directory (expand-file-name (concat my-mail-dir "/Mail")) | |
| 13 gnus-message-archive-method | |
| 14 '(nnfolder "archive" | |
| 15 ;; the following two are not taking effect, not sure why, answer | |
| 16 ;; _may_ lie in gnus-setup-news... | |
| 17 (nnfolder-directory (concat my-mail-dir "/cpy")) | |
| 18 (nnfolder-active-file (concat my-mail-dir "/cpy/active"))) | |
| 19 mail-sources '((file :path "/var/spool/mail/ht"))) | |
| 3 | 20 |
| 4 (setq gnus-novice-user nil) | 21 (setq gnus-novice-user nil) |
| 5 | 22 |
| 6 (setq gnus-message-archive-group | 23 (setq gnus-message-archive-group |
| 7 '((concat "general." (format-time-string | 24 '((concat "general." (format-time-string |
| 8 "%Y-%m" (current-time))))) | 25 "%Y-%m" (current-time))))) |
| 9 | 26 |
| 10 | 27 |
| 11 (site-caseq (maritain (require 'mail-from-m))) | 28 |
| 12 | 29 (setq gnus-auto-select-next 'quietly |
| 13 (setq | 30 gnus-buttonized-mime-types '("multipart/signed") |
| 14 ; gnus-article-sort-functions '(gnus-article-sort-by-subject | 31 gnus-group-line-format "%M%S%p%P%5y:%uH%(%g%)%l %O |
| 15 ; see secondary-select-methods in my-news gnus-article-sort-by-number) | 32 " |
| 16 gnus-auto-select-next 'quietly | 33 gnus-ignored-headers "^Errors-To:\\|^Precedence:\\|^UNIX-From:" |
| 17 gnus-buttonized-mime-types '("multipart/signed") | 34 gnus-inhibit-mime-unbuttonizing nil |
| 18 gnus-inhibit-mime-unbuttonizing nil | 35 gnus-mime-display-multipart-related-as-mixed t |
| 19 gnus-ignored-headers "^Errors-To:\\|^Precedence:\\|^UNIX-From:" | 36 gnus-show-mime t |
| 20 gnus-mime-display-multipart-related-as-mixed t | 37 gnus-simplify-subject-regexp "^\\(re[:;.]\\| \\|fwd:\\)*" |
| 21 gnus-posting-styles `((".*" | 38 gnus-summary-display-arrow nil |
| 22 (signature-file ,mail-signature-file)) | 39 gnus-summary-gather-subject-limit nil |
| 23 ("quaker-2023" | 40 gnus-summary-ignore-duplicates t |
| 24 (signature-file "/home/ht/.quaker-sig") | 41 gnus-summary-line-format "%U%R%5N%I%(%[%4L: %-12,12A%]%) %s\n" |
| 25 (address "ht@rsof.hst.name")) | 42 gnus-summary-make-false-root 'none |
| 26 ("mhmcc-2023" | 43 gnus-thread-sort-functions '(gnus-thread-sort-by-number |
| 27 (signature-file "/home/ht/.mhmcc-sig") | 44 gnus-thread-sort-by-simpl-subject) |
| 28 ("Reply-to" "sesam.emh.management@gmail.com") | 45 gnus-use-scoring nil ; not used yet |
| 29 (name "HST as Convenor SESAM MHMC") | 46 message-from-style 'angles |
| 30 (address "mhmcc@rsof.hst.name") | 47 mm-discouraged-alternatives '("text/html") |
| 31 ("Bcc" "sesam.emh.management@gmail.com"))) | 48 nnmail-expiry-wait 28 |
| 32 gnus-simplify-subject-regexp "^\\(re[:;.]\\| \\|fwd:\\)*" | 49 no-select-groups '("nnml+ht:cygwin") |
| 33 gnus-summary-display-arrow nil | 50 ) |
| 34 gnus-summary-gather-subject-limit nil | |
| 35 gnus-summary-line-format "%U%R%5N%I%(%[%4L: %-12,12A%]%) %s\n" | |
| 36 gnus-summary-make-false-root 'none | |
| 37 gnus-thread-sort-functions '(gnus-thread-sort-by-number | |
| 38 gnus-thread-sort-by-simpl-subject) | |
| 39 mm-discouraged-alternatives '("text/html") | |
| 40 gnus-summary-ignore-duplicates t | |
| 41 gnus-use-scoring nil ; not used yet | |
| 42 ) | |
| 43 | 51 |
| 44 (setq bbdb/news-auto-create-p t) | 52 (setq bbdb/news-auto-create-p t) |
| 53 | |
| 54 (setq wsp-cache nil) | |
| 55 | |
| 56 ;;;(setq blacklist-db (open-database "~/.blacklist")) | |
| 57 | |
| 58 (require 'my-news) ; defines db functions | |
| 59 | |
| 60 (open-white) | |
| 61 (open-ad) | |
| 62 (open-quaker) | |
| 63 | |
| 64 (add-hook 'kill-emacs-hook | |
| 65 (lambda () | |
| 66 (if (database-live-p whitelist-db) | |
| 67 (close-database whitelist-db)) | |
| 68 (if (database-live-p quaker-db) | |
| 69 (close-database quaker-db)) | |
| 70 (if (database-live-p adlist-db) | |
| 71 (close-database adlist-db)))) | |
| 72 | |
| 73 (add-hook 'bbdb-complete-name-hooks 'quaker-sig-if-quaker) | |
| 74 (add-hook 'gnus-message-setup-hook 'quaker-sig-if-to-quaker) | |
| 45 | 75 |
| 46 (setq nnmail-crosspost nil) | 76 (setq nnmail-crosspost nil) |
| 47 (setq nnmail-split-methods 'nnmail-split-fancy) | 77 (setq nnmail-split-methods 'nnmail-split-fancy) |
| 48 (defun set-nnmail-split-fancy () | 78 |
| 49 (setq nnmail-split-fancy | 79 (setq white-domains (list)) |
| 50 (let ((month (format-time-string "%Y-%m" (current-time)))) | 80 |
| 51 (cons '| | 81 (setq ad-domains (list "planetx.co.uk" "substack.com")) |
| 52 (append '(("Subject" "testing" "jjunk") | 82 |
| 53 (to "quaker-\\(l\\|spectrum\\)" "quaker-2022") | 83 (defvar ht-compiled-split nil) |
| 54 (to "quaker-b" "quaker-b") | |
| 55 (to "[cC]ygwin" "cygwin") | |
| 56 (from "noreply@mrooms.net" "nayler") | |
| 57 (to "ht@rsof.hst.name" "quaker-2023") | |
| 58 (to "Wardenship@lists.quaker.eu.org" "wardens") | |
| 59 (to "mhmcc@rsof.hst.name" "mhmcc-2023") | |
| 60 ("Envelope-to" "mhmcc@rsof.hst.name" | |
| 61 (| (from "mhmcc@rsof.hst.name" junk) | |
| 62 "mhmcc-2023")) | |
| 63 (to "mfw@rsof.hst.name" "7vt") | |
| 64 (to "zphdaily" (concat "pers-" month)) | |
| 65 (to "inf\\(pg\\|msc\\|teach\\|res\\|staff\\)" "inf-\\1" ) | |
| 66 ) | |
| 67 (list (list 'to | |
| 68 "ht\\|h\\.?thompson?" | |
| 69 (concat "pers-" month)) | |
| 70 (concat "group-" | |
| 71 (format-time-string | |
| 72 "%Y-%m" (current-time)) | |
| 73 ""))))))) | |
| 74 | |
| 75 (set-nnmail-split-fancy) | |
| 76 | 84 |
| 77 (defun set-ht-compiled-split () | 85 (defun set-ht-compiled-split () |
| 86 "update the mail splitting rules" | |
| 78 (interactive) | 87 (interactive) |
| 79 (set-nnmail-split-fancy)) | 88 (set-nnmail-split-fancy)) |
| 80 | 89 |
| 81 (setq gnus-show-mime t) | 90 (setq gnus-show-mime t) ; stale |
| 91 (setq mml1991-use 'pgg | |
| 92 mml2015-use 'pgg | |
| 93 mm-verify-option 'always) | |
| 94 | |
| 95 (require 'mm-decode) | |
| 96 (setq mm-automatic-display (remove "text/html" mm-automatic-display)) | |
| 97 | |
| 98 (custom-set-faces) | |
| 82 | 99 |
| 83 (defun ht-gnus-summary-delete-forward () | 100 (defun ht-gnus-summary-delete-forward () |
| 84 "REAL delete for nnmail gnus" | 101 "REAL delete for nnmail gnus" |
| 85 (interactive) | 102 (interactive) |
| 86 (gnus-summary-delete-article) | 103 (gnus-summary-delete-article) |
| 87 (gnus-summary-next-unread-article)) | 104 (gnus-summary-next-unread-article)) |
| 88 | 105 |
| 89 (require 'my-news) | |
| 90 (open-quaker) | |
| 91 | |
| 92 (add-hook 'kill-emacs-hook | 106 (add-hook 'kill-emacs-hook |
| 93 (lambda () | 107 (lambda () |
| 94 ; (if (database-live-p whitelist-db) | 108 (if (database-live-p whitelist-db) |
| 95 ; (close-database whitelist-db)) | 109 (close-database whitelist-db)) |
| 96 (if (database-live-p quaker-db) | 110 (if (database-live-p quaker-db) |
| 97 (close-database quaker-db)) | 111 (close-database quaker-db)) |
| 98 ; (if (database-live-p adlist-db) | 112 (if (database-live-p adlist-db) |
| 99 ; (close-database adlist-db)) | 113 (close-database adlist-db)) |
| 100 )) | 114 )) |
| 101 | 115 |
| 102 (add-hook 'bbdb-complete-name-hooks 'quaker-sig-if-quaker) | 116 (add-hook 'bbdb-complete-name-hooks 'quaker-sig-if-quaker) |
| 103 ;(add-hook 'gnus-message-setup-hook 'quaker-sig-if-to-quaker) | |
| 104 | 117 |
| 105 (custom-set-variables | 118 (custom-set-variables |
| 106 '(gnus-treat-display-picons nil)) | 119 '(gnus-treat-display-picons nil)) |
| 107 (custom-set-faces) | 120 (custom-set-faces) |
| 108 | 121 |
| 110 | 123 |
| 111 (add-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1) | 124 (add-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1) |
| 112 | 125 |
| 113 (add-hook 'message-mode-hook 'message-mode-fun1) | 126 (add-hook 'message-mode-hook 'message-mode-fun1) |
| 114 | 127 |
| 115 ;; run the first time we make a summary window | 128 (add-hook 'message-sent-hook (function whiten-recip)) |
| 116 (defun gnus-summary-mode-fun1 () | |
| 117 "install ht's mods" | |
| 118 (define-key gnus-summary-mode-map "D" 'ht-gnus-summary-delete-forward) | |
| 119 (define-key gnus-summary-mode-map "\M-h" 'showMPAhtml) | |
| 120 (remove-hook 'gnus-summary-mode-hook 'gnus-summary-mode-fun1)) | |
| 121 | |
| 122 (defun message-mode-fun1 () | |
| 123 (define-key message-mode-map [(control meta q)] 'add-quaker) | |
| 124 (remove-hook 'message-mode-hook 'message-mode-fun1)) | |
| 125 | 129 |
| 126 (defun ht-gnus-pers-refresh (n) | 130 (defun ht-gnus-pers-refresh (n) |
| 127 (interactive "p") | 131 (interactive "p") |
| 128 (let ((gn (concat "nnml+ht:pers-" | 132 (let ((gn (concat "nnml+ht:pers-" |
| 129 (format-time-string "%Y-%m" (current-time))))) | 133 (format-time-string "%Y-%m" (current-time))))) |
| 133 (gnus-group-read-group)) | 137 (gnus-group-read-group)) |
| 134 ) | 138 ) |
| 135 | 139 |
| 136 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1) | 140 (add-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1) |
| 137 | 141 |
| 138 ;; run the first time we make a group window | |
| 139 (defun gnus-group-mode-fun1 () | |
| 140 "install ht's mods" | |
| 141 (define-key gnus-group-mode-map "\M-\C-g" 'ht-gnus-pers-refresh) | |
| 142 (remove-hook 'gnus-group-mode-hook 'gnus-group-mode-fun1)) | |
| 143 | 142 |
| 144 (defun gnus-regen-group () | 143 (defun gnus-regen-group () |
| 145 (nnml-generate-nov-databases-1 (concat | 144 (nnml-generate-nov-databases-1 (concat |
| 146 (expand-file-name nnml-directory) | 145 (expand-file-name nnml-directory) |
| 147 "/" | 146 "/" |
| 148 (substring (gnus-group-group-name) 8)) | 147 (substring (gnus-group-group-name) 8)) |
| 149 nil t) | 148 nil t) |
| 150 ) | 149 ) |
| 151 | 150 (require 'mailcrypt) |
| 151 (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) | |
| 152 (add-hook 'message-mode-hook 'mc-install-write-mode) | |
| 153 (add-hook 'news-reply-mode-hook 'mc-install-write-mode) | |
| 152 | 154 |
| 153 (defun gnus-user-format-function-t (header) | 155 (defun gnus-user-format-function-t (header) |
| 154 "display the to field (for archive messages)" | 156 "display the to field (for archive messages)" |
| 155 (let ((n (mail-header-number header))) | 157 (let ((n (mail-header-number header))) |
| 156 (with-current-buffer nntp-server-buffer | 158 (with-current-buffer nntp-server-buffer |
| 211 (looking-at "You should only click on links or attachments if you are certain that the email is genuine and the content is safe.") | 213 (looking-at "You should only click on links or attachments if you are certain that the email is genuine and the content is safe.") |
| 212 (gnus-delete-line)) | 214 (gnus-delete-line)) |
| 213 ))) | 215 ))) |
| 214 | 216 |
| 215 (setq gnus-treat-strip-uoe-warning t) | 217 (setq gnus-treat-strip-uoe-warning t) |
| 218 | |
| 219 (provide 'gnus-init) |
