GNU bug report logs - #4142
[PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil

Previous Next

Package: emacs;

Reported by: Jari Aalto <jari.aalto <at> cante.net>

Date: Fri, 14 Aug 2009 17:45:03 UTC

Severity: normal

Tags: notabug

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 4142 in the body.
You can then email your comments to 4142 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4142; Package emacs. (Fri, 14 Aug 2009 17:45:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jari Aalto <jari.aalto <at> cante.net>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 14 Aug 2009 17:45:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Jari Aalto <jari.aalto <at> cante.net>
To: submit <at> debbugs.gnu.org
Subject: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil
Date: Fri, 14 Aug 2009 20:35:39 +0300
Cf. Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531094

    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)

    Original bug submitter said:

    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 in lisp/info.el

    (defun Info-nth-menu-item ()
      "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))))

The value of Info-extract-menu-counting isn't checked for nil before
passing it to Info-goto-node.

Jari

2009-08-14  Jari Aalto  <jari.aalto <at> cante.net>

        * info.el (Info-nth-menu-item): Check return value
        of `Info-extract-menu-counting' for nil.

PATCH: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=0001-info.el-Info-nth-menu-item-Check-return-value-of-Inf.patch;att=1;bug=531094



Tags added: patch Request was from Jari Aalto <jari.aalto <at> cante.net> to control <at> emacsbugs.donarmstrong.com. (Fri, 14 Aug 2009 18:05:08 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#4142; Package emacs. (Fri, 14 Aug 2009 22:40:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juri Linkov <juri <at> jurta.org>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Fri, 14 Aug 2009 22:40:06 GMT) Full text and rfc822 format available.

Message #12 received at 4142 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Jari Aalto <jari.aalto <at> cante.net>
Cc: 4142 <at> debbugs.gnu.org
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil
Date: Sat, 15 Aug 2009 01:29:48 +0300
> The value of Info-extract-menu-counting isn't checked for nil before
> passing it to Info-goto-node.
>
> 2009-08-14  Jari Aalto  <jari.aalto <at> cante.net>
>
>         * info.el (Info-nth-menu-item): Check return value
>         of `Info-extract-menu-counting' for nil.

Your patch is a cure for the symptom instead of the disease.

The problem is that the node `Index' of the the w3m manual is recognized
as an index node (but actually it is a normal node with a menu that has
references to index nodes) because it has the word `Index' in the node
name and does not support index cookies (because it is generated by
`texinfmt.el', not by `makeinfo').

-- 
Juri Linkov
http://www.jurta.org/emacs/



Removed tag(s) patch. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Fri, 13 Nov 2009 20:35:06 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Dan Nicolaescu <dann <at> ics.uci.edu> to control <at> debbugs.gnu.org. (Sun, 20 Dec 2009 15:59:02 GMT) Full text and rfc822 format available.

Added tag(s) notabug. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 17 Sep 2011 07:22:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 4142 <at> debbugs.gnu.org and Jari Aalto <jari.aalto <at> cante.net> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 17 Sep 2011 07:22:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sat, 17 Sep 2011 07:32:02 GMT) Full text and rfc822 format available.

Message #23 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 4142 <at> debbugs.gnu.org, Jari Aalto <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument: stringp, nil
Date: Sat, 17 Sep 2011 09:12:58 +0200
Juri Linkov <juri <at> jurta.org> writes:

> The problem is that the node `Index' of the the w3m manual is recognized
> as an index node (but actually it is a normal node with a menu that has
> references to index nodes) because it has the word `Index' in the node
> name and does not support index cookies (because it is generated by
> `texinfmt.el', not by `makeinfo').

So I don't think this is an Emacs bug, but should be fixed in the
emacs-w3m manual instead.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sat, 17 Sep 2011 14:25:01 GMT) Full text and rfc822 format available.

Message #26 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>,
	"'Juri Linkov'" <juri <at> jurta.org>
Cc: 4142 <at> debbugs.gnu.org, 'Jari Aalto' <jari.aalto <at> cante.net>
Subject: RE: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument:stringp, nil
Date: Sat, 17 Sep 2011 07:19:38 -0700
> > The problem is that the node `Index' of the the w3m manual 
> > is recognized as an index node (but actually it is a normal
> > node with a menu that has references to index nodes) because
> > it has the word `Index' in the node name and does not support
> > index cookies (because it is generated by
> > `texinfmt.el', not by `makeinfo').
> 
> So I don't think this is an Emacs bug, but should be fixed in the
> emacs-w3m manual instead.

It would seem that the bug, or enhancement request, is that Emacs not have such
a fragile way of recognizing an index node.

Depending on the node name is a bit sophomorish, no?  We have lots of meta info
that is not displayed to the user but is used for Info to do its job.  This
sounds like another place where we should make use of that possibility.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sat, 17 Sep 2011 18:38:01 GMT) Full text and rfc822 format available.

Message #29 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4142 <at> debbugs.gnu.org,
	'Jari Aalto' <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument:stringp, nil
Date: Sat, 17 Sep 2011 21:17:55 +0300
>> So I don't think this is an Emacs bug, but should be fixed in the
>> emacs-w3m manual instead.
>
> It would seem that the bug, or enhancement request, is that Emacs not have such
> a fragile way of recognizing an index node.

emacs-w3m.info dates 7 Jul 2006, so it's very unlikely that its authors
will fix the emacs-w3m Info manual in the near future.  So yes, we could
try making Info less fragile.

> Depending on the node name is a bit sophomorish, no?  We have lots of meta info
> that is not displayed to the user but is used for Info to do its job.  This
> sounds like another place where we should make use of that possibility.

The current situation in emacs-w3m is worse.  The Info reader recognizes
non-index nodes as index nodes, and vice-versa - index nodes as non-index nodes.

Currently a node is recognized as index based on its name solely.
If its name contains the word "Index", it's an index node, the same
is checked for its adjacent nodes.

Instead of checking the node name we could visit all nodes in the manual
with the name containing the word "Index" and check if the first menu item
has the format of index or not.

I believe this would be more reliable with no performance impact.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sun, 18 Sep 2011 07:46:02 GMT) Full text and rfc822 format available.

Message #32 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 4142 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>,
	'Jari Aalto' <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument:stringp, nil
Date: Sun, 18 Sep 2011 09:32:22 +0200
Juri Linkov <juri <at> jurta.org> writes:

> Instead of checking the node name we could visit all nodes in the manual
> with the name containing the word "Index" and check if the first menu item
> has the format of index or not.

Or we could just say "don't call non-index nodes something containing
the word 'index'".

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sun, 18 Sep 2011 08:01:02 GMT) Full text and rfc822 format available.

