benma / visual-regexp-steroids.el

Extends visual-regexp to support other regexp engines
255 stars 14 forks source link

vr--command: Searching for program: no such file or directory, %s #3

Closed shackra closed 10 years ago

shackra commented 10 years ago

I'm using visual-regexp-steroids version (snapshot?) 20140311.724, and it have stop working yelling the error vr--command: Searching for program: no such file or directory, %s I have the feeling that this error have some relation to this line of code (defcustom vr/command-python (format "python %s" (expand-file-name "regexp.py" (file-name-directory load-file-name))) in the file visual-regexp-steroids.el, which expands to python /home/jorge/.emacs.d/elpa/visual-regexp-steroids-20140311.724/regexp.py in Custom mode.

I have both python2 and python3, python3 is my main python interpreter.

benma commented 10 years ago

Do you have the command python in your PATH, or are they only called python2 and python3? If it is the latter: use M-x customize-variable [RET] vr/command-python to define how the Python script should be invoked (i.e. replace python by python3).

shackra commented 10 years ago

I have python /home/jorge/.emacs.d/elpa/visual-regexp-steroids-20140311.724/regexp.py, doing python start the python3 interpreter. I change python to python2, this error happens: expand-file-name: Wrong type argument: stringp, nil

I'm using GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.7) of 2014-01-28 on var-lib-archbuild-extra-x86_64-juergen

benma commented 10 years ago

Could you please add

(setq vr/command-python "python2 /home/jorge/.emacs.d/elpa/visual-regexp-steroids-20140311.724/regexp.py")

after the visual-regexp-steroids initialization code and try again? Does /home/jorge/.emacs.d/elpa/visual-regexp-steroids-20140311.724/regexp.py exist?

shackra commented 10 years ago

Huh, it works!

benma commented 10 years ago

Great. Then I will push a fix soon for the broken vr/command-python customization.