[emacs] update 8 drones
[~bandali/configs] / init.org
index f9986e0..fcb700e 100644 (file)
--- a/init.org
+++ b/init.org
@@ -1759,21 +1759,25 @@ Hopefully temporary.
 ** Gnus
 
 #+begin_src emacs-lisp
 ** Gnus
 
 #+begin_src emacs-lisp
-(setq amin-gnus-init-file (no-littering-expand-etc-file-name "gnus"))
+(setq
+ amin-gnus-init-file (no-littering-expand-etc-file-name "gnus")
+ mail-user-agent     'gnus-user-agent
+ read-mail-command   'gnus)
 
 (use-package gnus
 
 (use-package gnus
-  :bind ("s-m" . gnus)
+  :bind (("s-m" . gnus)
+         ("s-M" . gnus-unplugged))
   :init
   (setq
   :init
   (setq
-   gnus-select-method
-   '(nnimap "amin"
+   gnus-select-method '(nnnil "")
+   gnus-secondary-select-methods
+   '((nnimap "amin"
             (nnimap-stream plain)
             (nnimap-address "127.0.0.1")
             (nnimap-server-port 143)
             (nnimap-authenticator plain)
             (nnimap-user "amin@aminb.org"))
             (nnimap-stream plain)
             (nnimap-address "127.0.0.1")
             (nnimap-server-port 143)
             (nnimap-authenticator plain)
             (nnimap-user "amin@aminb.org"))
-   gnus-secondary-select-methods
-   '((nnimap "uwaterloo"
+     (nnimap "uwaterloo"
              (nnimap-stream plain)
              (nnimap-address "127.0.0.1")
              (nnimap-server-port 143)
              (nnimap-stream plain)
              (nnimap-address "127.0.0.1")
              (nnimap-server-port 143)
@@ -1781,13 +1785,18 @@ Hopefully temporary.
              (nnimap-user "abandali@uwaterloo.ca")))
    gnus-message-archive-group "nnimap:Sent"
    gnus-parameters
              (nnimap-user "abandali@uwaterloo.ca")))
    gnus-message-archive-group "nnimap:Sent"
    gnus-parameters
-   '(("amin"
-      (display . 20))
-     ("uwaterloo"
-      (display . 20)))
+   '(;; ("amin"
+     ;;  (display . 20))
+     ("gnu.*"
+      ;; (display . 50)
+      (gcc-self . t))
+     ;; ("uwaterloo"
+     ;;  (display . [unread]))
+     )
    gnus-home-directory   (no-littering-expand-var-file-name "gnus/")
    gnus-home-directory   (no-littering-expand-var-file-name "gnus/")
-   gnus-directory        (no-littering-expand-var-file-name "gnus/News/")
-   message-directory     amin-maildir
+   gnus-directory        (concat gnus-home-directory "news/")
+   message-directory     (concat gnus-home-directory "mail/")
+   nndraft-directory     (concat gnus-home-directory "drafts/")
    gnus-save-newsrc-file nil
    gnus-read-newsrc-file nil
    gnus-interactive-exit nil
    gnus-save-newsrc-file nil
    gnus-read-newsrc-file nil
    gnus-interactive-exit nil
@@ -1797,12 +1806,12 @@ Hopefully temporary.
   :config
   (setq
    gnus-visible-headers
   :config
   (setq
    gnus-visible-headers
-   (concat gnus-visible-headers "\\|^List-Id:\\|^X-RT-Originator:")
+   (concat gnus-visible-headers "\\|^List-Id:\\|^X-RT-Originator:\\|^User-Agent:")
    gnus-sorted-header-list
    '("^From:" "^Subject:" "^Summary:" "^Keywords:"
      "^Followup-To:" "^To:" "^Cc:" "X-RT-Originator"
      "^Newsgroups:" "List-Id:" "^Organization:"
    gnus-sorted-header-list
    '("^From:" "^Subject:" "^Summary:" "^Keywords:"
      "^Followup-To:" "^To:" "^Cc:" "X-RT-Originator"
      "^Newsgroups:" "List-Id:" "^Organization:"
-     "^Date:")
+     "^User-Agent:" "^Date:")
   ;; local-lapsed article dates
   ;; from https://www.emacswiki.org/emacs/GnusFormatting#toc11
   gnus-article-date-headers '(user-defined)
   ;; local-lapsed article dates
   ;; from https://www.emacswiki.org/emacs/GnusFormatting#toc11
   gnus-article-date-headers '(user-defined)
