From b850248265cb3065af8780541833f3dbf5f8eb07 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Tue, 30 Aug 2022 15:11:48 +0800 Subject: gnus: accomodate the loss of gmail * gnus-conf.el (durand-gnus-file-name-to-article-number) (durand-gnus-notmuch-query): I used to store gmail mails on my computer, but I don't do that anymore, as I cannot figure out how to send mails using gmail and Emacs. So I just use the web interface if I really need to use the gmail account. I have to reflect this change in the gnus set up, otherwise gnus will try to view some non-existent mails. --- gnus-conf.el | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'gnus-conf.el') diff --git a/gnus-conf.el b/gnus-conf.el index 9347818..c57f7ff 100644 --- a/gnus-conf.el +++ b/gnus-conf.el @@ -182,18 +182,19 @@ groups, so that is a generalization I do not need, at present." (let* ((filebase (file-name-nondirectory filename)) (server (cond - ((string-match-p "mbsync/mymail/" filename) "durand") - ("gmail"))) + ((string-match-p "mbsync/mymail/" filename) "durand"))) (group (cond ((string-match-p "INBOX" filename) "private") ("sent")))) - (vector - (format "nnmaildir+%s:%s" server group) - (nnmaildir-base-name-to-article-number - (replace-regexp-in-string ":.*$" "" filebase) - group server) - 100))) + (cond + (server + (vector + (format "nnmaildir+%s:%s" server group) + (nnmaildir-base-name-to-article-number + (replace-regexp-in-string ":.*$" "" filebase) + group server) + 100))))) ;;;; Query function @@ -239,7 +240,9 @@ called with a universal argument \\[universal-argument]." results (apply #'vector - (mapcar #'durand-gnus-file-name-to-article-number results))) + (delq + nil + (mapcar #'durand-gnus-file-name-to-article-number results)))) ;; then read the articles (gnus-group-read-ephemeral-group (concat "nnselect-" (message-unique-id)) -- cgit v1.2.3-18-g5258