GNU bug report logs -
#18133
Suppressing asynchronous command output
Previous Next
Reported by: Reuben Thomas <rrt <at> sc3d.org>
Date: Mon, 28 Jul 2014 18:48:02 UTC
Severity: wishlist
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 30 July 2014 10:16, Reuben Thomas <rrt <at> sc3d.org> wrote:
>
> (add-to-list 'display-buffer-alist '("\\*Async Shell Command\\*"
>> display-buffer-no-window (nil)))
>>
>> (advice-add 'comint-output-filter :after
>> (lambda (process string)
>> (when (and (string-match-p "\\*Async Shell Command\\*"
>> (buffer-name (process-buffer
>> process))))
>> (display-buffer (process-buffer process)))))
>>
>
> Thanks very much. The second form seems like the "right" one: when running
> a command asynchronously, output should be immediately visible.
>
Unfortunately, this code relies on features in the upcoming 24.4. I've
rewritten it to work in 24.3, and fixed a bug:
(add-to-list 'display-buffer-alist '("\\*Async Shell Command\\*"
display-buffer-no-window
(allow-no-window . t)))
(defadvice comint-output-filter (after delay-ashell-sync-command-output
(process string))
"Stop Async Shell Command output from appearing until there is some
output"
(when (and (string-match-p "\\*Async Shell Command\\*"
(buffer-name (process-buffer process))))
(display-buffer (process-buffer process))))
The argument to display-buffer-no-window now uses allow-no-window as it
should, and I've rewritten the call to advice-add as a defadvice.
--
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.