all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: emacs-devel@gnu.org, juri@linkov.net
Subject: Re: async-shell-command and prefix argument
Date: Mon, 21 Jan 2019 17:54:05 +0200	[thread overview]
Message-ID: <83r2d69fc2.fsf@gnu.org> (raw)
In-Reply-To: <878szfnkhq.fsf@mbork.pl> (message from Marcin Borkowski on Sun,  20 Jan 2019 21:26:41 +0100)

> From: Marcin Borkowski <mbork@mbork.pl>
> Cc: juri@linkov.net, emacs-devel@gnu.org
> Date: Sun, 20 Jan 2019 21:26:41 +0100
> 
> > OTOH, if such a command does display something, it means the author of
> > the command thought it was important enough to show that, even though
> > the command is "for side effects".
> 
> Well, you are right - in theory.  Practice is different.
> 
> Here are some examples.
> 
> 1. Opening a png file in Gimp with xdg-open
> 
> --8<---------------cut here---------------start------------->8---
> $ xdg-open redacted.png
> 
> (gimp-2.10:29264): Gtk-WARNING **: 21:13:40.274: Unable to locate theme engine 
> in module_path: "adwaita",

Can be easily fixed, see below.

> I know it worked because I can see a Gimp window/frame open.
> 
> 2. Running (pdf)latex on a known and tested file (so no need for
> diagnostics), only to produce the pdf.
> 
> I know it worked because I can see (and view) the pdf.  (Besides, I know
> the file compiles correctly anyway, I just happened to delete the pdf
> and I want to recreate it.)
> 
> 3. Unpacking an archive with (more or less) known contents.
> 
> --8<---------------cut here---------------start------------->8---
> $ aunpack zzz.zip
> Archive:  zzz.zip
>  extracting: Unpack-6002/aaa
>  extracting: Unpack-6002/bbb
>  extracting: Unpack-6002/ccc
> zzz.zip: extracted to `zzz' (multiple files in root)
> --8<---------------cut here---------------end--------------->8---
> 
> I know it worked because I press `g' in Dired and I can see the results
> of the unpacking.

I very much doubt that you could easily spot problems just by looking
at the list of files which wound up in Dired.  E.g., what if some file
failed to extract, due to a bug in aunpack, and the list of extracted
files is very long?

> 4. Viewing a pdf without the synctex file in evince.
> 
> --8<---------------cut here---------------start------------->8---
> $ evince mgr.pdf
> ! SyncTeX Error : No file?
> --8<---------------cut here---------------end--------------->8---
> 
> >> Does it make sense?
> >
> > Not really, sorry.
> 
> Is it better now?

This exchange is in response to your surprise that I consider this use
case weird.  The examples you gave don't really change anything.  They
show that you are willing to give up on seeing diagnostic messages
because you think you know in advance what they will tell you in each
and every case.  That is a strange assumption; IME it is invalidated
by your potential, if rare, typing mistakes; system updates that
replace programs and libraries with new versions that have exciting
new bugs; and by other similarly unexpected calamities.  It is strange
to hear from a veteran Emacs user that he chooses to ignore
diagnostics, rather than pay attention to them and attempt to solve
the underlying reasons.  For example, according to
https://askubuntu.com/questions/774664/gtk-warning-unable-to-locate-theme-engine-in-module-path-adwaita-error-o,
you can fix the first of the above problems by installing one,
possibly two, packages.

I hope you don't ignore Emacs problems in the same way.

> It is all about flexibility.  The author may have thought that the
> output is important.  As a user, knowing my situation, I know that it is
> not important /for me/.  (And I take the risk of a possible but unlikely
> situation of something going wrong and me not noticing, like having
> a full disk.)  I could say ">/dev/null 2>&1" to achieve what I want.

Or make a shell script that redirects stdout/stderr, and use that
thereafter.

> It's just that C-u is much more convenient.

C-u is already taken.  At best, you will have to do something like
"C-u 0" or "M-0" instead.  I doubt that's really better than
redirecting to /dev/null, and once again, I'm surprised that someone
would want to discard that output in the first place.



  reply	other threads:[~2019-01-21 15:54 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
2019-01-20 15:39           ` Eli Zaretskii
2019-01-20 20:26             ` Marcin Borkowski
2019-01-21 15:54               ` Eli Zaretskii [this message]
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

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

  git send-email \
    --in-reply-to=83r2d69fc2.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --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.