@@ -1830,19 +1839,12 @@ Hopefully temporary.
               ("w" . gnus-summary-wide-reply)
               ("v" . gnus-summary-show-raw-article))
   :config
               ("w" . gnus-summary-wide-reply)
               ("v" . gnus-summary-show-raw-article))
   :config
-  (setq gnus-extra-headers (append gnus-extra-headers
-                                   '(List-Id X-RT-Originator)))
   (bind-keys
    :map gnus-summary-mode-map
    ("r"   . gnus-summary-reply-with-original)
    ("R"   . gnus-summary-wide-reply-with-original)
    ("M-L" . org-store-link)))
 
   (bind-keys
    :map gnus-summary-mode-map
    ("r"   . gnus-summary-reply-with-original)
    ("R"   . gnus-summary-wide-reply-with-original)
    ("M-L" . org-store-link)))
 
-(use-package nnmail
-  :config
-  (setq nnmail-extra-headers (append nnmail-extra-headers
-                                     '(List-Id X-RT-Originator))))
-
 (use-package gnus-msg
   :config
   (setq gnus-posting-styles
 (use-package gnus-msg
   :config
   (setq gnus-posting-styles
@@ -1854,9 +1856,16 @@ Hopefully temporary.
            (address "abandali@uwaterloo.ca")
            (gcc "\"nnimap+uwaterloo:Sent Items\"")))))
 
            (address "abandali@uwaterloo.ca")
            (gcc "\"nnimap+uwaterloo:Sent Items\"")))))
 
-(use-package gnus-group
+(use-package gnus-topic
   :hook (gnus-group-mode . gnus-topic-mode))
 
   :hook (gnus-group-mode . gnus-topic-mode))
 
+(use-package gnus-agent
+  :config
+  (setq gnus-agent-synchronize-flags 'ask)
+  :hook (gnus-group-mode . gnus-agent-mode))
+
+(use-package gnus-group)
+
 (use-package mm-decode
   :config
   (setq mm-discouraged-alternatives '("text/html" "text/richtext")))
 (use-package mm-decode
   :config
   (setq mm-discouraged-alternatives '("text/html" "text/richtext")))
@@ -1881,19 +1890,17 @@ Hopefully temporary.
   (setq message-kill-buffer-on-exit t
         message-send-mail-function 'message-send-mail-with-sendmail
         message-sendmail-envelope-from 'header
   (setq message-kill-buffer-on-exit t
         message-send-mail-function 'message-send-mail-with-sendmail
         message-sendmail-envelope-from 'header
-        ;; message-directory "drafts"
+        message-dont-reply-to-names
+        "\\(\\(.*@aminb\\.org\\)\\|\\(\\(aminb?\\|mab\\|bandali\\)@gnu\\.org\\)\\|\\(\\(m\\|a\\(min\\.\\)?\\)bandali@uwaterloo\\.ca\\)\\)"
         message-user-fqdn "aminb.org")
         message-user-fqdn "aminb.org")
-  ;; (add-hook 'message-mode-hook 'electric-quote-local-mode)
-  (add-hook 'message-mode-hook
-            (lambda () (setq fill-column 65
-                        message-fill-column 65)))
-  (add-hook 'message-mode-hook
-            #'flyspell-mode)
-  ;; (add-hook 'message-setup-hook
-  ;;           #'mml-secure-message-sign-pgpmime)
+  :hook (;; (message-setup . mml-secure-message-sign-pgpmime)
+         (message-mode . flyspell-mode)
+         (message-mode . (lambda () (setq fill-column 65
+                                     message-fill-column 65))))
   :custom-face
   :custom-face
-  (message-header-subject ((t (:foreground "navy blue" :weight semi-bold))))
-  (message-header-to ((t (:foreground "MidnightBlue" :weight semi-bold)))))
+  (message-header-subject ((t (:foreground "#111" :weight semi-bold))))
+  (message-header-to      ((t (:foreground "#111" :weight normal))))
+  (message-header-cc      ((t (:foreground "#333" :weight normal)))))
 
 (after! mml-sec
   (setq mml-secure-openpgp-encrypt-to-self t
 
 (after! mml-sec
   (setq mml-secure-openpgp-encrypt-to-self t