GNU bug report logs -
#35383
27.0.50; Complete process of decoding Gnus group names
Previous Next
Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Date: Mon, 22 Apr 2019 18:42:02 UTC
Severity: normal
Tags: fixed
Found in version 27.0.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> The attached patch should go into master, and then master merged into
> scratch/gnus-decoded.
[...]
> diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
> index 2f8a260bf1..16d167613e 100644
> --- a/lisp/gnus/gnus-start.el
> +++ b/lisp/gnus/gnus-start.el
> @@ -583,11 +583,11 @@ gnus-subscribe-randomly
>
> (defun gnus-subscribe-alphabetically (newgroup)
> "Subscribe new NEWGROUP and insert it in alphabetical order."
> - (let ((groups (cdr gnus-newsrc-alist))
> + (let ((groups (cdr gnus-group-list))
> before)
> (while (and (not before) groups)
> - (if (string< newgroup (caar groups))
> - (setq before (caar groups))
> + (if (string< newgroup (car groups))
> + (setq before (car groups))
> (setq groups (cdr groups))))
> (gnus-subscribe-newsgroup newgroup before)))
I noticed gnus-start.el (already) uses seq.el functions without first
loading the library, so how about the following minor addendum?
[gnus-start.diff (text/x-diff, inline)]
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 16d167613e..c1e55e4e25 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -31,6 +31,7 @@
(require 'gnus-range)
(require 'gnus-util)
(require 'gnus-cloud)
+(require 'seq)
(autoload 'message-make-date "message")
(autoload 'gnus-agent-read-servers-validate "gnus-agent")
(autoload 'gnus-agent-save-local "gnus-agent")
@@ -583,12 +584,9 @@ gnus-subscribe-randomly
(defun gnus-subscribe-alphabetically (newgroup)
"Subscribe new NEWGROUP and insert it in alphabetical order."
- (let ((groups (cdr gnus-group-list))
- before)
- (while (and (not before) groups)
- (if (string< newgroup (car groups))
- (setq before (car groups))
- (setq groups (cdr groups))))
+ (let ((before (seq-find (lambda (group)
+ (string< newgroup group))
+ (cdr gnus-group-list))))
(gnus-subscribe-newsgroup newgroup before)))
(defun gnus-subscribe-hierarchically (newgroup)
[Message part 3 (text/plain, inline)]
Thanks,
--
Basil
This bug report was last modified 5 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.