我用.sh以下代碼制作了一個腳本
#!/bin/sh
cd ~/Projects/Agda\ projects/
emacs
但是每當我啟動它時,我都會收到以下錯誤
File is missing: Cannot open load file, no such file or directory, /bin/bash: agda-mode: command not found
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.
在本次會議中,agda 的可執行檔案不在PATH并且PATH與我在~/.bashrc
我已經嘗試安裝exec-path-from-shell,但這并沒有解決問題。
由于某種原因,emacs從手動啟動完美無缺。konsole
除錯跟蹤:
Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "/bin/bash: agda-mode: command not found\n")
load("/bin/bash: agda-mode: command not found\n" nil nil t)
load-file("/bin/bash: agda-mode: command not found\n")
eval-buffer(#<buffer *load*> nil "/home/bratjuuc/.emacs" nil t) ; Reading at buffer position 470
load-with-code-conversion("/home/bratjuuc/.emacs" "/home/bratjuuc/.emacs" t t)
load("~/.emacs" t t)
#f(compiled-function () #<bytecode 0x1e0f4d>)()
command-line()
normal-top-level()
如何emacs從agda-mode.sh 腳本啟動?
uj5u.com熱心網友回復:
建議將環境背景關系添加到您的腳本中。
#!/bin/sh
. ~/.profile
cd ~/Projects/Agda\ projects/
emacs
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/450364.html
上一篇:在linux中寫一個猜謎游戲,我不斷收到錯誤訊息:意外令牌附近的語法錯誤'完成
下一篇:傳遞引數以在bash腳本中查找
