unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 20020@debbugs.gnu.org
Subject: bug#20020: 25.0.50; `info-display-manual' should reuse existing window where buffer is displayed
Date: Wed, 09 Oct 2019 04:12:52 +0200	[thread overview]
Message-ID: <87h84iwtsr.fsf@gnus.org> (raw)
In-Reply-To: <ce0571f9-75cc-4051-844d-7df67ce03175@default> (Drew Adams's message of "Fri, 6 Mar 2015 11:15:38 -0800 (PST)")

Drew Adams <drew.adams@oracle.com> writes:

> In my case, Info buffers (*info* and *info<N>*) are in dedicated
> windows.  I expect `info-display-manual' to select such an existing
> window.  That is, if the Calc manual is already displayed in an Info
> buffer and I use `M-x info-display-manual' from some other buffer, I
> expect the existing window showing that manual to be selected (and its
> frame raised and focused, if necessary).
>
> Instead, `info-display-manual' displays the manual in the same window
> where I invoke it, resulting in two windows (and frames in my case)
> showing the same Info manual.

Makes sense.  I've now done this in Emacs 27, but while writing the
code, it struck me that there has to be a ready-made function for this
somewhere already.  I had a peek through the plethora of
switch-to/pop-to functions, but I didn't find anything that did exactly
this...

Does anybody know?  In short: If there's a window that has the buffer,
then that window should be selected, and its frame popped to the top
(and given focus).  If not, it should work like `switch-to-buffer'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2019-10-09  2:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 19:15 bug#20020: 25.0.50; `info-display-manual' should reuse existing window where buffer is displayed Drew Adams
2019-10-09  2:12 ` Lars Ingebrigtsen [this message]
2019-10-09 16:54   ` Eli Zaretskii
2019-10-09 17:51     ` Lars Ingebrigtsen
2019-10-09 18:08       ` Eli Zaretskii
2019-10-11  8:07         ` Lars Ingebrigtsen
2019-10-11  9:18           ` Eli Zaretskii
2019-10-13 18:22             ` Lars Ingebrigtsen
2019-10-09 20:38   ` Juri Linkov
2019-10-10  9:16     ` martin rudalics
2019-10-11  8:09       ` Lars Ingebrigtsen
2019-10-11  8:26         ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h84iwtsr.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=20020@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).