Subject: Numeric prefix for gnus-group-jump-to-group broken

From: Reiner Steib <[email-masked]>
Date: Wed, 02 May 2012 18:08:29 +0200

Hi,

using an alist in `gnus-group-jump-to-group-prompt' stopped working
for me after updating from Emacs 23.3 to current Emacs trunk (most
probably also in Emacs 24 (pretest)).

Recipe:

  $ emacs -Q

  Eval: (setq gnus-group-jump-to-group-prompt '((22 "gmane.")))

  Type: - M-x gnus-no-server RET
        - 22 j

Debugger:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
   completing-read-default("Group: " ("nntp+news.gwene.org:gwene.ca.alumnit.apenwarr.log" ...) nil nil ("gmane.") gnus-group-history nil nil)
   completing-read("Group: " ("nntp+news.gwene.org:gwene.ca.alumnit.apenwarr.log" ...) nil nil ("gmane.") gnus-group-history nil)
   gnus-emacs-completing-read("Group: " ("nntp+news.gwene.org:gwene.ca.alumnit.apenwarr.log" ...) nil ("gmane.") gnus-group-history nil)
   gnus-completing-read("Group" ("nntp+news.gwene.org:gwene.ca.alumnit.apenwarr.log" ...) nil  ("gmane.") gnus-group-history nil)
   gnus-group-completing-read(nil nil nil ("gmane."))
    (list (gnus-group-completing-read nil nil nil
      (if current-prefix-arg (cdr (assq current-prefix-arg
      gnus-group-jump-to-group-prompt)) (or (and (stringp
      gnus-group-jump-to-group-prompt) gnus-group-jump-to-group-prompt) (let
      ((p (cdr ...))) (and (stringp p) p))))))
   call-interactively(gnus-group-jump-to-group nil nil)

M-x vc-annotate RET of lisp/gnus-group.el in Gnus (git) suggests that
revision a07fef39 (by Julien Danjou in Gnus (git)) might be the
culprit (but it is not possible to just revert this change to confirm
this).

f9200ea8 (Reiner Steib            2004-05-18  19:22:18 +0000 2509) (defun gnus-group-jump-to-group (group &optional  prompt)
f9200ea8 (Reiner Steib            2004-05-18  19:22:18 +0000 2510)   "Jump to newsgroup GROUP.
f9200ea8 (Reiner Steib            2004-05-18  19:22:18 +0000 2511)
f9200ea8 (Reiner Steib            2004-05-18  19:22:18 +0000 2512) If PROMPT (the prefix) is a number, use the  prompt specified in
f9200ea8 (Reiner Steib            2004-05-18  19:22:18 +0000 2513) `gnus-group-jump-to-group-prompt'."
8f22dc38 (Lars Magne Ingebrigtsen 1997-03-04  20:48:56 +0000 2514)   (interactive
6651aa07 (Katsumi Yamaoka         2007-08-01  11:07:24 +0000 2515)    (list (gnus-group-completing-read
ec858845 (Lars Magne Ingebrigtsen 2011-01-30  18:07:34 -0800 2516)           nil nil nil
a07fef39 (Julien Danjou           2010-09-27  16:59:13 +0200 2517)           (if current-prefix-arg
a07fef39 (Julien Danjou           2010-09-27  16:59:13 +0200 2518)               (cdr (assq current-prefix-arg us-group-jump-to-group-prompt))
a07fef39 (Julien Danjou           2010-09-27  16:59:13 +0200 2519)             (or (and (stringp gnus-group-jump-to-group-prompt)
a07fef39 (Julien Danjou           2010-09-27  16:59:13 +0200 2520)                       gnus-group-jump-to-group-prompt)
a07fef39 (Julien Danjou           2010-09-27  16:59:13 +0200 2521)                 (let ((p (cdr (assq 0 gnus-group-jump-to-group-prompt))))
a07fef39 (Julien Danjou           2010-09-27  16:59:13 +0200 2522)                   (and (stringp p) p)))))))

Gnus v5.13
GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2012-05-02 on ...
200 news.gmane.org InterNetNews NNRP server INN 2.5.1 ready (posting ok)
[...]

Bye, Reiner
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/