简体   繁体   中英

Emacs, anything and the Everything search tool under Windows 7

I am struggling to get Everything working with anything in Emacs 24.3.1 on Windows 7. Ultimately I want to use anything-locate to browse code directories and subdirectories, as recommended in answers to this question . I did once, briefly, seem to have anything-locate working but I changed something and cannot get it back.

When I enter Mx anything-locate (or, using helm , Mx helm-locate ) I get a pattern: prompt but when I enter a search term I get an error message like this:

Locate
'es' is not recognized as an internal or external command,
operable program or batch file.

定位

I assume but do not know for sure that this is related to es.exe which is the command line version of Everything. In my init file I have this:

(add-to-list 'load-path "~/.emacs.d/.emacs.d/elpa/everything")
(setq everything-ffap-integration nil)
(setq everything-cmd "~/.emacs.d/.emacs.d/elpa/everything/es.exe")
(require 'everything)

...and I have edited everything.el so that the

(defcustom everything-cmd "c:/Programme/Everything/es.exe" "Path to es.exe."

line now reads:

(defcustom everything-cmd "~/.emacs.d/.emacs.d/elpa/everything/es.exe" "Path to es.exe."

(EDIT Please note that despite the "~/" convention used above, in reality the paths are fully qualified with c:/blah/blah/blah/.emacs.d/)

I expected this to allow Emacs to find es.exe . And yet it still throws the error message. Any thoughts on how to fix this?

I know this is old, but I found this question when I ran into the same problem with helm, so it might be useful. The problem was a conflict between how emacs specifies PATH, and how windows does it (similar to juanleon's suggestion). The solution was to remove all forms that modified the path in emacs, and instead just add es.exe to the windows path. es.exe is an extra download at the bottom of the voidtools download page, below the old versions, took me a while to find.

It is possible that windows shell (whatever it is) does not know how to expand "~/" (even if emacs does understand it).

A very quick test would be to copy the es.exe in "c:\\es.exe" and then repeat the test with the proper change in the configuration of everything-cmd; if it works then just use the whole path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM