[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ee11a68: Remove ephemeral group on error or null result
From: |
Andrew G Cohen |
Subject: |
master ee11a68: Remove ephemeral group on error or null result |
Date: |
Mon, 9 Nov 2020 19:24:56 -0500 (EST) |
branch: master
commit ee11a68320eeb8bb90ded9773c02d7863abca3d7
Author: Andrew G Cohen <cohen@andy.bu.edu>
Commit: Andrew G Cohen <cohen@andy.bu.edu>
Remove ephemeral group on error or null result
* lisp/gnus/nnselect.el (nnselect-request-group): If an ephemeral
group is empty, there is nothing to see, so remove the group.
(nnselect-run): Catch and return an empty artlist on error.
---
lisp/gnus/nnselect.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el
index ce2e99d..e4753fe 100644
--- a/lisp/gnus/nnselect.el
+++ b/lisp/gnus/nnselect.el
@@ -295,6 +295,10 @@ If this variable is nil, or if the provided function
returns nil,
(if (zerop (setq length (nnselect-artlist-length nnselect-artlist)))
(progn
(nnheader-report 'nnselect "Selection produced empty results.")
+ (when (gnus-ephemeral-group-p group)
+ (gnus-kill-ephemeral-group group)
+ (setq gnus-ephemeral-servers
+ (assq-delete-all 'nnselect gnus-ephemeral-servers)))
(nnheader-insert ""))
(with-current-buffer nntp-server-buffer
(nnheader-insert "211 %d %d %d %s\n"
@@ -769,8 +773,10 @@ If this variable is nil, or if the provided function
returns nil,
Return an article list."
(let ((func (alist-get 'nnselect-function specs))
(args (alist-get 'nnselect-args specs)))
- (funcall func args)))
-
+ (condition-case err
+ (funcall func args)
+ (error (gnus-error 3 "nnselect-run: %s on %s gave error %s" func args
err)
+ []))))
(defun nnselect-search-thread (header)
"Make an nnselect group containing the thread with article HEADER.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ee11a68: Remove ephemeral group on error or null result,
Andrew G Cohen <=