unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: Basil L. Contovounesios <contovob@tcd.ie>
Cc: rrt@sc3d.org, tino.calancha@gmail.com, 30280@debbugs.gnu.org,
	Juri Linkov <juri@linkov.net>
Subject: bug#30280: async-shell-command-display-buffer doesn't work anymore
Date: Mon, 07 May 2018 16:35:03 +0900	[thread overview]
Message-ID: <87zi1budeg.fsf@gmail.com> (raw)
In-Reply-To: <874ljkn4fb.fsf@tcd.ie> (Basil L. Contovounesios's message of "Sun, 06 May 2018 17:18:32 +0100")

"Basil L. Contovounesios" <contovob@tcd.ie> 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
confirm-rename-buffer
;; or
rename-buffer

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:
(cdr 
  (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 Command*'.
;; 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)
       proc)







  reply	other threads:[~2018-05-07  7:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28 22:20 bug#30280: async-shell-command-display-buffer doesn't work anymore Juri Linkov
2018-01-29 17:24 ` Eli Zaretskii
2018-01-29 21:40   ` Juri Linkov
2018-01-30  3:24     ` Eli Zaretskii
2018-01-30 18:53   ` Basil L. Contovounesios
2018-01-30 19:06     ` Reuben Thomas
2018-01-31 21:44     ` Juri Linkov
2018-02-02 10:42       ` Eli Zaretskii
2018-02-03 14:13         ` Basil L. Contovounesios
2018-02-03 21:27           ` Juri Linkov
2018-05-06 16:18             ` Basil L. Contovounesios
2018-05-07  7:35               ` Tino Calancha [this message]
2018-05-09 11:54                 ` Basil L. Contovounesios
2018-05-09 13:57                   ` Tino Calancha
2018-05-09 14:10                     ` Noam Postavsky
2018-05-09 14:24                       ` Tino Calancha
2018-05-09 18:29                     ` Basil L. Contovounesios
2018-05-10  2:13                       ` Tino Calancha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zi1budeg.fsf@gmail.com \
    --to=tino.calancha@gmail.com \
    --cc=30280@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=juri@linkov.net \
    --cc=rrt@sc3d.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).