1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-03 12:31:32 -08:00

* progmodes/grep.el (rgrep): Escape command line. Sometimes, it

is too long for Tramp.  See discussion in
<http://thread.gmane.org/gmane.emacs.tramp/8233/focus=8244>.

* progmodes/compile.el (compilation-start): Remove line escape template.
This commit is contained in:
Michael Albinus 2012-12-20 12:15:38 +01:00
parent 1687fb14cd
commit 91b982a035
3 changed files with 22 additions and 6 deletions

View file

@ -1,3 +1,12 @@
2012-12-20 Michael Albinus <michael.albinus@gmx.de>
* progmodes/grep.el (rgrep): Escape command line. Sometimes, it
is too long for Tramp. See discussion in
<http://thread.gmane.org/gmane.emacs.tramp/8233/focus=8244>.
* progmodes/compile.el (compilation-start): Remove line escape
template.
2012-12-20 Dmitry Antipov <dmantipov@yandex.ru>
* vc/ediff-ptch.el (ediff-map-patch-buffer): Use `point-min-marker'.

View file

@ -1611,7 +1611,11 @@ Returns the compilation buffer created."
(format "%s started at %s\n\n"
mode-name
(substring (current-time-string) 0 19))
command "\n")
;; The command could be split into several lines, see
;; `rgrep' for example. We want to display it as one
;; line.
(apply 'concat (split-string command (regexp-quote "\\\n") t))
"\n")
(setq thisdir default-directory))
(set-buffer-modified-p nil))
;; Pop up the compilation buffer.

View file

@ -992,14 +992,17 @@ to specify a command to run."
(compilation-start regexp 'grep-mode))
(setq dir (file-name-as-directory (expand-file-name dir)))
(require 'find-dired) ; for `find-name-arg'
;; In Tramp, there could be problems if the command line is too
;; long. We escape it, therefore.
(let ((command (grep-expand-template
grep-find-template
regexp
(concat (shell-quote-argument "(")
" " find-name-arg " "
(mapconcat #'shell-quote-argument
(split-string files)
(concat " -o " find-name-arg " "))
(mapconcat
#'shell-quote-argument
(split-string files)
(concat "\\\n" " -o " find-name-arg " "))
" "
(shell-quote-argument ")"))
dir
@ -1020,7 +1023,7 @@ to specify a command to run."
(concat "*/"
(cdr ignore)))))))
grep-find-ignored-directories
" -o -path ")
"\\\n -o -path ")
" "
(shell-quote-argument ")")
" -prune -o "))
@ -1038,7 +1041,7 @@ to specify a command to run."
(shell-quote-argument
(cdr ignore))))))
grep-find-ignored-files
" -o -name ")
"\\\n -o -name ")
" "
(shell-quote-argument ")")
" -prune -o "))))))