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: Reuben Thomas
Subject: bug#18133: Suppressing asynchronous command output
Date: Tue, 27 Dec 2016 09:01:32 +0000

On 27 December 2016 at 06:23, Eli Zaretskii <address@hidden> wrote:
> From: Reuben Thomas <address@hidden>
> Date: Tue, 27 Dec 2016 01:20:42 +0000
> Cc: martin rudalics <address@hidden>, address@hidden, Eli Zaretskii <address@hidden>
>
> +(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?

--

reply via email to

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