emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 544b996 1/2: Only save .newsrc file if the native m


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 544b996 1/2: Only save .newsrc file if the native method is NNTP
Date: Wed, 25 Jan 2017 18:30:45 +0000 (UTC)

branch: master
commit 544b996915b9a06050b1a80c690749649dacb9d3
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Only save .newsrc file if the native method is NNTP
    
    * lisp/gnus/gnus-start.el (gnus-save-newsrc-file): Only save
    the .newsrc file if the native select method is NNTP
    (bug#18198).  This avoids problems with invalid IMAP group
    names and the like in the .newsrc file.
---
 lisp/gnus/gnus-start.el |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 47e33af..be46339 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2801,8 +2801,13 @@ If FORCE is non-nil, the .newsrc file is read."
        (gnus-run-hooks 'gnus-save-newsrc-hook)
        (if gnus-slave
            (gnus-slave-save-newsrc)
-         ;; Save .newsrc.
-         (when gnus-save-newsrc-file
+         ;; Save .newsrc only if the select method is an NNTP method.
+         ;; The .newsrc file is for interoperability with other
+         ;; newsreaders, so saving non-NNTP groups there doesn't make
+         ;; much sense.
+         (when (and gnus-save-newsrc-file
+                    (eq (car (gnus-server-to-method gnus-select-method))
+                        'nntp))
            (gnus-message 8 "Saving %s..." gnus-current-startup-file)
            (gnus-gnus-to-newsrc-format)
            (gnus-message 8 "Saving %s...done" gnus-current-startup-file))



reply via email to

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