|
From: | Lennart Borgman |
Subject: | Re: shell-command - missing shell-quote-argument for program? |
Date: | Sun, 15 Oct 2006 11:00:06 +0200 |
User-agent: | Thunderbird 1.5.0.7 (Windows/20060909) |
Kim F. Storm wrote:
Lennart Borgman <address@hidden> 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 outputThis 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.
[Prev in Thread] | Current Thread | [Next in Thread] |