# HG changeset patch # User Henry S. Thompson # Date 1702761030 0 # Node ID eee08de75336f3cc098821fb7718605a01e8859f # Parent 597d985bf4486b6c5e1291566d43705e54c4435b try to do better at where news/mail/init stuff is handled, works on ecclerig, mostly, but may break maritain diff -r 597d985bf448 -r eee08de75336 common-init.el Binary file common-init.el has changed diff -r 597d985bf448 -r eee08de75336 gnus-init.el --- a/gnus-init.el Sat Dec 16 21:08:13 2023 +0000 +++ b/gnus-init.el Sat Dec 16 21:10:30 2023 +0000 @@ -6,17 +6,21 @@ (require 'mail-from-m) )) -;; things based on my-mail-dir, which is set in one of the above +;; things based on my-mail-dir, or set-ht-compiled-split +;; which are defined in one of the above + +(set-ht-compiled-split) -(setq gnus-article-save-directory (concat my-mail-dir "/Mail") - nnml-directory (expand-file-name (concat my-mail-dir "/Mail")) - gnus-message-archive-method - '(nnfolder "archive" - ;; the following two are not taking effect, not sure why, answer - ;; _may_ lie in gnus-setup-news... - (nnfolder-directory (concat my-mail-dir "/cpy")) - (nnfolder-active-file (concat my-mail-dir "/cpy/active"))) - mail-sources '((file :path "/var/spool/mail/ht"))) +(setq + gnus-article-save-directory (expand-file-name (concat my-mail-dir "/Mail")) + nnml-directory (expand-file-name (concat my-mail-dir "/Mail")) + gnus-message-archive-method + '(nnfolder "archive" + ;; the following two are not taking effect, not sure why, answer + ;; _may_ lie in gnus-setup-news... + (nnfolder-directory (concat my-mail-dir "/cpy")) + (nnfolder-active-file (concat my-mail-dir "/cpy/active"))) + ) (setq gnus-novice-user nil) @@ -76,17 +80,14 @@ (setq nnmail-crosspost nil) (setq nnmail-split-methods 'nnmail-split-fancy) +(setq white-subjects "\\b\\(phd\\|ilcc\\)\\b") + (setq white-domains (list)) (setq ad-domains (list "planetx.co.uk" "substack.com")) (defvar ht-compiled-split nil) -(defun set-ht-compiled-split () - "update the mail splitting rules" - (interactive) - (set-nnmail-split-fancy)) - (setq gnus-show-mime t) ; stale (setq mml1991-use 'pgg mml2015-use 'pgg diff -r 597d985bf448 -r eee08de75336 mail-from-inf.el --- a/mail-from-inf.el Sat Dec 16 21:08:13 2023 +0000 +++ b/mail-from-inf.el Sat Dec 16 21:10:30 2023 +0000 @@ -1,26 +1,50 @@ (setq my-mail-dir "/disk/scratch/mail" gnus-your-organization "HCRC, University of Edinburgh" - gnus-default-directory "/afs/inf.ed.ac.uk/user/h/ht" + gnus-home-directory "/disk/scratch/gnus" + gnus-default-directory "/disk/scratch" nnmail-message-id-cache-file "/disk/scratch/gnus/.nnmail-cache" mail-sources '((file :path "/disk/scratch/mail/ht_mbox")) mail-source-crash-box "/tmp/crashbox" ; local disk nndraft-directory "/disk/scratch/drafts/" message-auto-save-directory "/disk/scratch/drafts/" + mail-archive-file-name (concat "/disk/scratch/mail/cpy/general/" + (format-time-string + "%Y-%m" (current-time)) + ".mbox") ) +(setq rmail-dont-reply-to-names "hthompso*\\|h\\.thompso*\\|ht@*" ) + +(setq rmail-show-mime nil) +(set-default 'ht-last-file (expand-file-name "/disk/scratch/mail/")) +(setq ht-diary-file-name "/disk/scratch/mail/diary.babyl") +(setq user-mail-address "ht@inf.ed.ac.uk") +(setq mail-append-host "inf.ed.ac.uk") +(setq mail-host-address "inf.ed.ac.uk") +(setq rmail-spool-directory (file-name-as-directory + (concat rmail-spool-directory + "ht-mail"))) +;; don't know why this is necessary +(setq rmail-primary-inbox-list + (list (concat rmail-spool-directory "ht"))) + (setq white-subjects "\\b\\(phd\\|ilcc\\)\\b") +(setq white-domains (list)) + +(setq ad-domains (list "planetx.co.uk")) + (setq w3c-lists1 - '((list "w3c-xml-schema-\\([a-zA-Z]+\\)\\(\\.w3\\.org\\)?" "xml-schema-\\1") - (list "chairs\\(\\.w3\\.org\\)?" "w3c-chairs" ) + '((any "w3c-xml-schema-\\([a-zA-Z]+\\)\\(@\\.w3\\.org\\)?" "xml-schema-\\1") + (any "chairs\\(@\\.w3\\.org\\)?" "w3c-chairs" ) (to "\\(w3c\\|public\\|member\\)-xml-\\([-a-zA-Z]+\\)\\(\\.w3\\.org\\)?" "xml-\\2" ) ;(list "w3t-\\([-a-zA-Z]+\\)\\(\\.w3\\.org\\)?" "w3t-\\1") ;(list "team-\\([-a-zA-Z]+\\)\\(\\.w3\\.org\\)?" "w3-team-\\1") ;(list "w3c-\\(xsl-wg\\|format\\|i18n-ig\\)\\(\\.w3\\.org\\)?" "w3c-xsl") - (list "w3c-\\([-a-zA-Z]+\\)\\(\\.w3\\.org\\)?" "w3c-\\1") - (list "member-\\(ac-uk\\|access\\)" "w3-member-\\1");[-a-zA-Z]+\\) + (any "w3c-\\([-a-zA-Z]+\\)\\(@\\.w3\\.org\\)?" "w3c-\\1") + (any "member-\\(ac-uk\\|access\\)" "w3-member-\\1");[-a-zA-Z]+\\) (to "public-xpointer-registry\\(-request\\)?" "xpointer-registry");[-a-zA-Z]+ (to "public-\\([-a-zA-Z]+\\)" "w3-public-\\1") @@ -56,8 +80,8 @@ )) (setq xml-lists2 - '((list "ietf-xml-mime\\.imc\\.org" "xml-mime") - (list "xml-mime\\.ietf\\.org" "xml-mime"))) + '((any "ietf-xml-mime\\.imc\\.org" "xml-mime") + (any "xml-mime\\.ietf\\.org" "xml-mime"))) (setq misc-list1 '(;(from "w3t-\\([a-zA-Z]+\\)-request" "w3t-\\1") @@ -157,7 +181,7 @@ ;(to "squid-users@lists.squid-cache.org\\|squid-users@squid-cache.org" ; "squid") (to "exist-open" "exist") - (list "ilcc-\\([a-zA-Z]+\\)" "ilcc-\\1") + (any "ilcc-\\([a-zA-Z]+\\)" "ilcc-\\1") (to "ilcc" "ilcc") (to ".*lecturers@inf.ed.ac.uk" "inf-teach") (to "\\(aisyllabus\\|acstaff\\)" "inf-teach") @@ -170,6 +194,9 @@ (defconst ht-spam-res '("bfSPAM" "boSPAM" "edSPAM" "saSPAM" "slSPAM")) +(defun log-good-sender (sres) + (message "good sender %s with result %s" (get-from-gnus-addr) sres)) + (setq nnmail-split-fancy '(| (to "ht\\+d@inf\\.ed\\.ac\\.uk" "_diary") @@ -269,3 +296,5 @@ (gnus-summary-exit) ) ) + +(provide 'mail-from-inf) diff -r 597d985bf448 -r eee08de75336 mail-from-m.el --- a/mail-from-m.el Sat Dec 16 21:08:13 2023 +0000 +++ b/mail-from-m.el Sat Dec 16 21:10:30 2023 +0000 @@ -12,8 +12,13 @@ (setq gnus-default-directory "/home/ht" my-mail-dir "/home/ht/mail" + mail-sources '((file :path "/var/spool/mail/ht")) ) +(setq mail-archive-file-name (expand-file-name "~/mail/cpy/general")) + + + (defun set-nnmail-split-fancy () (setq nnmail-split-fancy (let ((month (format-time-string "%Y-%m" (current-time)))) diff -r 597d985bf448 -r eee08de75336 my-news.el --- a/my-news.el Sat Dec 16 21:08:13 2023 +0000 +++ b/my-news.el Sat Dec 16 21:10:30 2023 +0000 @@ -1,8 +1,8 @@ (message "my-news") ; (debug-on-entry 'gnus-start-news-server) (setq - gnus-select-method '(nntp "news.usenet.farm") - gnus-post-method '(nntp "usenet.inf.ed.ac.uk") + ;gnus-select-method '(nntp "news.usenet.farm") + ;gnus-post-method '(nntp "usenet.inf.ed.ac.uk") gnus-nntp-server nil ; override local default ) @@ -440,8 +440,10 @@ (gnus-summary-select-article) (with-current-buffer gnus-original-article-buffer (shell-command-on-region (point-min) (point-max) - (expand-file-name "~/bin/showMPA.sh")) - ) + ;(expand-file-name + "showMPA.sh" + ;) + )) ) diff -r 597d985bf448 -r eee08de75336 pers-init.el --- a/pers-init.el Sat Dec 16 21:08:13 2023 +0000 +++ b/pers-init.el Sat Dec 16 21:10:30 2023 +0000 @@ -17,37 +17,8 @@ (progn (message "setting DISPLAY in env") (setenv "DISPLAY" ":0"))) -;;; mail stuff -(site-caseq (edin - (setq mail-archive-file-name (concat "/disk/scratch/mail/cpy/general/" - (format-time-string - "%Y-%m" (current-time)) - ".mbox"))) - (t (setq mail-archive-file-name "~/mail/cpy/general"))) - - -(setq rmail-dont-reply-to-names "hthompso*\\|h\\.thompso*\\|ht@*" ) - -(site-caseq (edin - (setq rmail-show-mime nil) - (set-default 'ht-last-file (expand-file-name "/disk/scratch/mail/")) - (setq ht-diary-file-name "/disk/scratch/mail/diary.babyl") - (setq user-mail-address "ht@inf.ed.ac.uk") - (setq mail-append-host "inf.ed.ac.uk") - (setq mail-host-address "inf.ed.ac.uk"))) - (setq user-full-name "Henry S. Thompson") -;; new mail hackery -(site-caseq ((edin ircs ldc) - (setq rmail-spool-directory (file-name-as-directory - (concat rmail-spool-directory - "ht-mail"))))) -;; don't know why this is necessary -(site-caseq ((edin) - (setq rmail-primary-inbox-list - (list (concat rmail-spool-directory "ht"))))) - (setq vc-command-messages t) (setq minibuffer-max-depth nil) @@ -221,8 +192,36 @@ (interactive "e") (mouse-set-point click) (dired-advertised-find-file))))) - (set-face-background 'modeline '((x) . "lightgrey")))) + (set-face-background 'modeline '((x) . "lightgrey")) + (defun ht-rooms-setup (&optional arg) + (interactive) + (require 'rooms) + (require 'mail-extras) + (require 'diary) + (let ((scr (selected-frame))) + ; (sit-for 5) + (load "ht-rooms.config" nil t) + ;; for ecclerig viewed from paul + (if (eq (device-pixel-width (selected-device)) 1920) + (progn + (unwind-protect + (make-screen-for-room "diary" "+1219" "+68")) + (unwind-protect + (make-screen-for-room "elisp" "+1185" "+102")) + (unwind-protect + (make-screen-for-room "news" "+1253" "+34"))) + ;; for ecclerig in office + (unwind-protect (make-screen-for-room "diary" "+1888" "+0")) + (unwind-protect (make-screen-for-room "elisp" "+1888" "+0")) + (unwind-protect (make-screen-for-room "news" "+1223" "+0"))) + (sit-for 1) + (delete-frame scr)) + (setq ht-default-config (current-window-configuration))))) ;; DICE comes here 2012-01-13 + (setq interprogram-paste-function (lambda () + (or (get-clipboard-foreign) + (if (selection-exists-p) + (get-selection-foreign))))) (load "device-type-hacking" t t) ;; override changed default, except in gnus (message "dth") @@ -231,23 +230,7 @@ 'browse-url-firefox ) (setq browse-url-browser-function 'browse-url-firefox) - (defun ht-rooms-setup (&optional arg) - (interactive) - (require 'mail-extras) - (require 'diary) - (let ((scr (selected-frame))) - ; (sit-for 5) - (load "ht-rooms.config" nil t) - (unwind-protect (make-screen-for-room "diary" "0" "+62")) - ; (sit-for 5) - (unwind-protect (make-screen-for-room "elisp" "-25" "+79")) - ; (sit-for 5) - (unwind-protect (make-screen-for-room "news" "-50" "+96")) - ; (sit-for 5) - (unwind-protect (make-screen-for-room "mail" "-75" "+113")) - (sit-for 1) - (delete-screen scr)) - (setq ht-default-config (current-window-configuration))))) + )) (message "gnus-init") (site-caseq ((edin markup maritain) (require 'gnus-init))) @@ -320,30 +303,8 @@ (interactive "e") (mouse-set-point click) (dired-advertised-find-file))))) - - (defun ht-rooms-setup (&optional arg) - (interactive) - (require 'mail-extras) - (require 'diary) - (let ((scr (selected-frame))) - ; (sit-for 5) - (load "ht-rooms.config" nil t) - ;; for ecclerig viewed from paul - (if (eq (device-pixel-width (selected-device)) 1920) - (progn - (unwind-protect - (make-screen-for-room "diary" "+1219" "+68")) - (unwind-protect - (make-screen-for-room "elisp" "+1185" "+102")) - (unwind-protect - (make-screen-for-room "news" "+1253" "+34"))) - ;; for ecclerig in office - (unwind-protect (make-screen-for-room "diary" "+1888" "+0")) - (unwind-protect (make-screen-for-room "elisp" "+1888" "+0")) - (unwind-protect (make-screen-for-room "news" "+1223" "+0"))) - (sit-for 1) - (delete-frame scr)) - (setq ht-default-config (current-window-configuration)))))) + (message "defined rooms 2") + ))) (setq sgml-insert-missing-element-comment nil) (load "psgml" nil t) (load "psgml-edit" nil t)