[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to know the buffer I will return to from the minibuffer?
From: |
Marcin Borkowski |
Subject: |
Re: How to know the buffer I will return to from the minibuffer? |
Date: |
Sun, 17 Feb 2019 06:59:06 +0100 |
User-agent: |
mu4e 1.1.0; emacs 27.0.50 |
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