emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pp-eval-expression enhancements


From: Juri Linkov
Subject: Re: pp-eval-expression enhancements
Date: Thu, 26 Jul 2007 00:40:20 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

>                        It is quite convenient to have the result displayed
> in another buffer, for examination or editing and copying. I often use `M-:'
> the same way one would use `C-h f', `C-h k', and `C-h F': to get information
> about something. I use both kinds of information during minibuffer input.

Since it's impossible to find heuristics that would decide whether to
display the result in the echo area, or to pop up a separate result buffer
(because only the user can decide this), I use the following post-advice
on shell-command:

    (when (memq last-input-char '(S-return ?\C-j))
      (message "")
      (pop-to-buffer "*Shell Command Output*"))

i.e. when the minibuffer with the command is exited with S-RET, then
it displays the output buffer regardless on its size.

If `M-:' created the buffer *Pp Eval Output* even without displaying it,
it would be possible to create a similar hook to display it depending
on some key used to exit the `M-:' minibuffer.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]