[英]Emacs doesn't see agda when launched from an .sh script
I made an .sh
script with the following code我用以下代码制作了一个
.sh
脚本
#!/bin/sh
cd ~/Projects/Agda\ projects/
emacs
But whenever I launch it I get the following error但是每当我启动它时,我都会收到以下错误
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.
In this session agda's executable isn't on the PATH
and PATH
differs from what I have in ~/.bashrc
在此 session 中,agda 的可执行文件不在
PATH
中,并且PATH
与我在~/.bashrc
中的不同
I have tried installing exec-path-from-shell
but that didn't solve the problem.我尝试安装
exec-path-from-shell
但这并没有解决问题。
Launching emacs
from konsole
manually works flawlessly for some reason.出于某种原因,从
konsole
手动启动emacs
工作完美。
Debug trace:调试跟踪:
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()
How do I launch emacs
with agda-mode
from an.sh script?如何从 an.sh 脚本使用
agda-mode
启动emacs
?
suggesting to add environment context to your script.建议将环境上下文添加到脚本中。
#!/bin/sh
. ~/.profile
cd ~/Projects/Agda\ projects/
emacs
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.