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

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

bug#30213: 26.0.91; shell buffer not displayed when not erased and async


From: Alex Branham
Subject: bug#30213: 26.0.91; shell buffer not displayed when not erased and async-shell-command-display-buffer is used
Date: Tue, 23 Jan 2018 13:07:52 -0600
User-agent: mu4e 0.9.18; emacs 26.0.91

This seems to fix it for me, thanks!


On Tue 23 Jan 2018 at 12:53, Basil L. Contovounesios <contovob@tcd.ie> wrote:

> From c236ef15477a7d76ee0420794f149bbcafdc8798 Mon Sep 17 00:00:00 2001
> From: "Basil L. Contovounesios" <contovob@tcd.ie>
> Date: Tue, 23 Jan 2018 18:18:04 +0000
> Subject: [PATCH] Fix deferred display of async shell-command buffer
>
> * 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
> -- 
> 2.15.1
>
>
> Alex Branham <alex.branham@gmail.com> writes:
>
>> I'm sorry, haven't had my morning coffee yet. I can reproduce this, but there
>> was an error in my initial email. From emacs -Q
>>
>> (setq shell-command-dont-erase-buffer 'beg-last-out
>>       async-shell-command-display-buffer nil)
>>
>> then do an async shell command, delete the window that shows the output, then
>> call another async shell command. The window is never re-shown.
>
> Thanks, I'm able to reproduce this on both emacs-26 and master branches
> and believe the attached patch fixes the issue.






reply via email to

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