[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding last *Async Shell Command* buffer?
From: |
Jean Louis |
Subject: |
Re: Finding last *Async Shell Command* buffer? |
Date: |
Fri, 26 Mar 2021 10:38:36 +0300 |
User-agent: |
Mutt/2.0.6 (2021-03-06) |
* Emanuel Berg via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> [2021-03-26 10:29]:
> Jean Louis wrote:
>
> > (defun rcd-async-shell-command (command &rest args)
> > "Remembers last async shell command on `C-c l'"
> > (interactive)
> > (let* ((shell-command-buffer-name-async (concat "RCD Async: "
> > (format-time-string "%T")))
> > (last-buffer shell-command-buffer-name-async))
> > (global-set-key (kbd "C-c l") `(lambda ()
> > (interactive)
> > (switch-to-buffer ,last-buffer)))
> > (apply #'async-shell-command command args)))
>
> (defun rcd-async-shell-command (cmd &optional args)
> (interactive)
> (let* ((buf (concat "RCD Async: " (format-time-string "%T")) )
> (last-buf buf) )
> (switch-to-buffer last-buf)
> (async-shell-command cmd args) ))
>
> (global-set-key
> "\M-&"
> (lambda () (interactive) (rcd-async-shell-command "gimp")) )
Thanks.
If gimp would be the only command to run, then I would bind it on a
key and specific gimp buffer, easy to access.
By the way, the above attempt does not work.
- Re: Finding last *Async Shell Command* buffer?, (continued)
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/25
- Re: Finding last *Async Shell Command* buffer?, Emanuel Berg, 2021/03/25
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/25
- Re: Finding last *Async Shell Command* buffer?, Emanuel Berg, 2021/03/25
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/25
- Re: Finding last *Async Shell Command* buffer?, Robert Thorpe, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Eli Zaretskii, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Eli Zaretskii, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Emanuel Berg, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?,
Jean Louis <=
- Re: Finding last *Async Shell Command* buffer?, Emanuel Berg, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Emanuel Berg, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Emanuel Berg, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Eli Zaretskii, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Jean Louis, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Eli Zaretskii, 2021/03/26
- Re: Finding last *Async Shell Command* buffer?, Emanuel Berg, 2021/03/26