all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: John Wiegley <jwiegley@gmail.com>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: async-shell-command
Date: Sat, 16 Apr 2016 13:44:53 -0700	[thread overview]
Message-ID: <m2wpnx706y.fsf@newartisans.com> (raw)
In-Reply-To: <87a8kuugyb.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 16 Apr 2016 09:54:20 +0200")

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

>>>>> Marcin Borkowski <mbork@mbork.pl> writes:

> Of course, this is extremely hackish. I thought that stock Emacs could use
> the prefix argument to `async-shell-command' for something else than "make
> this synchronous after all, and put the result at point", which seems odd
> (and not documented, btw). For instance, C-u M-& might /not/ show the *Async
> Shell Command* buffer, and when some option is set, this hiding/showing
> behavior would be reversed (as in my solution). OTOH, maybe the current way
> of doing things is fine, and just needs mentioning in the docstring?

> Any ideas?  WDYT?

None of the current invocation commands use a prefix argument to control
display, so this would be a departure from established practice. I think the
change you've described is better done locally, for those who want such
behavior.

Another way of doing this that might be nicer would be to check if the
shell-command string ends in "&!" instead of "&", and to take that as an
indication it should be executed both asynchronously and "silently" (without
display).

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 629 bytes --]

  reply	other threads:[~2016-04-16 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16  7:54 async-shell-command Marcin Borkowski
2016-04-16 20:44 ` John Wiegley [this message]
2016-04-18 19:56   ` async-shell-command Marcin Borkowski
2016-04-18 20:09     ` async-shell-command Drew Adams
2016-04-19  0:47     ` async-shell-command John Wiegley
2016-04-19 20:30       ` async-shell-command Marcin Borkowski

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

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

  git send-email \
    --in-reply-to=m2wpnx706y.fsf@newartisans.com \
    --to=jwiegley@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=mbork@mbork.pl \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.