Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Date: Tue, 23 Jan 2018 18:53:13 +0000 >> Cc: 30213@debbugs.gnu.org >> >> * lisp/simple.el (shell-command): Display async command buffer on >> process output for every invocation, not just the first. (bug#30213) >> --- >> lisp/simple.el | 4 +--- >> 1 file changed, 1 insertion(+), 3 deletions(-) >> >> diff --git a/lisp/simple.el b/lisp/simple.el >> index 3ac6b86381..20e22bf98f 100644 >> --- a/lisp/simple.el >> +++ b/lisp/simple.el >> @@ -3551,9 +3551,7 @@ shell-command >> (add-function :before (process-filter proc) >> (lambda (process _string) >> (let ((buf (process-buffer process))) >> - (when (and (zerop (buffer-size buf)) >> - (string= (buffer-name buf) >> - bname)) >> + (when (string= (buffer-name buf) bname) >> (display-buffer buf)))))))) >> ;; Otherwise, command is executed synchronously. >> (shell-command-on-region (point) (point) command > > Looks like you are removing the feature we just introduced in Emacs > 26, see commit 85512e7: it shows the shell buffer only if there is > some output there. Or am I missing something? This feature is implemented by the surrounding add-function advice on the process filter, which I am not removing. Here is my patch in the surrounding context of the async-shell-command-display-buffer switch: