From: Marcin Borkowski <mbork@mbork.pl>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, Juri Linkov <juri@linkov.net>
Subject: Re: async-shell-command and prefix argument
Date: Sun, 20 Jan 2019 06:10:38 +0100 [thread overview]
Message-ID: <87lg3foqwh.fsf@mbork.pl> (raw)
In-Reply-To: <83a7jwatez.fsf@gnu.org>
On 2019-01-20, at 04:40, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Juri Linkov <juri@linkov.net>
>> Date: Sat, 19 Jan 2019 23:19:19 +0200
>> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
>>
>> >> Is something wrong with customizing async-shell-command-display-buffer?
>> >> I have it set to nil for quite some time.
>> >
>> > Would it help for this use-case? That is, make the output buffers
>> > disappear (even in the presence of some output), but not if a prefix
>> > argument is used?
>>
>> Does C-u already mean inserting the output in the current buffer?
>> Maybe then you could use e.g. M-0 prefix arg?
>
> We already have async-shell-command-display-buffer, which can be
> customized to makes the buffer appear only if it has something in it.
> Why is that not enough? Is the case where the user decides up front
> she doesn't want to see the buffer, ever, no matter what's in it, an
> important enough use case? And if it is, why a new value of
> async-shell-command-display-buffer couldn't cater even to that weird
> use case?
Well, if `async-shell-command-display-buffer' were extended to allow
that, it would obviously be enough.
I'm astonished, however, that you consider this a `weird use-case'.
I didn't even bother to explain it, since it seems so natural for me.
Basically, I would consider it like functions. Many commands run
through M-! or M-& are like "pure functions" - you are basically
interested in their output. Think `ls' or `git status' or `date'.
(These are not great examples, since Emacs has superior replacements for
them, but take `vagrant global-status' for instance.)
OTOH, some external commands are there only for their side effects -
think `rm' or `aunpack or `xdg-open'. (Notice that the last two often
/have/ output, only that you may be not interested in seeing it.)
Now, M-& can be easily configured to fit one or the other, but not
both.
Does it make sense?
--
Marcin Borkowski
http://mbork.pl
next prev parent reply other threads:[~2019-01-20 5:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 20:49 async-shell-command and prefix argument Marcin Borkowski
2019-01-15 17:32 ` Eli Zaretskii
2019-01-16 8:26 ` Marcin Borkowski
2019-01-19 21:19 ` Juri Linkov
2019-01-20 3:40 ` Eli Zaretskii
2019-01-20 5:10 ` Marcin Borkowski [this message]
2019-01-20 15:39 ` Eli Zaretskii
2019-01-20 20:26 ` Marcin Borkowski
2019-01-21 15:54 ` Eli Zaretskii
2019-01-24 17:32 ` 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
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=87lg3foqwh.fsf@mbork.pl \
--to=mbork@mbork.pl \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=juri@linkov.net \
/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).