all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Recommended way to make pop-to-buffer use the current window?
Date: Fri, 16 Jul 2021 09:46:41 -0400	[thread overview]
Message-ID: <jwv4kcuml9e.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: CADs++6i7b81EDHGR2TdEa2BA74TuF+jUx-WjwrLsaJWTwrxTmg@mail.gmail.com

You can let-bind `display-buffer-overriding-action` for that (it was
added specifically for those kinds of situations).


        Stefan


I think you can use the `other-frame-window` package for that.

Eduardo Ochs [2021-07-16 01:05:43] wrote:

> Hi list,
>
> what is the recommended way to create a wrapper around a function that
> uses `pop-to-buffer' to make it use the current window to display its
> buffer? I am asking because I want to add support for shortdoc to eev...
> If I run this
>
>   (shortdoc-display-group 'alist)
>
> in a two-window setting in which the selected window is the one at the
> left then the buffer "*Shortdoc alist*" appears in the right window,
> and the selected window becomes the one at the right...
>
> ...and I would like to create a function that can be called like this,
>
>   (find-shortdoc 'alist)
>
> that would work like `shortdoc-display-group' but that would never
> change the window setting and that would always use the current window
> to shortdoc buffer...
>
> If anyone is curious about why eev needs this, there is more info here:
>
>   http://angg.twu.net/eev-intros/find-here-links-intro.html#2
>   (find-here-links-intro "2. \"Here\"")
>
>   http://angg.twu.net/eev-intros/find-eev-quick-intro.html#3
>   (find-eev-quick-intro "3. Elisp hyperlinks")
>
> Thanks in advance,
>   Eduardo Ochs
>   http://angg.twu.net/#eev




  reply	other threads:[~2021-07-16 13:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16  4:05 Recommended way to make pop-to-buffer use the current window? Eduardo Ochs
2021-07-16 13:46 ` Stefan Monnier via Users list for the GNU Emacs text editor [this message]
2021-07-16 14:48   ` Stefan Monnier via Users list for the GNU Emacs text editor

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

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

  git send-email \
    --in-reply-to=jwv4kcuml9e.fsf-monnier+emacs@gnu.org \
    --to=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.