diff options
| author | Thomas Schneider <qsx@chaotikum.eu> | 2022-02-18 22:47:03 +0100 |
|---|---|---|
| committer | Thomas Schneider <qsx@chaotikum.eu> | 2022-02-18 22:47:03 +0100 |
| commit | 7aa3b36e8e43ad0e928eddb60317a77e4bedd0a1 (patch) | |
| tree | bf5dab6ce49324109237c1eb16fdcd7169411e95 /dot.emacs.d/init.el | |
| parent | 59af744246f38fb3c1cba33d06e680d29f866abd (diff) | |
| parent | 63114f91e90c1601b9ed8adc1344079fe0018aac (diff) | |
Merge branch 'neptun'
Diffstat (limited to 'dot.emacs.d/init.el')
| -rw-r--r-- | dot.emacs.d/init.el | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index f56523e..87e338b 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -337,12 +337,25 @@ smime-CA-directory "/etc/ssl/certs" gnus-select-method '(nntp "news.cis.dfn.de" (nntp-open-connection-function nntp-open-ssl-stream) - (nntp-port-number 563)) - gnus-secondary-select-methods '((nnmaildir "mail" - (directory "~/.nnmaildir") - (nnir-search-engine notmuch))) - nnir-notmuch-program "/home/qsx/.local/bin/notmuch-gnus" - nnir-notmuch-remove-prefix (concat (getenv "HOME") "/.nnmaildir/")) + (nntp-port-number 563))) + (let ((maildir (cl-find-if #'file-directory-p + (mapcar (lambda (x) (concat (getenv "HOME") x)) + '("/.nnmaildir" + "/.maildir" + "/Maildir")))) + (notmuch (let ((notmuch-gnus (concat (getenv "HOME") "/.local/bin/notmuch-gnus"))) + (if (file-executable-p notmuch-gnus) + notmuch-gnus + "notmuch"))) + (notmuch-database-path (car (process-lines "notmuch" "config" "get" "database.path")))) + (setq + gnus-secondary-select-methods + `((nnmaildir + "mail" + (directory ,maildir) + (gnus-search-engine gnus-search-notmuch + (program ,notmuch) + (remove-prefix ,(concat notmuch-database-path "/"))))))) (add-hook 'message-setup-hook (defun qsx-message-add-my-headers () (message-add-header "Openpgp: id=E384009D3B54DCD321BF953295EE94A432583DB1; url=https://keys.openpgp.org/vks/v1/by-fingerprint/E384009D3B54DCD321BF953295EE94A432583DB1; preference=signencrypt")))) |
