emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2e4b885: Don't try to save articles in Gnus that ha


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 2e4b885: Don't try to save articles in Gnus that have disappeared
Date: Tue, 9 Jul 2019 12:44:51 -0400 (EDT)

branch: master
commit 2e4b885478421ea7512ffa9d51d7892fafaae99d
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Don't try to save articles in Gnus that have disappeared
    
    * lisp/gnus/gnus-sum.el (gnus-summary-save-article): Stop trying
    to save articles if the articles have disappeared (bug#35188).
---
 lisp/gnus/gnus-sum.el | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index acc4132..7f6b936 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -12188,11 +12188,15 @@ performed."
        (save-window-excursion
          (gnus-summary-select-article decode decode nil article)
          (gnus-summary-goto-subject article))
-       (with-current-buffer save-buffer
-         (erase-buffer)
-         (insert-buffer-substring (if decode
-                                      gnus-article-buffer
-                                    gnus-original-article-buffer)))
+       ;; The article may have expired.
+       (let ((art-buf (if decode
+                          gnus-article-buffer
+                        gnus-original-article-buffer)))
+         (when (zerop (buffer-size (get-buffer art-buf)))
+           (error "Couldn't select article %s" article))
+         (with-current-buffer save-buffer
+           (erase-buffer)
+           (insert-buffer-substring art-buf)))
        (setq file (gnus-article-save save-buffer file num))
        (gnus-summary-remove-process-mark article)
        (unless not-saved



reply via email to

[Prev in Thread] Current Thread [Next in Thread]