Message #35 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>,
	"'Juri Linkov'" <juri <at> jurta.org>
Cc: 4142 <at> debbugs.gnu.org, 'Jari Aalto' <jari.aalto <at> cante.net>
Subject: RE: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument:stringp, nil
Date: Sun, 18 Sep 2011 00:54:51 -0700
> Or we could just say "don't call non-index nodes something containing
> the word 'index'".

No, that's what's fragile and error prone.  We should be able to put some meta
information in index nodes to identify them.  It is not unusual in Info to use
some text or text properties that users do not see as meta info.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sun, 18 Sep 2011 08:10:02 GMT) Full text and rfc822 format available.

Message #38 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4142 <at> debbugs.gnu.org,
	Drew Adams <drew.adams <at> oracle.com>, 'Jari Aalto' <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument:stringp, nil
Date: Sun, 18 Sep 2011 10:05:00 +0200
Juri Linkov <juri <at> jurta.org> writes:

> emacs-w3m.info dates 7 Jul 2006, so it's very unlikely that its authors
> will fix the emacs-w3m Info manual in the near future.

emacs-w3m is still actively maintained.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sun, 18 Sep 2011 08:12:01 GMT) Full text and rfc822 format available.

Message #41 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Juri Linkov <juri <at> jurta.org>, 4142 <at> debbugs.gnu.org,
	Jari Aalto <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument: stringp, nil
Date: Sun, 18 Sep 2011 10:06:55 +0200
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Juri Linkov <juri <at> jurta.org> writes:
>
>> The problem is that the node `Index' of the the w3m manual is recognized
>> as an index node (but actually it is a normal node with a menu that has
>> references to index nodes) because it has the word `Index' in the node
>> name and does not support index cookies (because it is generated by
>> `texinfmt.el', not by `makeinfo').
>
> So I don't think this is an Emacs bug, but should be fixed in the
> emacs-w3m manual instead.

Or just regenerated with makeinfo?

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sun, 18 Sep 2011 19:58:02 GMT) Full text and rfc822 format available.

Message #44 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4142 <at> debbugs.gnu.org,
	'Jari Aalto' <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument:stringp, nil
Date: Sun, 18 Sep 2011 22:51:45 +0300
>> Or we could just say "don't call non-index nodes something containing
>> the word 'index'".
>
> No, that's what's fragile and error prone.  We should be able to put some meta
> information in index nodes to identify them.  It is not unusual in Info to use
> some text or text properties that users do not see as meta info.

`makeinfo' already puts meta information in index nodes to identify them
(modulo a little bug I just fixed).

The problem is that emacs-w3m.info is not produced by `makeinfo'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sun, 18 Sep 2011 20:05:01 GMT) Full text and rfc822 format available.

Message #47 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>, 4142 <at> debbugs.gnu.org,
	Jari Aalto <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument: stringp, nil
Date: Sun, 18 Sep 2011 22:52:51 +0300
>> So I don't think this is an Emacs bug, but should be fixed in the
>> emacs-w3m manual instead.
>
> Or just regenerated with makeinfo?

Yes, regenerating with makeinfo will fix this problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#4142; Package emacs. (Sun, 18 Sep 2011 21:13:01 GMT) Full text and rfc822 format available.

Message #50 received at 4142 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Juri Linkov <juri <at> jurta.org>
Cc: 'Lars Magne Ingebrigtsen' <larsi <at> gnus.org>, 4142 <at> debbugs.gnu.org,
	Drew Adams <drew.adams <at> oracle.com>, 'Jari Aalto' <jari.aalto <at> cante.net>
Subject: Re: bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type
	argument:stringp, nil
Date: Sun, 18 Sep 2011 23:07:19 +0200
Juri Linkov <juri <at> jurta.org> writes:

> The problem is that emacs-w3m.info is not produced by `makeinfo'.

Which is just a packaging bug.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Oct 2011 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 200 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.