Subject: RE: bug#1116: Emacs hangs when executing Info-final-node

From: "Drew Adams" <[email-masked]>
Date: Wed, 8 Oct 2008 09:00:15 -0700

>  > C-h i       ;; open *info*
>  > Press '>'  ;; execute 'Info-final-node and emacs hangs!
>  >
>  > Always reproduced.
> 
> Would the attached patch help?

I don't mean to butt in here, but I suspect this is due to bug #1117 (probably =
#876). Are there extra ^M at the line ends of the Index page (which is the last
node)?

I have bug #1117 in my latest CVS version, and debugging Info-final-node shows
exactly that. The code gets here, and it just loops because "Top^M" is not
string-equal to "Top".

Debugger entered--returning value: nil
  string-equal("top
" "top")
* (not (string-equal (downcase ...) "top"))
* (and (save-excursion (search-backward "up:" nil t)) (not (string-equal ...
"top")))
* (cond ((and ... ... ...) (Info-goto-node ...) t) ((save-excursion ...)
(Info-next) t) ((and ... ...) (let ... ... ...)) (no-error nil) (t (error "No
pointer forward from this node")))
* (let ((case-fold-search t)) (cond (... ... t) (... ... t) (... ...) (no-error
nil) (t ...)))
* Info-forward-node(t t)
* (while (Info-forward-node t t) nil)
* (let ((Info-history nil) (case-fold-search t)) (Info-goto-node
(Info-extract-menu-counting nil)) (while (Info-forward-node t t) nil) (while
(and ... ...) (Info-goto-node ...)))
* Info-final-node()
  call-interactively(Info-final-node nil nil)

It was looking at Martin's patch that made me think of this - the code is
similar to my code that made me discover bug #1117 - same comparison of "Top^M"
with "Top", but in my case (isearch) an error was raised instead of an infinite
loop.

HTH.