emacs-diffs
[Top][All Lists]
Advanced

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

master 99d1a66: Make the "All" setting for large-newsgroup-initial in Gn


From: Lars Ingebrigtsen
Subject: master 99d1a66: Make the "All" setting for large-newsgroup-initial in Gnus work
Date: Sun, 2 Aug 2020 08:32:30 -0400 (EDT)

branch: master
commit 99d1a66646b7450ad0be3e4471341b50fee7bdb5
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make the "All" setting for large-newsgroup-initial in Gnus work
    
    * lisp/gnus/gnus-sum.el (gnus-articles-to-read): Use it.
    (gnus-summary-insert-old-articles): Ditto.
    
    * lisp/gnus/gnus.el (large-newsgroup-initial): Make the "All"
    setting work by using a special symbol, instead of nil which is
    indistinguishable from not being present (bug#38466).
---
 etc/NEWS              |  6 ++++++
 lisp/gnus/gnus-sum.el | 17 +++++++++++------
 lisp/gnus/gnus.el     |  2 +-
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index fab2d85..492d01f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -207,6 +207,12 @@ Bookmark locations can refer to VC directory buffers.
 
 ** Gnus
 
+---
+*** The value of "all" in the 'large-newsgroup-initial' group parameter 
changes.
+It was previously nil, which didn't work, because nil is
+indistinguishable from not being present.  The new value for "all" is
+the symbol 'all'.
+
 +++
 *** The name of dependent Gnus sessions has changed from "slave" to "child".
 The names of the commands 'gnus-slave', 'gnus-slave-no-server' and
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index c1216a0..719498a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -5938,7 +5938,9 @@ If SELECT-ARTICLES, only select those articles from 
GROUP."
                         (initial (gnus-parameter-large-newsgroup-initial
                                   gnus-newsgroup-name))
                         (default (if only-read-p
-                                     (or initial gnus-large-newsgroup)
+                                     (if (eq initial 'all)
+                                         nil
+                                       (or initial gnus-large-newsgroup))
                                    number))
                         (input
                          (read-string
@@ -13165,10 +13167,13 @@ If ALL is a number, fetch this number of articles."
         (t
          (when (and (numberp gnus-large-newsgroup)
                   (> len gnus-large-newsgroup))
-             (let* ((cursor-in-echo-area nil)
-                    (initial (gnus-parameter-large-newsgroup-initial
-                              gnus-newsgroup-name))
-                    (input
+             (let ((cursor-in-echo-area nil)
+                   (initial (gnus-parameter-large-newsgroup-initial
+                             gnus-newsgroup-name))
+                   input)
+               (when (eq initial 'all)
+                 (setq initial len))
+               (setq input
                      (read-string
                       (format
                        "How many articles from %s (%s %d): "
@@ -13177,7 +13182,7 @@ If ALL is a number, fetch this number of articles."
                        len)
                       nil nil
                       (and initial
-                           (number-to-string initial)))))
+                           (number-to-string initial))))
                (unless (string-match "^[ \t]*$" input)
                  (setq all (string-to-number input))
                  (if (< all len)
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 69f2bb2..68e2ce7 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1591,7 +1591,7 @@ posting an article."
  "Alist of group regexps and its initial input of the number of articles."
  :variable-group gnus-group-parameter
  :parameter-type '(choice :tag "Initial Input for Large Newsgroup"
-                         (const :tag "All" nil)
+                         (const :tag "All" 'all)
                          (integer))
  :parameter-document "\
 



reply via email to

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