Emacs의 특정 쉘에서 `Mx compile`을 어떻게 실행할 수 있나요?

Emacs의 특정 쉘에서 `Mx compile`을 어떻게 실행할 수 있나요?

에서만 컴파일할 수 있는 소프트웨어가 있습니다 my-weird-sh. 저는 some-better-sh일상적인 작업에 사용하는 것을 좋아합니다 . 이것이 바로 로그인 셸입니다( 를 통해 chsh). 이것은 my-better-sh일반적으로 모두 훌륭하고 멋진 Emacs의 쉘을 변경합니다 . 그러나 some-better-sh소프트웨어를 컴파일할 수 없습니다.

셸을 어떻게 변경할 수 있나요 compile?

답변1

사용

(defun weird-compile () (interactive)
  (let ((shell-file-name "/bin/my-weird-sh"))
    (call-interactively #'compile)))

shell-file-name이는 호출할 때 로컬로 설정되며 weird-compile선택한 키에 바인딩할 수 있습니다.

관련 정보