From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: shell-command - missing shell-quote-argument for program? Date: Fri, 06 Oct 2006 15:20:51 +0200 Message-ID: <45265833.4030709@student.lu.se> References: <452517DC.5010007@student.lu.se> <45251C56.8010603@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1160140934 16082 80.91.229.2 (6 Oct 2006 13:22:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Oct 2006 13:22:14 +0000 (UTC) Cc: Thomas Link Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 06 15:22:12 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 1GVpeB-0001Te-6F for ged-emacs-devel@m.gmane.org; Fri, 06 Oct 2006 15:21:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GVpeA-0004wt-LF for ged-emacs-devel@m.gmane.org; Fri, 06 Oct 2006 09:21:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GVpdH-0004JI-AF for emacs-devel@gnu.org; Fri, 06 Oct 2006 09:20:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GVpdF-0004GZ-0u for emacs-devel@gnu.org; Fri, 06 Oct 2006 09:20:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GVpdE-0004GH-Oe for emacs-devel@gnu.org; Fri, 06 Oct 2006 09:20:52 -0400 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GVpk7-0002FL-JK for emacs-devel@gnu.org; Fri, 06 Oct 2006 09:27:59 -0400 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.075) id 451BA3C70020EE4F; Fri, 6 Oct 2006 15:20:51 +0200 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: Emacs Devel In-Reply-To: <45251C56.8010603@student.lu.se> 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:60464 Archived-At: Lennart Borgman wrote: > 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? > > And I should have mentioned `shell-command-to-string' to of course. > More examples of probably missing shell quotings are in > > - filesets.el The author of filesets Thomas Link has replied to me that he currently does not use Emacs and cannot maintain filesets.el until that situation changes. I myself therefore suggest the following patch to filesets.el: Index: filesets.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/filesets.el,v retrieving revision 1.29 diff -c -r1.29 filesets.el *** filesets.el 13 Aug 2006 17:05:12 -0000 1.29 --- filesets.el 6 Oct 2006 13:15:12 -0000 *************** *** 1701,1707 **** ok) t))) (when ok ! (let ((cmd (format txt (buffer-file-name)))) (message "Filesets: %s" cmd) (filesets-cmd-show-result cmd (shell-command-to-string cmd)))))) --- 1701,1707 ---- ok) t))) (when ok ! (let ((cmd (format txt (shell-quote-argument (buffer-file-name))))) (message "Filesets: %s" cmd) (filesets-cmd-show-result cmd (shell-command-to-string cmd))))))