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, 13 Oct 2006 21:55:51 +0200 Message-ID: <452FEF47.5010802@student.lu.se> References: <452517DC.5010007@student.lu.se> <45251C56.8010603@student.lu.se> <45265833.4030709@student.lu.se> <452FD75B.1000808@yahoo.de> 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 1160769416 12886 80.91.229.2 (13 Oct 2006 19:56:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2006 19:56:56 +0000 (UTC) Cc: Emacs Devel , rms@gnu.org, storm@cua.dk Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 13 21:56:53 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 1GYT9E-0004Be-OL for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 21:56:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYT9E-00028G-91 for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 15:56:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYT8h-000264-D8 for emacs-devel@gnu.org; Fri, 13 Oct 2006 15:56:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYT8d-00023z-MN for emacs-devel@gnu.org; Fri, 13 Oct 2006 15:56:15 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYT8d-00023p-IC for emacs-devel@gnu.org; Fri, 13 Oct 2006 15:56:11 -0400 Original-Received: from [80.76.149.212] (helo=ch-smtp01.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GYTH3-00056O-8N; Fri, 13 Oct 2006 16:04:53 -0400 Original-Received: from c83-249-218-244.bredband.comhem.se ([83.249.218.244]:63911 helo=[192.168.123.121]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1GYT8S-0004i3-4N; Fri, 13 Oct 2006 21:56:00 +0200 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: Thomas Link In-Reply-To: <452FD75B.1000808@yahoo.de> X-Scan-Result: No virus found in message 1GYT8S-0004i3-4N. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1GYT8S-0004i3-4N 3a417da284a1d0794ddf2b42d419f81d 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:60727 Archived-At: Thomas Link wrote: > >> ! (let ((cmd (format txt (shell-quote-argument >> (buffer-file-name))))) > Looks good to me. The function filesets-cmd-shell-command is called > when selecting "Run Command" from the menu and when then selecting > "Run Shell Command". The user will be prompted for a command string > that is then passed through format replacing %s with the current > buffer file name. Without the shell-quote-argument this most likely > resulted in an file not found error when the file name contained > blanks or other special characters. > > I really don't have the time to dig deeper into this but I think that > filesets-quote in the function filesets-run-cmd--repl-fn should be > replaced with shell-quote-argument too. > > Regards, Thomas, could you give an example of what txt could be here?