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

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

Re: Finding last *Async Shell Command* buffer?


From: Emanuel Berg
Subject: Re: Finding last *Async Shell Command* buffer?
Date: Fri, 26 Mar 2021 08:52:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jean Louis wrote:

>> (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.

Whatever you want to pass to it must be made explicit at some
point or in some form.

> By the way, the above attempt does not work.

It is your own code, cleaned up to a functional state.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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