[Top][All Lists]

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

bug#18133: Suppressing asynchronous command output

From: Juri Linkov
Subject: bug#18133: Suppressing asynchronous command output
Date: Fri, 30 Dec 2016 01:08:03 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (x86_64-pc-linux-gnu)

> The buffer will be displayed by comint-make-newly-written-buffer-visible,
> which I've added to the default value of comint-preoutput-filter-functions.
> At present the buffer name is hard coded there, so this will only work for
> "*Async Shell Command*".

Maybe you could construct a lambda in ‘shell-command’
containing the buffer name dynamically bound to the value of
(or output-buffer "*Async Shell Command*"), then set this lambda
to the process-filter, as we already do in ‘shell-command’ with

(set-process-filter proc 'comint-output-filter)

i.e. something like

(set-process-filter proc `(lambda (process string)
                           (when ...
                            (display-buffer ,(or output-buffer "*Async Shell 

> So, to allow the user to be able to change the name, I suppose another user
> option would need to be introduced.

If the above solution will work, then we'll need a new customizable variable
like ‘async-shell-command-display-buffer’.  And also ‘display-buffer’ in
‘shell-command’ will need to be adjusted in the way recommended by Martin.

reply via email to

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