X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/4cf3b363c05dfeb1fccc4414be2b2454428c6f33..4368fb4ca309bde3ab3a790731f181f636995f65:/init.org diff --git a/init.org b/init.org index c784100..289b22b 100644 --- a/init.org +++ b/init.org @@ -704,7 +704,9 @@ In short, my favourite way of life. (setq org-src-tab-acts-natively t org-src-preserve-indentation nil org-edit-src-content-indentation 0 + org-email-link-description-format "Email %c: %s" ; %.30s org-log-done 'time) + :bind (:map org-mode-map ("M-L" . org-insert-last-stored-link)) :hook ((org-mode . org-indent-mode) (org-mode . auto-fill-mode) (org-mode . flyspell-mode)) @@ -1158,7 +1160,12 @@ TODO: break this giant source block down into individual org sections. ("S-SPC" . company-complete)) :config (require 'lean-input) - (setq default-input-method "Lean")) + (setq default-input-method "Lean" + lean-input-tweak-all '(lean-input-compose + (lean-input-prepend "/") + (lean-input-nonempty)) + lean-input-user-translations '(("/" "/"))) + (lean-input-setup)) #+end_src ** Haskell @@ -1756,22 +1763,26 @@ Hopefully temporary. ** Gnus -#+begin_src emacs-lisp :tangle yes -(setq amin-gnus-init-file (no-littering-expand-etc-file-name "gnus")) +#+begin_src emacs-lisp +(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 - :bind ("s-m" . gnus) + :bind (("s-m" . gnus) + ("s-M" . gnus-unplugged)) :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")) - gnus-secondary-select-methods - '((nnimap "uwaterloo" + (nnimap "uwaterloo" (nnimap-stream plain) (nnimap-address "127.0.0.1") (nnimap-server-port 143) @@ -1779,16 +1790,13 @@ Hopefully temporary. (nnimap-user "abandali@uwaterloo.ca"))) gnus-message-archive-group "nnimap:Sent" gnus-parameters - '(("amin" - (display . 20)) - ("uwaterloo" - (display . 20) - (posting-style - (address "abandali@uwaterloo.ca") - (gcc "\"nnimap+uwaterloo:Sent Items\"")))) + '(("gnu.*" + (gcc-self . t))) + gnus-large-newsgroup 50 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 @@ -1798,12 +1806,12 @@ Hopefully temporary. :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:" - "^Date:") + "^User-Agent:" "^Date:") ;; local-lapsed article dates ;; from https://www.emacswiki.org/emacs/GnusFormatting#toc11 gnus-article-date-headers '(user-defined) @@ -1819,8 +1827,9 @@ Hopefully temporary. (concat local lapsed)))) (bind-keys :map gnus-article-mode-map - ("r" . gnus-article-reply-with-original) - ("R" . gnus-article-wide-reply-with-original))) + ("r" . gnus-article-reply-with-original) + ("R" . gnus-article-wide-reply-with-original) + ("M-L" . org-store-link))) (use-package gnus-sum :bind (:map gnus-summary-mode-map @@ -1830,25 +1839,34 @@ Hopefully temporary. ("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))) - -(use-package nnmail - :config - (setq nnmail-extra-headers (append nnmail-extra-headers - '(List-Id X-RT-Originator)))) + ("r" . gnus-summary-reply-with-original) + ("R" . gnus-summary-wide-reply-with-original) + ("M-L" . org-store-link))) (use-package gnus-msg :config (setq gnus-posting-styles - '(((header "delivered-to" "amin@aminb.org") + '((".*" (address "amin@aminb.org")) - ((header "delivered-to" "gnu@aminb.org") - (address "bandali@gnu.org"))))) + ("gnu.*" + (address "bandali@gnu.org")) + ("nnimap\\+uwaterloo:.*" + (address "abandali@uwaterloo.ca") + (gcc "\"nnimap+uwaterloo:Sent Items\""))))) + +(use-package gnus-topic + :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 + :config + (setq gnus-permanently-visible-groups "\\((INBOX\\|gnu$\\)")) (use-package mm-decode :config @@ -1874,19 +1892,17 @@ Hopefully temporary. (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") - ;; (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 - (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 @@ -1944,6 +1960,47 @@ variables. This is useful for a regi `begin' frame-entry." nil)) #+end_src +** COMMENT gnus-alias :ARCHIVE: + +#+begin_src emacs-lisp +(use-package gnus-alias + :commands (gnus-alias-determine-identity + gnus-alias-select-identity) + :bind (:map message-mode-map + ("s-i" . gnus-alias-select-identity)) + :config + (setq + gnus-alias-default-identity "amin" + gnus-alias-identity-alist + '(("amin" + nil ;; Does not refer to any other identity + "Amin Bandali " + nil ;; Organization + nil ;; extra headers + nil ;; extra body text + nil) ;; signature file + ("gnu" + nil + "Amin Bandali " + nil + nil + nil + nil) + ("uw" + nil + "Amin Bandali " + nil + (("Gcc" . "\"nnimap+uwaterloo:Sent Items\"")) + nil + nil)) + gnus-alias-identity-rules + '(("amin" ("Delivered-To" "