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: Sun, 15 Oct 2006 11:00:06 +0200 Message-ID: <4531F896.5050104@student.lu.se> References: <452517DC.5010007@student.lu.se> <45251C56.8010603@student.lu.se> <4531032D.6060708@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 1160902888 9821 80.91.229.2 (15 Oct 2006 09:01:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 15 Oct 2006 09:01:28 +0000 (UTC) Cc: Eli Zaretskii , Carsten Dominik , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 15 11:01:27 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 1GZ1s6-0001Lk-79 for ged-emacs-devel@m.gmane.org; Sun, 15 Oct 2006 11:01:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZ1s5-0005fR-8b for ged-emacs-devel@m.gmane.org; Sun, 15 Oct 2006 05:01:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GZ1ra-0005aw-He for emacs-devel@gnu.org; Sun, 15 Oct 2006 05:00:54 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GZ1rZ-0005ZS-FB for emacs-devel@gnu.org; Sun, 15 Oct 2006 05:00:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GZ1rZ-0005Yh-0l for emacs-devel@gnu.org; Sun, 15 Oct 2006 05:00:53 -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 1GZ20O-0002Ki-OK; Sun, 15 Oct 2006 05:10:01 -0400 Original-Received: from c83-249-218-244.bredband.comhem.se ([83.249.218.244]:62661 helo=[192.168.123.121]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1GZ1rN-00074P-5k; Sun, 15 Oct 2006 11:00:44 +0200 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Original-To: "Kim F. Storm" In-Reply-To: X-Scan-Result: No virus found in message 1GZ1rN-00074P-5k. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1GZ1rN-00074P-5k d13b176c308bebeb79064ef7896315c5 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:60752 Archived-At: Kim F. Storm wrote: > Lennart Borgman writes: > > >> Index: flymake.el >> =================================================================== >> RCS file: /cvsroot/emacs/emacs/lisp/progmodes/flymake.el,v >> retrieving revision 1.41 >> diff -c -r1.41 flymake.el >> *** flymake.el 16 Feb 2006 11:40:51 -0000 1.41 >> --- flymake.el 11 Oct 2006 22:57:10 -0000 >> *************** >> *** 1021,1027 **** >> (progn >> (flymake-get-project-include-dirs-from-cache basedir)) >> ;;else >> ! (let* ((command-line (concat "make -C\"" basedir "\" >> DUMPVARS=INCLUDE_DIRS dumpvars")) >> (output (shell-command-to-string command-line)) >> (lines (flymake-split-string output "\n")) >> (count (length lines)) >> --- 1021,1029 ---- >> (progn >> (flymake-get-project-include-dirs-from-cache basedir)) >> ;;else >> ! (let* ((command-line (concat "make -C\"" >> ! (shell-quote-argument basedir) >> ! "\" DUMPVARS=INCLUDE_DIRS dumpvars")) >> (output (shell-command-to-string command-line)) >> (lines (flymake-split-string output "\n")) >> (count (length lines)) >> > > > Shouldn't you remove the old quotes here? > > (let* ((command-line (concat "make -C " > (shell-quote-argument basedir) > " DUMPVARS=INCLUDE_DIRS dumpvars")) > Yes, of course. Thanks. > >> Index: ada-xref.el >> =================================================================== >> RCS file: /cvsroot/emacs/emacs/lisp/progmodes/ada-xref.el,v >> retrieving revision 1.26 >> diff -c -r1.26 ada-xref.el >> *** ada-xref.el 10 Feb 2006 09:00:31 -0000 1.26 >> --- ada-xref.el 11 Oct 2006 22:55:48 -0000 >> *************** >> *** 1916,1923 **** >> (set-buffer (get-buffer-create "*grep*")) >> (while dirs >> (insert (shell-command-to-string >> ! (concat "egrep -i -h '^X|" regexp "( |$)' " >> ! (file-name-as-directory (car dirs)) "*.ali"))) >> (set 'dirs (cdr dirs))) >> >> ;; Now parse the output >> --- 1916,1926 ---- >> (set-buffer (get-buffer-create "*grep*")) >> (while dirs >> (insert (shell-command-to-string >> ! (concat "egrep -i -h '^X|" >> ! (shell-quote-argument regexp) >> ! "( |$)' " >> ! (shell-quote-argument (file-name-as-directory (car dirs))) >> ! "*.ali"))) >> (set 'dirs (cdr dirs))) >> >> ;; Now parse the output >> > > > This looks more correct to me: > > (concat "egrep -i -h " > (shell-quote-argument (concat "^X|" regexp "( |$)")) " " > (shell-quote-argument (file-name-as-directory (car dirs))) "*.ali"))) > > Yes, I misread it totally.