summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-05-06 00:42:45 +0100
committerjao <jao@gnu.org>2022-05-06 00:42:45 +0100
commit7be8765df1efdb3276915cedafd82bb059bd4de4 (patch)
treed293fc1dfd3a21b25b02bd5b9c763599a7d70bfd
parent2fa391e20929f2de4535a496d5487231ab4fd27e (diff)
downloadelibs-7be8765df1efdb3276915cedafd82bb059bd4de4.tar.gz
elibs-7be8765df1efdb3276915cedafd82bb059bd4de4.tar.bz2
email nits
-rw-r--r--email.org4
-rw-r--r--gnus.org5
-rw-r--r--init.org2
-rw-r--r--lib/net/jao-notmuch-gnus.el7
4 files changed, 11 insertions, 7 deletions
diff --git a/email.org b/email.org
index 9674df8..7004730 100644
--- a/email.org
+++ b/email.org
@@ -315,7 +315,9 @@
(add-hook 'diary-list-entries-hook 'bbdb-anniv-diary-entries)
(setq bbdb-file (expand-file-name "~/.emacs.d/bbdb"))
- (bbdb-initialize 'message 'pgp 'gnus 'mail))
+ (if jao-notmuch-enabled
+ (bbdb-initialize 'message 'pgp)
+ (bbdb-initialize 'message 'pgp 'gnus)))
#+end_src
* mailboxes
#+begin_src emacs-lisp
diff --git a/gnus.org b/gnus.org
index 36ec6ff..c0c0346 100644
--- a/gnus.org
+++ b/gnus.org
@@ -183,8 +183,7 @@
(when jao-gnus-use-nnml
(add-to-list
'gnus-secondary-select-methods
- `(nnml "" ,(jao-gnus--notmuch-engine "~/var/mail/gnus/"
- "notmuch.config"))))
+ `(nnml "" ,(jao-gnus--notmuch-engine (jao-gnus-dir "Mail") "notmuch.config"))))
(defvar jao-gnus-nnml-group-params
`(("nnml:\\(local\\|trash\\|spam\\)"
@@ -713,6 +712,8 @@
#+begin_src emacs-lisp
(require 'jao-notmuch-gnus)
+ (jao-notmuch-gnus-auto-tag)
+
(defun jao-gnus-toggle-todo ()
(interactive)
(jao-notmuch-gnus-toggle-tags '("todo")))
diff --git a/init.org b/init.org
index 0bddfac..37356f9 100644
--- a/init.org
+++ b/init.org
@@ -1747,7 +1747,7 @@
* Email
#+begin_src emacs-lisp
(setq jao-afio-mail-function 'notmuch)
- ;; (setq jao-afio-mail-function 'gnus)
+ (setq jao-afio-mail-function 'gnus)
(jao-load-org "email")
#+end_src
* PDFs and other docs
diff --git a/lib/net/jao-notmuch-gnus.el b/lib/net/jao-notmuch-gnus.el
index c64b9f0..e18c5a1 100644
--- a/lib/net/jao-notmuch-gnus.el
+++ b/lib/net/jao-notmuch-gnus.el
@@ -96,8 +96,9 @@
(notmuch-tag (concat "id:" id)
(mapcar (lambda (x) (concat "+" x)) to-tags)))))
-(add-hook 'gnus-summary-article-move-hook #'jao-notmuch-gnus-tag-on-move)
-(add-hook 'gnus-summary-article-expire-hook #'jao-notmuch-gnus-tag-on-move)
+(defun jao-notmuch-gnus-auto-tag ()
+ (add-hook 'gnus-summary-article-move-hook #'jao-notmuch-gnus-tag-on-move)
+ (add-hook 'gnus-summary-article-expire-hook #'jao-notmuch-gnus-tag-on-move))
;;;; Displaying search results in Gnus
@@ -112,7 +113,7 @@
"Directory where leafnode stores its messages as seen by notmuch.")
(defun jao-notmuch-gnus-file-to-group (file &optional maildir newsdir)
- "Calculate the Gnus group name from the given file name.
+ "Compute the Gnus group name from the given file name.
Example:
IN: /home/jao/var/mail/jao/foo/cur/1259184569.M4818P3384.localhost,W=6921:2,S