Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set executable path for a package on a configuration file on Emacs?

Tags:

emacs

prolog

I want to use "ediprolog" package on Emacs. I followed installation and usage instruction here https://www.metalevel.at/ediprolog/ and he says:

The two most important configuration options are:

ediprolog-system, either scryer (default) or swi

ediprolog-program, the path of the Prolog executable.

So I tried C-X , customize-group , ediprolog and checked the configuration file. The files looks like this:

enter image description here

To be honest I have no idea how, where can I edit to add the prolog executable path ~/.cargo/bin/scryer-prolog. In addition, Emacs says You can't edit this part of the Custom buffer when I tried to type something on the file.

And as I can expected, when I run ediprolog-dwim, "view-echo" says ediprolog-run-prolog: No prompt from: scryer-prolog, probably because I don't set the path on a configuration file.

I'm noob to Emacs and the package also, sorry about that, but I'm really struggling to achieve this step. Your comments must be really helpful for me. Thanks.

like image 470
丶 Limeー来夢 丶 Avatar asked Dec 31 '25 08:12

丶 Limeー来夢 丶


1 Answers

Try adding the path to the exec-path variable in emacs: when emacs forks off a subshell, this variable is added to the PATH that is passed to the subshell:

(add-to-list 'exec-path (expand-file-name (substitute-in-file-name "$HOME/.cargo/bin")))
like image 142
NickD Avatar answered Jan 04 '26 14:01

NickD



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!