all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#35233: 27.0.50; Error in gnus-group-describe-all-groups
@ 2019-04-11 16:54 Basil L. Contovounesios
  2019-04-11 16:59 ` Basil L. Contovounesios
  2019-04-11 17:57 ` Eric Abrahamsen
  0 siblings, 2 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2019-04-11 16:54 UTC (permalink / raw)
  To: 35233; +Cc: Eric Abrahamsen, Katsumi Yamaoka

The recent move to hash-tables[1] introduced the following regression:

0. HOME=$(mktemp -d) emacs -Q
1. (setq gnus-select-method '(nntp "news.gwene.org")) C-j
2. M-x gnus RET s M-d
   Wrong number of arguments: #<subr sort>, 1

Passing string-lessp to sort further leads to the following:

3. Steps 0-2 as above.
   Wrong type argument: vectorp, #s(hash-table ...)

Replacing (intern group gnus-description-hashtb) with just group, and
repeating steps 0-2 as above, reveals that
gnus-group-describe-all-groups inserts the group name twice, rather than
the group name followed by its description.  This regression predates
the move to hash-tables[2].

[1: c1b63af445]: Change Gnus hash tables into real hash tables
  2019-03-22 10:23:30 -0700
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c1b63af4458e92bad33da0def2b15c206656e2fa

[2: 3982245371]: Sort groups before inserting them into the group buffer
  2016-02-13 18:45:11 +1100
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3982245371c0b8e17b4d96d16ed4b1d87c0ffc25

Patch fixing these to follow.

-- 
Basil

Gnus v5.13
In GNU Emacs 27.0.50 (build 9, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2019-04-11 built on thunk
Repository revision: 0627a8d7bc6ffa29d7a503fd36e760778ecb9fa1
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12003000
System Description: Debian GNU/Linux buster/sid





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#35233: 27.0.50; Error in gnus-group-describe-all-groups
  2019-04-11 16:54 bug#35233: 27.0.50; Error in gnus-group-describe-all-groups Basil L. Contovounesios
@ 2019-04-11 16:59 ` Basil L. Contovounesios
  2019-04-11 17:57 ` Eric Abrahamsen
  1 sibling, 0 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2019-04-11 16:59 UTC (permalink / raw)
  To: 35233; +Cc: Eric Abrahamsen, Katsumi Yamaoka

[-- Attachment #1: Type: text/plain, Size: 23 bytes --]

tags 35233 patch
quit


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-gnus-group-describe-all-groups-bug-35233.patch --]
[-- Type: text/x-diff, Size: 2159 bytes --]

From 6402b26d5fb0340b90cd5647a6799fff2cb35e43 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Thu, 11 Apr 2019 17:16:00 +0100
Subject: [PATCH] Fix gnus-group-describe-all-groups (bug#35233)

This fixes oversights from
2018-04-26T16:26:27-07:00!eric@ericabrahamsen.net and
2016-02-13T18:45:11+11:00!larsi@gnus.org.
* lisp/gnus/gnus-group.el (gnus-group-describe-all-groups): Insert
group name and description instead of group name twice.  Do not pass
a hash-table to intern.  Call sort with correct number of arguments.
---
 lisp/gnus/gnus-group.el | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 144496bdd2..e1554cab8a 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4149,20 +4149,19 @@ gnus-group-describe-all-groups
   (when (not (or gnus-description-hashtb
 		 (gnus-read-all-descriptions-files)))
     (error "Couldn't request descriptions file"))
-  (let ((buffer-read-only nil)
-	(groups (sort (hash-table-keys gnus-description-hashtb)))
-	b)
+  (let ((buffer-read-only nil))
     (erase-buffer)
-    (dolist (group groups)
-      (setq b (point))
-      (let ((charset (gnus-group-name-charset nil group)))
+    (dolist (group (sort (hash-table-keys gnus-description-hashtb) #'string<))
+      (let ((b (point))
+            (desc (gethash group gnus-description-hashtb))
+            (charset (gnus-group-name-charset nil group)))
 	(insert (format "      *: %-20s %s\n"
 			(gnus-group-name-decode group charset)
-			(gnus-group-name-decode group charset))))
-      (add-text-properties
-       b (1+ b) (list 'gnus-group (intern group gnus-description-hashtb)
-		      'gnus-unread t 'gnus-marked nil
-		      'gnus-level (1+ gnus-level-subscribed))))
+                        (gnus-group-name-decode desc charset)))
+        (add-text-properties
+         b (1+ b) (list 'gnus-group group
+                        'gnus-unread t 'gnus-marked nil
+                        'gnus-level (1+ gnus-level-subscribed)))))
     (goto-char (point-min))
     (gnus-group-position-point)))
 
-- 
2.20.1


[-- Attachment #3: Type: text/plain, Size: 128 bytes --]


"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> Patch fixing these to follow.

I attach said patch.

Thanks,

-- 
Basil

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#35233: 27.0.50; Error in gnus-group-describe-all-groups
  2019-04-11 16:54 bug#35233: 27.0.50; Error in gnus-group-describe-all-groups Basil L. Contovounesios
  2019-04-11 16:59 ` Basil L. Contovounesios
@ 2019-04-11 17:57 ` Eric Abrahamsen
  2019-04-11 20:02   ` Basil L. Contovounesios
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2019-04-11 17:57 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Katsumi Yamaoka, 35233

"Basil L. Contovounesios" <contovob@tcd.ie> writes:

> The recent move to hash-tables[1] introduced the following regression:
>
> 0. HOME=$(mktemp -d) emacs -Q
> 1. (setq gnus-select-method '(nntp "news.gwene.org")) C-j
> 2. M-x gnus RET s M-d
>    Wrong number of arguments: #<subr sort>, 1
>
> Passing string-lessp to sort further leads to the following:
>
> 3. Steps 0-2 as above.
>    Wrong type argument: vectorp, #s(hash-table ...)
>
> Replacing (intern group gnus-description-hashtb) with just group, and
> repeating steps 0-2 as above, reveals that
> gnus-group-describe-all-groups inserts the group name twice, rather than
> the group name followed by its description.  This regression predates
> the move to hash-tables[2].
>
> [1: c1b63af445]: Change Gnus hash tables into real hash tables
>   2019-03-22 10:23:30 -0700
>   https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c1b63af4458e92bad33da0def2b15c206656e2fa
>
> [2: 3982245371]: Sort groups before inserting them into the group buffer
>   2016-02-13 18:45:11 +1100
>   https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3982245371c0b8e17b4d96d16ed4b1d87c0ffc25
>
> Patch fixing these to follow.

Ugh, thank you for catching those very stupid mistakes!





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#35233: 27.0.50; Error in gnus-group-describe-all-groups
  2019-04-11 17:57 ` Eric Abrahamsen
@ 2019-04-11 20:02   ` Basil L. Contovounesios
  2019-04-11 20:42     ` Eric Abrahamsen
  0 siblings, 1 reply; 6+ messages in thread
From: Basil L. Contovounesios @ 2019-04-11 20:02 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: Katsumi Yamaoka, 35233

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> Patch fixing these to follow.
>
> Ugh, thank you for catching those very stupid mistakes!

No worries, I take that as permission to push (after waiting a day or
two). :)

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#35233: 27.0.50; Error in gnus-group-describe-all-groups
  2019-04-11 20:02   ` Basil L. Contovounesios
@ 2019-04-11 20:42     ` Eric Abrahamsen
  2019-04-14  1:11       ` Basil L. Contovounesios
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Abrahamsen @ 2019-04-11 20:42 UTC (permalink / raw)
  To: Basil L. Contovounesios; +Cc: Katsumi Yamaoka, 35233


On 04/11/19 21:02 PM, Basil L. Contovounesios wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>>
>>> Patch fixing these to follow.
>>
>> Ugh, thank you for catching those very stupid mistakes!
>
> No worries, I take that as permission to push (after waiting a day or
> two). :)

Inasmuch as my "permission" means anything, yes :)





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#35233: 27.0.50; Error in gnus-group-describe-all-groups
  2019-04-11 20:42     ` Eric Abrahamsen
@ 2019-04-14  1:11       ` Basil L. Contovounesios
  0 siblings, 0 replies; 6+ messages in thread
From: Basil L. Contovounesios @ 2019-04-14  1:11 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: 35233-done, Katsumi Yamaoka

tags 35233 fixed
close 35233
quit

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> On 04/11/19 21:02 PM, Basil L. Contovounesios wrote:
>> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>>
>>> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>>>
>>>> Patch fixing these to follow.
>>>
>>> Ugh, thank you for catching those very stupid mistakes!
>>
>> No worries, I take that as permission to push (after waiting a day or
>> two). :)
>
> Inasmuch as my "permission" means anything, yes :)

I'd rather be blamed for programming oversights than failing to ask and
waiting for a review. ;) Plus your recent efforts in this area afford
you a certain level of "ownership".

I've pushed the patch to master[1] and am thus closing this report.

[1: c49f5d573b]: Fix gnus-group-describe-all-groups (bug#35233)
  2019-04-14 01:58:47 +0100
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=c49f5d573b37f7aaa8d480d568c7e26d975f0320

Thanks,

-- 
Basil





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-14  1:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-11 16:54 bug#35233: 27.0.50; Error in gnus-group-describe-all-groups Basil L. Contovounesios
2019-04-11 16:59 ` Basil L. Contovounesios
2019-04-11 17:57 ` Eric Abrahamsen
2019-04-11 20:02   ` Basil L. Contovounesios
2019-04-11 20:42     ` Eric Abrahamsen
2019-04-14  1:11       ` Basil L. Contovounesios

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.