summaryrefslogtreecommitdiff
path: root/gnus-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2022-08-30 15:11:48 +0800
committerJSDurand <mmemmew@gmail.com>2022-08-30 15:11:48 +0800
commitb850248265cb3065af8780541833f3dbf5f8eb07 (patch)
treeb882bd432014532494e7a079b9ac11cba87957e4 /gnus-conf.el
parent94c61bd7ebf3b04c09d24dadd57b2b4d463741de (diff)
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.
Diffstat (limited to 'gnus-conf.el')
-rw-r--r--gnus-conf.el21
1 files changed, 12 insertions, 9 deletions
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))