* Re: info-look.el bug
[not found] <16413.4543.492252.351095@bushmills.inf.ed.ac.uk>
@ 2004-02-03 1:25 ` Kevin Rodgers
[not found] ` <mailman.1759.1075771606.928.bug-gnu-emacs@gnu.org>
1 sibling, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2004-02-03 1:25 UTC (permalink / raw)
Stephen Eglen wrote:
> Hi,
>
> I think I've found a little bug in info-look.el. If anyone out there
> regularly uses info-look.el, could they please check the following and
> get back to me?
>
> % emacs -q
>
> In the *scratch* buffer, type "C-h S defun RET". The frame should divide
> into two: the top window shows *scratch* and the bottom window shows
> the definition of "defun" from the elisp *info*.
>
> Still in the scratch buffer, type "C-h S setq RET". This time the
> *scratch* buffer disappears and is replaced by another window showing
> *info* for setq; so now, both windows are showing an info node, but
> the scratch buffer has gone.
>
> I think this behaviour is wrong, and that if the *info* buffer is
> already visible, it should not be viewed again in another window. I
> think have tracked down the problem to the call in info-lookup where
> it calls Info-goto-node.
>
> I think this problem can be solved by using save-window-excursion, but
> then on the second call to C-h S, the highlighting is not shown.
> Anyone have a better idea of how to solve this?
I think it is caused by the default value of same-window-buffer-names,
which includes "*info*". Here's a patch:
*** emacs-21.3/lisp/info-look.el.orig Fri Oct 18 19:21:07 2002
--- emacs-21.3/lisp/info-look.el Mon Feb 2 18:19:02 2004
***************
*** 338,345 ****
(if (and info-frame
(display-multi-frame-p)
(memq info-frame (frames-on-display-list)))
! (select-frame info-frame)
! (switch-to-buffer-other-window "*info*")))))
(while (and (not found) modes)
(setq doc-spec (info-lookup->doc-spec topic (car modes)))
(while (and (not found) doc-spec)
--- 338,347 ----
(if (and info-frame
(display-multi-frame-p)
(memq info-frame (frames-on-display-list)))
! (select-frame info-frame)
! (let ((same-window-buffer-names
! (delete "*info*" same-window-buffer-names)))
! (switch-to-buffer-other-window "*info*"))))))
(while (and (not found) modes)
(setq doc-spec (info-lookup->doc-spec topic (car modes)))
(while (and (not found) doc-spec)
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: info-look.el bug
[not found] ` <mailman.1759.1075771606.928.bug-gnu-emacs@gnu.org>
@ 2004-02-03 17:04 ` Kevin Rodgers
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2004-02-03 17:04 UTC (permalink / raw)
Kevin Rodgers wrote:
> I think it is caused by the default value of same-window-buffer-names,
> which includes "*info*".
BTW, I also tried replacing (switch-to-buffer-other-window "*info*") with
(pop-to-buffer "*info*" t), but both functions let same-window-buffer-names
take precedence over the other-window intent of the programmer. Is that
correct behavior, or is it a bug? If it's a bug, I think it could be fixed
simply by let-binding same-window-buffer-names and same-window-regexps to
nil around the call to display-buffer within switch-to-buffer-other-window
and pop-to-buffer (when pop-to-buffer's OTHER-WINDOW arg is non-nil). What
do you think?
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-03 17:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <16413.4543.492252.351095@bushmills.inf.ed.ac.uk>
2004-02-03 1:25 ` info-look.el bug Kevin Rodgers
[not found] ` <mailman.1759.1075771606.928.bug-gnu-emacs@gnu.org>
2004-02-03 17:04 ` Kevin Rodgers
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).