나는 mode-compile.el v2.29 만 사용할 수 있습니다. 그러나 해당 버전에서 설명하는 것과 똑같은 문제가 발생합니다. 컴파일 명령의 인수가 올바르게 이스케이프되지 않으며 활성화 할 수있는 옵션이 없습니다.
그것은 해킹 약간입니다하지만 당신은 정확한 당신의 .emacs
파일이와 파일 이름을 탈출하여 관련 기능을 재정의 할 수 있어야한다 :
(eval-after-load 'mode-compile
'(progn
(defun mc--shell-compile (shell dbgflags &optional errors-regexp-alist)
;; Run SHELL with debug flags DBGFLAGS on current-buffer
(let* ((shcmd (or (mc--which shell)
(error "Compilation abort: command %s not found" shell)))
(shfile (or mc--remote-pathname (buffer-file-name)
(error "Compilation abort: Buffer %s has no filename"
(buffer-name))))
(run-cmd (concat shcmd " " dbgflags " " (shell-quote-argument shfile) " "
(setq mc--shell-args
(read-string (if mode-compile-expert-p
"Argv: "
(format "Arguments to %s %s script: "
shfile shell))
mc--shell-args)))))
;; Modify compilation-error-regexp-alist if needed
(if errors-regexp-alist
(progn
;; Set compilation-error-regexp-alist from compile
(or (listp errors-regexp-alist)
(error "Compilation abort: In mc--shell-compile errors-regexp-alist not a list."))
;; Add new regexp alist to compilation-error-regexp-alist
(mapcar '(lambda(x)
(if (mc--member x compilation-error-regexp-alist) nil
(setq compilation-error-regexp-alist
(append (list x)
compilation-error-regexp-alist))))
errors-regexp-alist)))
;; Run compile with run-cmd
(mc--compile run-cmd)))))
내가 변화 라인이 변경되었다
(run-cmd (concat shcmd " " dbgflags " " shfile " "
(run-cmd (concat shcmd " " dbgflags " " (shell-quote-argument shfile) " "
에 더 완전한 수정도하는 것
dbgflags
(그들이 설정되어있는 곳이면 전체 변수를 이스케이프하는 것만으로는 적합하지 않을 것입니다.)과
mc--shell-args
을 설정하면 이스케이프됩니다.
'C-c c'는 비표준 바인딩 인 것으로 보입니다. 'C-h c C-c c'라고 입력하면 어떻게됩니까? – legoscia
'mode-compile.el'은 표준이 아닙니다. http://perso.tls.cena.fr/boubaker/distrib/mode-compile.el 또는 다른 것을 사용하고 있습니까? – phils
@phils 의도적으로'mode-compile.el'을 사용하고있는 것이 아닙니다. - 설치를 시도한 기억이 없으며, 사용하는 유일한 언어가 해석되어서 직접적으로 그렇게 할 필요가 없습니다. (R, Perl) . 아마 그것은 ESS와 함께 설치된 무언가입니다 ...? Perl 스크립트가 버퍼에 있으면 주요 모드는 CPerl이고 부 모드는 Abbrev입니다. 분명히 다른 것은 없습니다. – SlowLearner