bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#33344: 26.1; doc-view bounding-box recognition doesn't work on path


From: Glenn Morris
Subject: bug#33344: 26.1; doc-view bounding-box recognition doesn't work on path names with spaces
Date: Wed, 14 Nov 2018 13:14:39 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Eli Zaretskii wrote:

> I don't disagree, but that's not the point.  The point is that this
> code was written to use the shell, and it works.  Turning it upside
> down because it failed to quote a single argument risks introducing
> bugs and backward incompatibilities for what IMO is a very small gain.

I don't think there's a mystery or grand design here. People sometimes
just reach for "shell-command" when they want to run an external
process, without thinking about the details.

"sh -c STUFF" is the same as just STUFF unless STUFF relies on some
shell feature like globbing. If STUFF doesn't require any shell
features then calling it via a shell is at best inefficient and at
worst harmful (if the shell mishandles any portion of STUFF, as happens here).
It is clear by inspection that this particular call does not require
shell features, so it should not go through a shell.

I've put reviewing all such uses of shell-command in Emacs on my todo
list (but it may well never happen).

(To return to a previous point: the "doc" argument here cannot be
remote, by virtue of doc-view's cache.)





reply via email to

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