unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eduardo Ochs <eduardoochs@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Recommended way to make pop-to-buffer use the current window?
Date: Fri, 16 Jul 2021 01:05:43 -0300	[thread overview]
Message-ID: <CADs++6i7b81EDHGR2TdEa2BA74TuF+jUx-WjwrLsaJWTwrxTmg@mail.gmail.com> (raw)

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  4:05 UTC|newest]

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

  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=CADs++6i7b81EDHGR2TdEa2BA74TuF+jUx-WjwrLsaJWTwrxTmg@mail.gmail.com \
    --to=eduardoochs@gmail.com \
    --cc=help-gnu-emacs@gnu.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.
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).