From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: Katsumi Yamaoka <yamaoka@jpl.org>, 35383@debbugs.gnu.org
Subject: bug#35383: 27.0.50; Complete process of decoding Gnus group names
Date: Sat, 18 May 2019 23:12:30 +0100 [thread overview]
Message-ID: <87r28v76pd.fsf@tcd.ie> (raw)
In-Reply-To: <87ef4v4iii.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Sat, 18 May 2019 13:25:41 -0700")
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
Eric Abrahamsen <eric@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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: gnus-start.diff --]
[-- Type: text/x-diff, Size: 1014 bytes --]
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)
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
Thanks,
--
Basil
next prev parent reply other threads:[~2019-05-18 22:12 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-22 18:39 bug#35383: 27.0.50; Complete process of decoding Gnus group names Eric Abrahamsen
2019-04-23 8:12 ` Katsumi Yamaoka
2019-04-23 19:55 ` Eric Abrahamsen
2019-04-24 8:06 ` Katsumi Yamaoka
2019-04-24 17:04 ` Eric Abrahamsen
2019-04-24 23:48 ` Katsumi Yamaoka
2019-04-25 16:10 ` Eric Abrahamsen
2019-04-26 5:21 ` Katsumi Yamaoka
2019-04-26 6:53 ` Eli Zaretskii
2019-04-26 8:08 ` Katsumi Yamaoka
2019-04-26 10:55 ` Eli Zaretskii
2019-04-29 4:05 ` Eric Abrahamsen
2019-04-29 4:07 ` Eric Abrahamsen
2019-04-29 15:41 ` Eli Zaretskii
2019-04-29 20:04 ` Eric Abrahamsen
2019-04-30 3:55 ` Eli Zaretskii
2019-04-30 17:03 ` Eric Abrahamsen
2019-04-30 17:11 ` Eli Zaretskii
2019-04-30 17:19 ` Eric Abrahamsen
2019-04-30 17:44 ` Eli Zaretskii
2019-04-30 18:17 ` Eric Abrahamsen
2019-04-29 15:38 ` Eli Zaretskii
2019-05-13 0:32 ` Katsumi Yamaoka
2019-05-13 20:14 ` Eric Abrahamsen
2019-05-18 20:25 ` Eric Abrahamsen
2019-05-18 22:12 ` Basil L. Contovounesios [this message]
2019-05-18 23:23 ` Eric Abrahamsen
2019-05-19 1:03 ` Basil L. Contovounesios
2019-05-19 2:56 ` Eric Abrahamsen
2019-05-19 17:02 ` Eric Abrahamsen
2019-06-10 23:19 ` Katsumi Yamaoka
2019-06-11 0:03 ` Eric Abrahamsen
2019-06-11 4:33 ` Eric Abrahamsen
2019-06-11 8:09 ` Katsumi Yamaoka
2019-04-23 15:42 ` Andy Moreton
2019-04-23 21:42 ` Eric Abrahamsen
2019-04-23 22:58 ` Andy Moreton
2019-06-17 6:06 ` Eric Abrahamsen
2019-06-17 12:12 ` Deus Max
2019-06-17 16:22 ` Eric Abrahamsen
2019-06-19 20:57 ` Deus Max
2019-06-19 21:02 ` Deus Max
2019-06-19 21:40 ` Eric Abrahamsen
2019-06-20 13:00 ` Deus Max
2019-06-20 16:29 ` Eric Abrahamsen
2019-06-20 19:01 ` Deus Max
2019-06-20 19:16 ` Eric Abrahamsen
2019-06-21 20:59 ` Eric Abrahamsen
2019-06-22 14:44 ` Deus Max
2019-06-22 16:09 ` Eric Abrahamsen
2019-06-23 10:27 ` Deus Max
2019-07-08 3:09 ` Eric Abrahamsen
2019-07-08 19:46 ` Deus Max
2019-07-23 23:52 ` Eric Abrahamsen
2019-07-30 23:00 ` Eric Abrahamsen
2019-08-01 12:07 ` Lars Ingebrigtsen
2019-08-01 16:22 ` Eric Abrahamsen
2019-08-03 21:53 ` Eric Abrahamsen
2019-09-27 14:58 ` Lars Ingebrigtsen
2019-06-19 21:28 ` Deus Max
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r28v76pd.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=35383@debbugs.gnu.org \
--cc=eric@ericabrahamsen.net \
--cc=yamaoka@jpl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).