* bug#16405: info on non-existent node shows raw info buffer
@ 2014-01-10 4:54 Glenn Morris
2014-01-10 8:04 ` Juri Linkov
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2014-01-10 4:54 UTC (permalink / raw)
To: 16405
Package: emacs
Version: 24.3
(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
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16405: info on non-existent node shows raw info buffer
2014-01-10 4:54 bug#16405: info on non-existent node shows raw info buffer Glenn Morris
@ 2014-01-10 8:04 ` Juri Linkov
2014-01-10 8:24 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2014-01-10 8:04 UTC (permalink / raw)
To: Glenn Morris; +Cc: 16405
> (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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16405: info on non-existent node shows raw info buffer
2014-01-10 8:04 ` Juri Linkov
@ 2014-01-10 8:24 ` Eli Zaretskii
2014-01-13 8:05 ` Juri Linkov
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2014-01-10 8:24 UTC (permalink / raw)
To: Juri Linkov; +Cc: 16405
> From: Juri Linkov <juri@jurta.org>
> Date: Fri, 10 Jan 2014 10:04:11 +0200
> Cc: 16405@debbugs.gnu.org
>
> 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.
Only if you are not in Info already, I hope. Otherwise, visiting DIR
doesn't make sense: we should stay put in the node where we were.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16405: info on non-existent node shows raw info buffer
2014-01-10 8:24 ` Eli Zaretskii
@ 2014-01-13 8:05 ` Juri Linkov
2014-01-13 16:11 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2014-01-13 8:05 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 16405-done
>> (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.
>
> Only if you are not in Info already, I hope. Otherwise, visiting DIR
> doesn't make sense: we should stay put in the node where we were.
This is fixed now to visit DIR only if no previous node is already visited.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16405: info on non-existent node shows raw info buffer
2014-01-13 8:05 ` Juri Linkov
@ 2014-01-13 16:11 ` Eli Zaretskii
0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2014-01-13 16:11 UTC (permalink / raw)
To: Juri Linkov; +Cc: 16405-done
> From: Juri Linkov <juri@jurta.org>
> Cc: rgm@gnu.org, 16405-done@debbugs.gnu.org
> Date: Mon, 13 Jan 2014 10:05:03 +0200
>
> >> (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.
> >
> > Only if you are not in Info already, I hope. Otherwise, visiting DIR
> > doesn't make sense: we should stay put in the node where we were.
>
> This is fixed now to visit DIR only if no previous node is already visited.
Thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-13 16:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-10 4:54 bug#16405: info on non-existent node shows raw info buffer Glenn Morris
2014-01-10 8:04 ` Juri Linkov
2014-01-10 8:24 ` Eli Zaretskii
2014-01-13 8:05 ` Juri Linkov
2014-01-13 16:11 ` Eli Zaretskii
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).