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: Fri, 13 Oct 2006 20:13:47 +0200 Message-ID: <452FD75B.1000808@yahoo.de> References: <452517DC.5010007@student.lu.se> <45251C56.8010603@student.lu.se> <45265833.4030709@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 1160765933 31933 80.91.229.2 (13 Oct 2006 18:58:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2006 18:58:53 +0000 (UTC) Cc: storm@cua.dk, rms@gnu.org, Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 13 20:58:49 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 1GYSEq-0001UK-CA for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 20:58:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYSEp-0002un-O7 for ged-emacs-devel@m.gmane.org; Fri, 13 Oct 2006 14:58:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYRXe-0008Oz-RJ for emacs-devel@gnu.org; Fri, 13 Oct 2006 14:13:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYRXa-0008Mc-LD for emacs-devel@gnu.org; Fri, 13 Oct 2006 14:13:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYRXa-0008MI-66 for emacs-devel@gnu.org; Fri, 13 Oct 2006 14:13:50 -0400 Original-Received: from [217.12.11.35] (helo=smtp004.mail.ukl.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1GYRg4-0008Ku-P1 for emacs-devel@gnu.org; Fri, 13 Oct 2006 14:22:37 -0400 Original-Received: (qmail 86915 invoked from network); 13 Oct 2006 18:13:48 -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=zzVOOWwAaJjbgYbczPY/BCFyNugq/lnLdUi4gKO4dpu88YZJH1eYxInCFKwLbcCGjDNVS/VvqVFFRhVb7r4F99z6AXj2YlyU9+8tRCkKLGcNIV5DYlCx4v81vecH35hnVFnQPXMu5n5OPyZzN58P6rMFx0YT2PxUEKtx+o/BCnM= ; Original-Received: from unknown (HELO ?131.130.201.22?) (tlink2001@131.130.201.22 with plain) by smtp004.mail.ukl.yahoo.com with SMTP; 13 Oct 2006 18:13:47 -0000 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: Lennart Borgman In-Reply-To: <45265833.4030709@student.lu.se> X-Mailman-Approved-At: Fri, 13 Oct 2006 14:56:56 -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:60722 Archived-At: > ! (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. ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de