emacs-devel
[Top][All Lists]
Advanced

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

Re: shell-command - missing shell-quote-argument for program?


From: Eli Zaretskii
Subject: Re: shell-command - missing shell-quote-argument for program?
Date: Sat, 14 Oct 2006 16:02:35 +0200

> Date: Thu, 05 Oct 2006 16:53:10 +0200
> From: Lennart Borgman <address@hidden>
> 
> Lennart Borgman wrote:
> > In some places the program to run from `shell-command' is not quoted 
> > by `shell-quote-argument'. Examples are the calls in emerge.el.
> > 
> > Should not the program name be quoted by `shell-quote-argment' when it 
> > is possible?

If we quote emerge-command and the various emerge-*-program, we in
effect disallow them to be shell commands with switches.  Is that
reasonable?  If it is, then we should quote the programs.

Note that emerge-protect-metachars assumes a Posix shell, so it will
break on Windows with cmdproxy if the file names include whitespace.

> And I should have mentioned `shell-command-to-string' to of course. More 
> examples of probably missing shell quotings are in
> 
> - filesets.el
> - defcustom explicit-bash-args

I think this indeed needs quoting.

> - python-after-info-look: python-command

But python.el seems to limit this to no whitespace, no?  If so,
there's no need to quote.

> - flymake-get-project-include-dirs-imp: basedir should perhaps be quoted?

Probably.

> - ada-find-in-src-path

Yes, but this isn't trivial, since it concats the directory with a
wildcard.

> - ido-wide-find-dirs-or-files: several examples of missing quoting

Was fixed since you wrote this, right?

> - locate.el: locate-update-command shoue perhaps be quoted? (But 
> probably not, since it may include more than the program name. Bad 
> structure?)

I don't think it should be quoted automatically, for the reasons you
mentioned.

> - fortune.el

Yes.

> - org.el

Maybe, I'm not sure I understand the semantics there.

> - reftex-create-tags-file in reftex-global.el

This was already taken care of.




reply via email to

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