gnus-summary-respool-article (B r) no longer works in emacs 24

Bug #1096449 reported by James Troup on 2013-01-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
emacs24 (Ubuntu)

Bug Description

In emacs24, gnus-summary-respool-article (B r) no longer works for me.
It prompts me for the backend to use (nnfolder), but then doesn't find
any servers for nnfolder and doesn't offer me any completions for the
server question and won't accept anything I type.

The relevant change appears to be this one in gnus-sum.el:

| @@ -9945,7 +10202,7 @@
| (car ms))
| (t
| (let ((ms-alist (mapcar (lambda (m) (cons (cadr m) m)) ms)))
| - (cdr (assoc (completing-read "Server name: " ms-alist nil t)
| + (cdr (assoc (gnus-completing-read "Server name" ms-alist t)
| ms-alist))))))))
| (unless method
| (error "No method given for respooling"))

If I switch it back to completing-read, gnus-summary-respool-article
works again. Looking at gnus-completing-read, it calls
gnus-completing-read-function which for me is the default,
i.e. gnus-emacs-completing-read.

Looking at that function:

| (defun gnus-emacs-completing-read (prompt collection &optional require-match
| initial-input history def)
| "Call standard `completing-read-function'."
| (let ((completion-styles gnus-completion-styles))
| (completing-read prompt
| ;; Old XEmacs (at least 21.4) expect an alist for
| ;; collection.
| (mapcar 'list collection)
| nil require-match initial-input history def)))

The problem appears to be the mapcar. If I replace it with just
'collection', gnus-summary-respool-article works again.

Robert Bruce Park (robru) wrote :

Thanks for taking the time to report this bug. It looks like you've managed to pin-point the issue here! Have you considered sending a patch upstream?

I just had a quick peek at lp:emacs trunk and it seems they still use mapcar currently. I don't fully understand what that function is trying to do, but it seems to just result in transforming the list into a list of single-length lists, like so:

ELISP> (mapcar 'list '(1 2 3))

It's not clear to me why this would be desirable though.

James Troup (elmo) wrote :

This has been fixed in emacs25 of as at least 18.10 (and possibly 18.04, but I didn't check to confirm).

Changed in emacs24 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers