[Top][All Lists]

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

bug#30280: async-shell-command-display-buffer doesn't work anymore

From: Tino Calancha
Subject: bug#30280: async-shell-command-display-buffer doesn't work anymore
Date: Mon, 07 May 2018 16:35:03 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

"Basil L. Contovounesios" <address@hidden> writes:

> I attach two patches.  The first tries to make this test succeed in
> accordance with the resulting bugfix.  The second suggests some
> simplifications to the logic in shell-command.  WDYT?

Basil, thank you for fixing that test!

Concerning the 2nd patch; it adds a bug when
`async-shell-command-buffer' is
;; or

Following is a recipe:

emacs -Q -eval "(setq async-shell-command-buffer 'rename-buffer)" \
-eval '(async-shell-command "while true; do echo foo; sleep 3;done")' \
-eval '(async-shell-command "while true; do echo bar; sleep 3;done")'

;; Now execute the following form:
  (delq nil
     (mapcar (lambda (b) (if (string-match "\*Async Shell Command\*" 
(buffer-name b)) (buffer-name b)))(buffer-list))))
=> nil
;; It shouldn't be nil: there must be 2 buffers matching '*Async Shell 
;; Here we are using 1 buffer for 2 shell processes.

;; The original code binds bname below so that we can create the new
;; buffer with the proper name:
(let* ((buffer (get-buffer-create
                (or output-buffer "*Async Shell Command*")))
       (bname (buffer-name buffer))
       (directory default-directory)

reply via email to

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