unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: How to know the buffer I will return to from the minibuffer?
Date: Thu, 14 Feb 2019 08:10:54 +0100	[thread overview]
Message-ID: <87r2caonep.fsf@mbork.pl> (raw)

Hi all,

I am writing an interactive command to be used while in the minibuffer.
I need to know the buffer I was in when I issued the command that put me
in the minibuffer (like M-: or M-!).  I tried (other-buffer
(current-buffer)) and (last-buffer (current-buffer)), but to no avail.
Then I re-read the docs for `other-buffer' and used this: (other-buffer
(current-buffer) t), and it seemed to work.  The question is, how
reliable it is.  Am I doing this correctly?

TIA,

-- 
Marcin Borkowski
http://mbork.pl



             reply	other threads:[~2019-02-14  7:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  7:10 Marcin Borkowski [this message]
2019-02-14  8:39 ` How to know the buffer I will return to from the minibuffer? tomas
2019-02-17  6:00   ` Marcin Borkowski
2019-02-14 15:38 ` Drew Adams
2019-02-17  5:59   ` Marcin Borkowski

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=87r2caonep.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --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).