GNU bug report logs -
#16405
info on non-existent node shows raw info buffer
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Fri, 10 Jan 2014 04:55:02 UTC
Severity: normal
Found in version 24.3
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
Message #6 received at 16405 <at> debbugs.gnu.org (full text, mbox):
> (info "(emacs)Node That Does Not Exist")
>
> This dumps you in a raw, unformatted info buffer, which is not very
> friendly. I think it should format the info buffer as normal, go to the
> start, and only then return
>
> user-error: No such node or anchor: Node That Does Not Exist
AFAICS, this problem happens only when there is no *info* buffer
initially. Otherwise, it recovers to the previously visited Info node.
So if there is no history then it could visit the Top node.
BTW, I see a similar problem with
(info "(File That Does Not Exist)Node That Does Not Exist")
It displays an empty Info buffer. I guess it would make sense to visit
the Dir node in this case. This patch should fix both problems:
=== modified file 'lisp/info.el'
--- lisp/info.el 2014-01-01 07:43:34 +0000
+++ lisp/info.el 2014-01-10 08:02:57 +0000
@@ -917,6 +917,8 @@ (defun Info-find-file (filename &optiona
(setq filename found)
(if noerror
(setq filename nil)
+ (unless Info-history
+ (Info-directory))
(error "Info file %s does not exist" filename)))
filename))))
@@ -1238,11 +1240,13 @@ (defun Info-find-node-2 (filename nodena
(setq Info-point-loc nil))))))
;; If we did not finish finding the specified node,
;; go back to the previous one.
- (or Info-current-node no-going-back (null Info-history)
- (let ((hist (car Info-history)))
- (setq Info-history (cdr Info-history))
- (Info-find-node (nth 0 hist) (nth 1 hist) t)
- (goto-char (nth 2 hist))))))
+ (unless (or Info-current-node no-going-back)
+ (if Info-history
+ (let ((hist (car Info-history)))
+ (setq Info-history (cdr Info-history))
+ (Info-find-node (nth 0 hist) (nth 1 hist) t)
+ (goto-char (nth 2 hist)))
+ (Info-find-node (or filename Info-current-file) "Top" t)))))
;; Cache the contents of the (virtual) dir file, once we have merged
;; it for the first time, so we can save time subsequently.
This bug report was last modified 11 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.