From: Marcin Borkowski <mbork@mbork.pl>
To: Drew Adams <drew.adams@oracle.com>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: How to know the buffer I will return to from the minibuffer?
Date: Sun, 17 Feb 2019 06:59:06 +0100 [thread overview]
Message-ID: <874l93q7kl.fsf@mbork.pl> (raw)
In-Reply-To: <eb02c48a-dbe2-4378-9998-4dfbac619705@default>
On 2019-02-14, at 16:38, Drew Adams <drew.adams@oracle.com> wrote:
>> 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?
>
> If you use Icicles then that buffer is the value of variable
> `icicle-pre-minibuffer-buffer':
I don't, but thanks for pointing me to `minibuffer-setup-hook' - it is
interesting in itself.
Best,
--
Marcin Borkowski
http://mbork.pl
prev parent reply other threads:[~2019-02-17 5:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-14 7:10 How to know the buffer I will return to from the minibuffer? Marcin Borkowski
2019-02-14 8:39 ` tomas
2019-02-17 6:00 ` Marcin Borkowski
2019-02-14 15:38 ` Drew Adams
2019-02-17 5:59 ` Marcin Borkowski [this message]
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=874l93q7kl.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=drew.adams@oracle.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).