unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
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 23:38:01 +0300	[thread overview]
Message-ID: <87imoxhgnq.fsf@mail.linkov.net> (raw)
In-Reply-To: <87h84iwtsr.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 09 Oct 2019 04:12:52 +0200")

>> 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'.

I'm not sure, maybe Martin could confirm this, but very likely
you can use display-buffer-reuse-window here.





  parent reply	other threads:[~2019-10-09 20:38 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
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 [this message]
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=87imoxhgnq.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=20020@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /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).