From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thomas Link Newsgroups: gmane.emacs.devel Subject: Re: shell-command - missing shell-quote-argument for program? Date: Sat, 14 Oct 2006 09:13:34 +0200 Message-ID: <45308E1E.3070209@yahoo.de> References: <452517DC.5010007@student.lu.se> <45251C56.8010603@student.lu.se> <45265833.4030709@student.lu.se> <45300469.7030107@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 1160829002 10462 80.91.229.2 (14 Oct 2006 12:30:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 14 Oct 2006 12:30:02 +0000 (UTC) Cc: Emacs Devel , "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 14 14:30:00 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 1GYieL-0006cX-PT for ged-emacs-devel@m.gmane.org; Sat, 14 Oct 2006 14:29:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYieL-0007eQ-6b for ged-emacs-devel@m.gmane.org; Sat, 14 Oct 2006 08:29:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYdiH-0005k4-Uw for emacs-devel@gnu.org; Sat, 14 Oct 2006 03:13:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYdiD-0005du-GB for emacs-devel@gnu.org; Sat, 14 Oct 2006 03:13:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYdiC-0005dk-RR for emacs-devel@gnu.org; Sat, 14 Oct 2006 03:13:37 -0400 Original-Received: from [217.12.11.62] (helo=smtp008.mail.ukl.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1GYdqp-0002ks-7u for emacs-devel@gnu.org; Sat, 14 Oct 2006 03:22:31 -0400 Original-Received: (qmail 13889 invoked from network); 14 Oct 2006 07:13:35 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.de; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=zltOGFrbIyy/B+4juP+uBx4MkkSXkFw15lFuAr8bjl4sFBAd5yT7j4mU2snFiFRQy9jkk+Wirh9tZ4SO9tW0NHhAah8qa+H92KiS1Mh5glBoxnZzjH4tTE8XBBEQwnzlnwFyycpjQKPaqJaZFS3so6EKYky1p09dzmq8WuslFmo= ; Original-Received: from unknown (HELO ?131.130.203.152?) (tlink2001@131.130.203.152 with plain) by smtp008.mail.ukl.yahoo.com with SMTP; 14 Oct 2006 07:13:34 -0000 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: Lennart Borgman In-Reply-To: <45300469.7030107@student.lu.se> X-Mailman-Approved-At: Sat, 14 Oct 2006 08:28:34 -0400 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:60736 Archived-At: > Yes, I missed filesets-quote. It is used in > filesets-get-quoted-selection. This is in turned used only in > filesets-command: > > ("Grep <>" > "grep" > ("-n " filesets-get-quoted-selection " " "<>")) > > This is a shell command so in filesets-get-quoted-selection I think > that shell-quote-argument should be used. You mustn't forget that this variable may also contain lisp function, so using shell-quote-argument all the time probably isn't ok. > filesets-rum-cmd--repl-fn The idea of this function is not only to fill in file names but to provide some kind of template language. Eg in the last version of filesets (somewhere on the web but which relies on some personal xemacs-compatibility-library & makes use of cl which is why RMS rejected it), this function knows two additional patterns: and <>. I'd think that with time somebody might want to have other patterns which is why I personally wouldn't move quoting to filesets-rum-cmd. > BTW the optional argument in (defun filesets-run-cmd--repl-fn (arg > &optional format-fn) should not be optional I think. Leaving it out > will result in (funcall nil ...). What was I thinking. ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de