help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Using key q to quit temporary buffer window


From: uzibalqa
Subject: Re: Using key q to quit temporary buffer window
Date: Wed, 24 Aug 2022 00:32:14 +0000

------- Original Message -------
On Tuesday, August 23rd, 2022 at 3:11 PM, Marcin Borkowski <mbork@mbork.pl> 
wrote:


> On 2022-08-23, at 06:38, wilnerthomas--- via Users list for the GNU Emacs 
> text editor help-gnu-emacs@gnu.org wrote:
> 
> > I am printing some text in a temporary buffer
> > 
> > (defconst principles "Text for display in temporary buffer")
> > 
> > (with-output-to-temp-buffer "andromeda"
> > (print principles)
> > 
> > Is it technically possible to use the key `q' to quit the temporary buffer 
> > window as one can do with the` Backtrace' window?
> 
> 
> AFAIK, it already works this way - thing is, the temp buffer window is
> not selected by default.
> 
> I'd probably look at `display-buffer'.
> 
> Hth,

You are right.  After switching to the temporary buffer, hitting `q' does quit 
the temporary buffer window.

Have made this, but want to switch to the temp buffer automatically.  What 
commands should I introduce? 

(defun help-show (bufrnm msg)
  "Display the output of MSG in buffer named BUFRNM."
  (if (stringp msg)
      (with-output-to-temp-buffer bufrnm
        (print msg))))





reply via email to

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