From 00f3ab948b01938eb2817f544a3903b7a31d8034 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Tue, 13 Aug 2019 00:28:15 +0200 Subject: Add customisations from neptun --- dot.emacs.d/init.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dot.emacs.d') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 98f4275..7d4ff3d 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -305,10 +305,10 @@ (nntp-open-connection-function nntp-open-ssl-stream) (nntp-port-number 563)) gnus-secondary-select-methods '((nnmaildir "mail" - (directory "~/.nnmaildir") + (directory "~/.maildir") (nnir-search-engine notmuch))) - nnir-notmuch-program "/home/qsx/.local/bin/notmuch-gnus" - nnir-notmuch-remove-prefix (concat (getenv "HOME") "/.nnmaildir/")) + ;; nnir-notmuch-program "/home/qsx/.local/bin/notmuch-gnus" + nnir-notmuch-remove-prefix (concat (getenv "HOME") "/.maildir/")) (add-hook 'message-setup-hook (defun qsx-message-add-my-headers () (message-add-header "Openpgp: id=E384009D3B54DCD321BF953295EE94A432583DB1; url=https://pgp.mit.edu/pks/lookup?op=get&search=0x95EE94A432583DB1; preference=signencrypt")))) -- cgit v1.2.3 From b70cd547a7a41f29e83b6e49bfbeaebf4cb9a452 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Wed, 5 May 2021 22:31:25 +0200 Subject: Emacs: Configure Gnus maildir dynamically --- dot.emacs.d/init.el | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'dot.emacs.d') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index 102bbe0..c758232 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -297,11 +297,22 @@ 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 "~/.maildir") - (nnir-search-engine notmuch))) - ;; nnir-notmuch-program "/home/qsx/.local/bin/notmuch-gnus" - nnir-notmuch-remove-prefix (concat (getenv "HOME") "/.maildir/")) + nnir-notmuch-program (let ((notmuch-gnus "/home/qsx/.local/bin/notmuch-gnus")) + (if (file-executable-p notmuch-gnus) + notmuch-gnus + "notmuch"))) + (let ((maildir (cl-find-if #'file-directory-p + (mapcar (lambda (x) (concat (getenv "HOME") x)) + '("/.nnmaildir" + "/.maildir" + "/Maildir"))))) + (setq + gnus-secondary-select-methods `((nnmaildir + "mail" + (directory ,maildir) + (nnir-search-engine notmuch))) + nnir-notmuch-remove-prefix (concat maildir "/"))) + (add-hook 'message-setup-hook (defun qsx-message-add-my-headers () (message-add-header "Openpgp: id=E384009D3B54DCD321BF953295EE94A432583DB1; url=https://pgp.mit.edu/pks/lookup?op=get&search=0x95EE94A432583DB1; preference=signencrypt")))) -- cgit v1.2.3 From b817515621178f72be4e5c5017bd65b66e7aaa4d Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Fri, 18 Feb 2022 18:12:58 +0100 Subject: Emacs/Gnus: Dynamic notmuch path configuration --- dot.emacs.d/init.el | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'dot.emacs.d') diff --git a/dot.emacs.d/init.el b/dot.emacs.d/init.el index c758232..441b922 100644 --- a/dot.emacs.d/init.el +++ b/dot.emacs.d/init.el @@ -296,25 +296,27 @@ 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)) - nnir-notmuch-program (let ((notmuch-gnus "/home/qsx/.local/bin/notmuch-gnus")) - (if (file-executable-p notmuch-gnus) - notmuch-gnus - "notmuch"))) + (nntp-port-number 563))) (let ((maildir (cl-find-if #'file-directory-p (mapcar (lambda (x) (concat (getenv "HOME") x)) '("/.nnmaildir" "/.maildir" - "/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) - (nnir-search-engine notmuch))) - nnir-notmuch-remove-prefix (concat maildir "/"))) - + 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://pgp.mit.edu/pks/lookup?op=get&search=0x95EE94A432583DB1; preference=signencrypt")))) + (message-add-header "Openpgp: id=E384009D3B54DCD321BF953295EE94A432583DB1; url=https://pgp.mit.edu/pks/lookup?op=get&search=0x95EE94A432583DB1; preference=signencrypt")))) (use-package gnus-alias :ensure t -- cgit v1.2.3