问题
I am trying to use pdb in emacs. I need to change path to PYTHONPATH=lib
. But when I typed
Run pdb (like this): PYTHONPATH=lib pdb ./pychess
.
Emacs gives me an error saying the file PYTHONPATH=lib isn't found. How do I specify path when running pdb in emacs? In terminal PYTHONPATH=lib pdb ./pychess runs fine, but not in emacs.
Oh I got it just type PYTHONPATH=lib emacs
when launching emacs. Not sure about changing path after launching though...
回答1:
you can try to set the environment variable with in the emacs (say putting in .emacs
or using M-:) like this
(setenv "PYTHONPATH" "lib")
来源:https://stackoverflow.com/questions/8608661/how-to-specifiy-path-when-using-pdb-in-emacs