我在Emacs中使用Rinari進行Rails開發。 M-x shell將打開一個新的緩衝區,該緩衝區正確地用於我的環境(zsh)。 M-x eshell使用了所有不正確的PATH,並且我無法將它與任何東西配合使用。當Emacs動作需要在新緩衝區中產生一個shell時,使用shell與eshell
有一個Rinari函數可以啓動我正在編輯的Rails應用程序的Web服務器實例,但是它打開的服務器實例的緩衝區是eshell。
我怎樣才能最終得到這個打開緩衝區使用shell(或什麼會打開M-x shell)呢?
下面是我試圖執行的命令的defun。
有沒有簡單的設置,我可以改變或尋找什麼外殼打開的變量?
(defun rinari-web-server (&optional edit-cmd-args)
"Run script/server. Dump output to a compilation buffer
allowing jumping between errors and source code. With optional
prefix argument allows editing of the server command arguments."
(interactive "P")
(let* ((default-directory (rinari-root))
(script (concat (expand-file-name "server"
(file-name-as-directory
(expand-file-name "script" (rinari-root))))
(if rinari-rails-env (concat " -e " rinari-rails-env))))
(command (if edit-cmd-args
(read-string "Run Ruby: " (concat script " "))
script)))
(ruby-compilation-run command)) (rinari-launch))