From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: shell-command - missing shell-quote-argument for program? Date: Sat, 14 Oct 2006 16:02:35 +0200 Message-ID: References: <452517DC.5010007@student.lu.se> <45251C56.8010603@student.lu.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1160834590 27013 80.91.229.2 (14 Oct 2006 14:03:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 14 Oct 2006 14:03:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 14 16:03:09 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GYk6U-00072l-F9 for ged-emacs-devel@m.gmane.org; Sat, 14 Oct 2006 16:03:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYk6U-0001nS-07 for ged-emacs-devel@m.gmane.org; Sat, 14 Oct 2006 10:03:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYk5z-0001kA-T9 for emacs-devel@gnu.org; Sat, 14 Oct 2006 10:02:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYk5y-0001hp-5j for emacs-devel@gnu.org; Sat, 14 Oct 2006 10:02:34 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYk5x-0001h3-O1 for emacs-devel@gnu.org; Sat, 14 Oct 2006 10:02:33 -0400 Original-Received: from [192.114.186.73] (helo=heller.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GYkEd-0004Rw-Ro for emacs-devel@gnu.org; Sat, 14 Oct 2006 10:11:32 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-41-232.inter.net.il [80.230.41.232]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id ASJ49644 (AUTH halo1); Sat, 14 Oct 2006 15:02:22 +0200 (IST) Original-To: Lennart Borgman In-reply-to: <45251C56.8010603@student.lu.se> (message from Lennart Borgman on Thu, 05 Oct 2006 16:53:10 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:60739 Archived-At: > Date: Thu, 05 Oct 2006 16:53:10 +0200 > From: Lennart Borgman > > 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.