[英]Emacs doesn't see agda when launched from an .sh script
我用以下代碼制作了一個.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.
在此 session 中,agda 的可執行文件不在PATH
中,並且PATH
與我在~/.bashrc
中的不同
我嘗試安裝exec-path-from-shell
但這並沒有解決問題。
出於某種原因,從konsole
手動啟動emacs
工作完美。
調試跟蹤:
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()
如何從 an.sh 腳本使用agda-mode
啟動emacs
?
建議將環境上下文添加到腳本中。
#!/bin/sh
. ~/.profile
cd ~/Projects/Agda\ projects/
emacs
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.