* How does one tell when a command is executed from the minibuffer?
@ 2014-11-29 18:57 Alan Mackenzie
2014-11-29 19:21 ` Andreas Schwab
2014-11-30 5:25 ` Stefan Monnier
0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2014-11-29 18:57 UTC (permalink / raw)
To: emacs-devel
Hello, Emacs.
How does one tell when a command is executed from the minibuffer, e.g.
M-: (foo)
, as contrasted with executing it from a file, e.g. by loading that
file, or with C-M-x or C-x C-e?
Something like (current-buffer) ought to do it, but `current-buffer'
"lies" when the current buffer is actually the minibuffer.
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How does one tell when a command is executed from the minibuffer?
2014-11-29 18:57 How does one tell when a command is executed from the minibuffer? Alan Mackenzie
@ 2014-11-29 19:21 ` Andreas Schwab
2014-11-29 19:28 ` Alan Mackenzie
2014-11-30 5:25 ` Stefan Monnier
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2014-11-29 19:21 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: emacs-devel
Alan Mackenzie <acm@muc.de> writes:
> How does one tell when a command is executed from the minibuffer, e.g.
>
> M-: (foo)
>
> , as contrasted with executing it from a file, e.g. by loading that
> file, or with C-M-x or C-x C-e?
There is no such thing as "executed from the minibuffer". The
expression may be *read* from the minibuffer, but that happens before
eval-expression is called to evaluate the expression.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How does one tell when a command is executed from the minibuffer?
2014-11-29 19:21 ` Andreas Schwab
@ 2014-11-29 19:28 ` Alan Mackenzie
2014-11-29 19:38 ` Andreas Schwab
0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2014-11-29 19:28 UTC (permalink / raw)
To: Andreas Schwab; +Cc: emacs-devel
Hello, Andreas
On Sat, Nov 29, 2014 at 08:21:24PM +0100, Andreas Schwab wrote:
> Alan Mackenzie <acm@muc.de> writes:
> > How does one tell when a command is executed from the minibuffer, e.g.
> > M-: (foo)
> > , as contrasted with executing it from a file, e.g. by loading that
> > file, or with C-M-x or C-x C-e?
> There is no such thing as "executed from the minibuffer". The
> expression may be *read* from the minibuffer, but that happens before
> eval-expression is called to evaluate the expression.
Thanks for the clarification. How does one tell whether an lisp
expression which has been read, and is in the course of being evaluated,
was read from the minibuffer?
> Andreas.
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How does one tell when a command is executed from the minibuffer?
2014-11-29 18:57 How does one tell when a command is executed from the minibuffer? Alan Mackenzie
2014-11-29 19:21 ` Andreas Schwab
@ 2014-11-30 5:25 ` Stefan Monnier
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2014-11-30 5:25 UTC (permalink / raw)
To: Alan Mackenzie; +Cc: emacs-devel
> How does one tell when a command is executed from the minibuffer, e.g.
> M-: (foo)
You don't. You step back and look for another problem to solve.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-30 5:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-29 18:57 How does one tell when a command is executed from the minibuffer? Alan Mackenzie
2014-11-29 19:21 ` Andreas Schwab
2014-11-29 19:28 ` Alan Mackenzie
2014-11-29 19:38 ` Andreas Schwab
2014-11-30 5:25 ` Stefan Monnier
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.