GNU bug report logs -
#12253
Restore window start position
Previous Next
Full log
Message #23 received at 12253 <at> debbugs.gnu.org (full text, mbox):
> (set-window-point (window-in-direction 'below) (point-max))
>
> with the upper window selected, the lower window shows the (narrowed)
> end of *info* and
>
> (with-selected-window (window-in-direction 'below)
> (goto-char (point-max)))
>
> does the same. So I still miss you.
These functions might be used non-interactively,
where the *info* buffer is not displayed in any window,
e.g.:
(with-current-buffer "*info*"
(Info-history-back))
so in this case `goto-char' should be used instead of `set-window-point'
in `Info-history-back' and other similar functions.
It is true that in the latest patch, `set-window-start'
is not guarded against this use case. To guarantee that the
function operates on the window that displays the current buffer,
we could add the following condition (this patch is based on the
previous patch that adds `set-window-start'):
=== modified file 'lisp/info.el'
--- lisp/info.el 2012-08-22 23:45:47 +0000
+++ lisp/info.el 2012-08-25 00:28:00 +0000
@@ -2225,7 +2225,8 @@ (defun Info-history-back ()
(Info-find-node filename nodename)
(setq Info-history (cdr Info-history))
(setq Info-history-forward history-forward)
- (set-window-start (selected-window) ostart t)
+ (when (eq (window-buffer) (current-buffer))
+ (set-window-start (selected-window) ostart t))
(goto-char opoint)))
If you agree that this is the right thing to do
then other places could be changed accordingly as well.
This bug report was last modified 1 year and 154 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.