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

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

bug#18133: Suppressing asynchronous command output


From: Eli Zaretskii
Subject: bug#18133: Suppressing asynchronous command output
Date: Tue, 27 Dec 2016 11:28:37 +0200

> From: Reuben Thomas <rrt@sc3d.org>
> Date: Tue, 27 Dec 2016 09:01:32 +0000
> Cc: Juri Linkov <juri@linkov.net>, martin rudalics <rudalics@gmx.at>, 
> 18133@debbugs.gnu.org
> 
>  > +(defun comint-make-newly-written-buffer-visible (string process)
>  > + "Make the output buffer visible when output is added to an empty buffer.
>  > +Useful in `comint-preoutput-filter-functions'."
>  > + (let ((buffer (process-buffer process)))
>  > + (when (and (= 0 (buffer-size buffer))
>  > + (string-match-p "\\*Async Shell Command\\*"
>  > + (buffer-name buffer)))
>  > + (display-buffer (process-buffer process))))
>  > + string)
> 
>  Why are we hard-coding a certain buffer name in a function that is
>  supposed to be more general, judging by its name and doc string?
> 
> ​I found it hard-coded several times in other places, so I hard-coded it 
> here. What do you suggest?

I don't see it hard-coded in any context such as this.

I think the regexp against which buffer names are matched in
comint-make-newly-written-buffer-visible should be customizable, with
"*Async Shell Command*" being (in) the default value.

And another question: where's the user option to turn this feature on
or off (including the default being off)?

Thanks.





reply via email to

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