+** footnote
+
+Convenient footnotes in =message-mode=.
+
+#+begin_src emacs-lisp
+(use-package footnote
+ :after message
+ :bind
+ (:map message-mode-map
+ :prefix-map amin--footnote-prefix-map
+ :prefix "C-c f"
+ ("a" . footnote-add-footnote)
+ ("b" . footnote-back-to-message)
+ ("c" . footnote-cycle-style)
+ ("d" . footnote-delete-footnote)
+ ("g" . footnote-goto-footnote)
+ ("r" . footnote-renumber-footnotes)
+ ("s" . footnote-set-style))
+ :config
+ (setq footnote-start-tag ""
+ footnote-end-tag ""
+ footnote-style 'unicode))
+#+end_src
+
+** COMMENT supercite
+
+#+begin_src emacs-lisp
+(use-package supercite
+ :after message
+ :init
+ (setq sc-nested-citation-p t
+ ;; sc-cite-blank-lines-p t
+ sc-citation-leader ""
+ sc-reference-tag-string ""
+ sc-preferred-header-style 5 ; (sc-header-author-writes)
+ sc-auto-fill-region-p nil
+ sc-confirm-always-p nil)
+ :config
+ ;; (defun amin--sc-header-on-wrote ()
+ ;; "\"On <date>, <sc-author> wrote:\" unless:
+ ;; 1. the \"sc-author\" field cannot be found, in which case nothing is inserted;
+ ;; 2. the \"date\" field is missing in which case only the from part is printed."
+ ;; (let ((sc-mumble "")
+ ;; (whofrom (sc-whofrom)))
+ ;; (if whofrom
+ ;; (insert sc-reference-tag-string
+ ;; (sc-hdr "On " (sc-mail-field "date") ", ")
+ ;; (sc-hdr "" (sc-mail-field "sc-author")) " wrote:\n"))))
+ ;; (defun amin--sc-header ()
+ ;; "Hi <firstname>,\n\n <from> writes:"
+ ;; (let ((sc-mumble "")
+ ;; (whofrom (sc-whofrom)))
+ ;; (if whofrom
+ ;; (insert (sc-hdr "Hi " (sc-mail-field "sc-firstname") ",\n\n")
+ ;; sc-reference-tag-string
+ ;; whofrom
+ ;; " writes:\n"))))
+ ;; (add-to-list 'sc-rewrite-header-list '(amin--sc-header) t)
+ ;; (add-to-list 'sc-rewrite-header-list '(amin--sc-header-on-wrote) t)
+ ;; (setq sc-preferred-header-style (1- (length sc-rewrite-header-list)))
+ (add-hook 'mail-citation-hook 'sc-cite-original))
+#+end_src
+
+** ebdb
+
+#+begin_src emacs-lisp
+(use-package ebdb
+ :defer 1
+ :bind (:map gnus-group-mode-map ("e" . ebdb))
+ :config
+ (setq ebdb-sources (no-littering-expand-var-file-name "ebdb")))
+
+(use-package ebdb-com
+ :after ebdb)
+
+(use-package ebdb-complete
+ :after ebdb
+ :config
+ (ebdb-complete-enable))
+
+(use-package ebdb-gnus
+ :after ebdb)
+
+(use-package ebdb-message
+ :after ebdb)
+
+;; (use-package ebdb-vcard
+;; :after ebdb)
+#+end_src
+
+** COMMENT bbdb
+
+#+begin_comment
+[submodule "bbdb"]
+ path = lib/bbdb
+ url = https://git.savannah.nongnu.org/git/bbdb.git
+ load-path = lisp/elisp
+ info-path = doc
+ build-step = ./autogen.sh
+ build-step = ./configure --with-lispdir=elisp
+ build-step = make
+ build-step = make install
+#+end_comment
+
+#+begin_src emacs-lisp
+(use-package bbdb
+ :init
+ (bbdb-mua-auto-update-init 'message)
+ (setq bbdb-mua-auto-update-p 'query)
+ (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus))
+#+end_src
+
+** COMMENT message-x
+
+#+begin_src emacs-lisp
+(use-package message-x
+ :custom
+ (message-x-completion-alist
+ (quote
+ (("\\([rR]esent-\\|[rR]eply-\\)?[tT]o:\\|[bB]?[cC][cC]:" . gnus-harvest-find-address)
+ ((if
+ (boundp
+ (quote message-newgroups-header-regexp))
+ message-newgroups-header-regexp message-newsgroups-header-regexp)
+ . message-expand-group)))))
+#+end_src
+
+** COMMENT gnus-harvest
+
+#+begin_src emacs-lisp
+(use-package gnus-harvest
+ :commands gnus-harvest-install
+ :demand t
+ :config
+ (if (featurep 'message-x)
+ (gnus-harvest-install 'message-x)
+ (gnus-harvest-install)))
+#+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 <amin@aminb.org>"
+ nil ;; Organization
+ nil ;; extra headers
+ nil ;; extra body text
+ nil) ;; signature file
+ ("gnu"
+ nil
+ "Amin Bandali <bandali@gnu.org>"
+ nil
+ nil
+ nil
+ nil)
+ ("uw"
+ nil
+ "Amin Bandali <abandali@uwaterloo.ca>"
+ nil
+ (("Gcc" . "\"nnimap+uwaterloo:Sent Items\""))
+ nil
+ nil))
+ gnus-alias-identity-rules
+ '(("amin" ("Delivered-To" "<amin\\@aminb\\.org" both) "amin")
+ ("gnu" ("Delivered-To" "<gnu\\@aminb\\.org" both) "gnu")
+ ("uw" ("any" "<\\(.+\\)\\@uwaterloo\\.ca" both) "uw"))
+ gnus-alias-override-user-mail-address t)
+ :hook (message-setup . gnus-alias-determine-identity))
+#+end_src
+
+** COMMENT [[https://notmuchmail.org][notmuch]] :ARCHIVE: