On 2009-08-14 19:14 +0200, Jari Aalto wrote:
> reassign 531094 emacs23-el
> retitle 531094 emacs23-el: info.el::Info-goto-node - Wrong type argument:
> stringp, nil
> found 531094 23.1+1-2
> tags 531094 + patch
> thanks
>
> Confirmed:
>
> apt-get install w3m-el emacs23 emacs23-el
>
> $ emacs -Q
> M-: (setq debug-on-error t) <return>
> C-h i m Emacs - w3m <return> i <return> 3
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> string-match("\\s *\\((\\s *\\([^ )]*\\)\\s *)\\s *\\|\\)\\(.*\\)"
> nil)
> Info-goto-node(nil)
> Info-nth-menu-item()
> call-interactively(Info-nth-menu-item nil nil)
>
> In original submitetr's words:
>
> I'm there on
> (info "(emacs-w3m)Index")
> and I can't enter
> "3" which runs the command Info-nth-menu-item
>
> The problem seems to be at
> /usr/local/share/emacs/23.0.91/lisp/info.el.gz
>
> 2481(defun Info-nth-menu-item ()
> 2482 "Go to the node of the Nth menu item.
> 2483N is the digit argument used to invoke this command."
> 2484 (interactive)
> 2485 (Info-goto-node
> 2486 (Info-extract-menu-counting
> 2487 (- (aref (this-command-keys) (1- (length (this-command-keys))))
> ?0))))
> 2488
>
> The value of Info-extract-menu-counting isn't checked for nil before
> passing it to Info-goto-node.
I'd say the bug is that Info-extract-menu-counting returns nil in the
first place, despite the fact that there are four clearly visible menu
items...
> Changelog and Patch attached,
> Jari
>
> 2009-08-14 Jari Aalto <[email protected]>
>
> * info.el (Info-nth-menu-item): Check return value
> of `Info-extract-menu-counting' for nil.
>
>
>>From 98e54359a29f0d3e8c0e8d514426a57a4511968f Mon Sep 17 00:00:00 2001
> From: Jari Aalto <[email protected]>
> Date: Fri, 14 Aug 2009 20:11:23 +0300
> Subject: [PATCH] info.el: (Info-nth-menu-item): Check return value of
> Info-extract-menu-counting for nil
>
>
> Signed-off-by: Jari Aalto <[email protected]>
> ---
> info.el | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/info.el b/info.el
> index 4a90b3e..715a085 100644
> --- a/info.el
> +++ b/info.el
> @@ -2482,9 +2482,10 @@ new buffer."
> "Go to the node of the Nth menu item.
> N is the digit argument used to invoke this command."
> (interactive)
> - (Info-goto-node
> - (Info-extract-menu-counting
> - (- (aref (this-command-keys) (1- (length (this-command-keys)))) ?0))))
> + (let ((node (Info-extract-menu-counting
> + (- (aref (this-command-keys) (1- (length (this-command-keys))))
> ?0))))
> + (if node
> + (Info-goto-node node))))
>
> (defun Info-top-node ()
> "Go to the Top node of this file."
This avoids the error, but does not really satisfy the user, since she
is not taken to the desired node. Besides, Info-menu still signals the
error.
Would you like to take this bug upstream?
Cheers,
Sven
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]