unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil
@ 2009-08-14 17:35 Jari Aalto
  2009-08-14 22:29 ` Juri Linkov
  0 siblings, 1 reply; 12+ messages in thread
From: Jari Aalto @ 2009-08-14 17:35 UTC (permalink / raw)
  To: submit


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@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





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil
  2009-08-14 17:35 bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil Jari Aalto
@ 2009-08-14 22:29 ` Juri Linkov
  2011-09-17  7:12   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 12+ messages in thread
From: Juri Linkov @ 2009-08-14 22:29 UTC (permalink / raw)
  To: Jari Aalto; +Cc: 4142

> 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@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/





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil
  2009-08-14 22:29 ` Juri Linkov
@ 2011-09-17  7:12   ` Lars Magne Ingebrigtsen
  2011-09-17 14:19     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil Drew Adams
  2011-09-18  8:06     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil Andreas Schwab
  0 siblings, 2 replies; 12+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-17  7:12 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 4142, Jari Aalto

Juri Linkov <juri@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/





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil
  2011-09-17  7:12   ` Lars Magne Ingebrigtsen
@ 2011-09-17 14:19     ` Drew Adams
  2011-09-17 18:17       ` Juri Linkov
  2011-09-18  8:06     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil Andreas Schwab
  1 sibling, 1 reply; 12+ messages in thread
From: Drew Adams @ 2011-09-17 14:19 UTC (permalink / raw)
  To: 'Lars Magne Ingebrigtsen', 'Juri Linkov'
  Cc: 4142, 'Jari Aalto'

> > 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.






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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil
  2011-09-17 14:19     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil Drew Adams
@ 2011-09-17 18:17       ` Juri Linkov
  2011-09-18  7:32         ` Lars Magne Ingebrigtsen
  2011-09-18  8:05         ` Andreas Schwab
  0 siblings, 2 replies; 12+ messages in thread
From: Juri Linkov @ 2011-09-17 18:17 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Lars Magne Ingebrigtsen', 4142, 'Jari Aalto'

>> 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.





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil
  2011-09-17 18:17       ` Juri Linkov
@ 2011-09-18  7:32         ` Lars Magne Ingebrigtsen
  2011-09-18  7:54           ` Drew Adams
  2011-09-18  8:05         ` Andreas Schwab
  1 sibling, 1 reply; 12+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-18  7:32 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 4142, 'Jari Aalto'

Juri Linkov <juri@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/





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil
  2011-09-18  7:32         ` Lars Magne Ingebrigtsen
@ 2011-09-18  7:54           ` Drew Adams
  2011-09-18 19:51             ` Juri Linkov
  0 siblings, 1 reply; 12+ messages in thread
From: Drew Adams @ 2011-09-18  7:54 UTC (permalink / raw)
  To: 'Lars Magne Ingebrigtsen', 'Juri Linkov'
  Cc: 4142, 'Jari Aalto'

> 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.






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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil
  2011-09-17 18:17       ` Juri Linkov
  2011-09-18  7:32         ` Lars Magne Ingebrigtsen
@ 2011-09-18  8:05         ` Andreas Schwab
  1 sibling, 0 replies; 12+ messages in thread
From: Andreas Schwab @ 2011-09-18  8:05 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 'Lars Magne Ingebrigtsen', 4142, 'Jari Aalto'

Juri Linkov <juri@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@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil
  2011-09-17  7:12   ` Lars Magne Ingebrigtsen
  2011-09-17 14:19     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil Drew Adams
@ 2011-09-18  8:06     ` Andreas Schwab
  2011-09-18 19:52       ` Juri Linkov
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2011-09-18  8:06 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 4142, Jari Aalto

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Juri Linkov <juri@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@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil
  2011-09-18  7:54           ` Drew Adams
@ 2011-09-18 19:51             ` Juri Linkov
  2011-09-18 21:07               ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Juri Linkov @ 2011-09-18 19:51 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Lars Magne Ingebrigtsen', 4142, 'Jari Aalto'

>> 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'.





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil
  2011-09-18  8:06     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil Andreas Schwab
@ 2011-09-18 19:52       ` Juri Linkov
  0 siblings, 0 replies; 12+ messages in thread
From: Juri Linkov @ 2011-09-18 19:52 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Lars Magne Ingebrigtsen, 4142, Jari Aalto

>> 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.





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

* bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil
  2011-09-18 19:51             ` Juri Linkov
@ 2011-09-18 21:07               ` Andreas Schwab
  0 siblings, 0 replies; 12+ messages in thread
From: Andreas Schwab @ 2011-09-18 21:07 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 'Lars Magne Ingebrigtsen', 4142, 'Jari Aalto'

Juri Linkov <juri@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@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





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

end of thread, other threads:[~2011-09-18 21:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14 17:35 bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil Jari Aalto
2009-08-14 22:29 ` Juri Linkov
2011-09-17  7:12   ` Lars Magne Ingebrigtsen
2011-09-17 14:19     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument:stringp, nil Drew Adams
2011-09-17 18:17       ` Juri Linkov
2011-09-18  7:32         ` Lars Magne Ingebrigtsen
2011-09-18  7:54           ` Drew Adams
2011-09-18 19:51             ` Juri Linkov
2011-09-18 21:07               ` Andreas Schwab
2011-09-18  8:05         ` Andreas Schwab
2011-09-18  8:06     ` bug#4142: [PATCH] 23.1 info.el::Info-goto-node - Wrong type argument: stringp, nil Andreas Schwab
2011-09-18 19:52       ` Juri Linkov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).