xref and ag path problems after recent ivy update #2149
I've been having some path problems with some commands after a recent Ivy update. I can pin down the issue between "ivy-20190715.1950" (where it works) and "ivy-20190717.1355" (where it no longer doesn't).
I don't really fully understand what's going on, but I think I could isolate it enough to be able do describe it to you with decent precision.
Find a library of your choice:
Go to a variable of function of your choice, let's say the
Accept default with RET, and accept current directory with
The backtrace is:
Accept default search term with RET, accept current directory with
These errors do not happen with "ivy-20190715.1950".
I'm running Emacs 26.2, the Ivy versions were given above. If you need any other info, let me know.
The text was updated successfully, but these errors were encountered:
The issue comes down to the return result of
(read-directory-name "Choose the project directory: " dir nil t)
The reference completion function,
The solution to have C-M-j be usable for your case is to patch
I'll have to think about this more later. But for now, C-m and C-j bindings should work for you.
@abo-abo Thank you for your prompt response.
There is no problem here to keep things running, as I simply rolled back to "ivy-20190715.1950".
But, that aside, in principle "C-m" and "C-j" will not substitute for "C-M-j" in this case, as far as I can tell. They will both select the first candidate available which, in my case is "calc", so the search is performed in "/usr/local/share/emacs/26.2/lisp/calc/" and not in "/usr/local/share/emacs/26.2/lisp/" as desired. From a user's perspective, I'm just trying to select the current directory somehow (indeed, there is actually no "project" associated with these files, they are not version controlled or anything).
Anyway, as I mentioned, I don't really get what is going on. So I just remain at your disposal in case you need any more info on the matter.
Even though you seem to already know where to look at, just adding some information, as in another computer I have a newer version of Ivy, "ivy-20190716.1748", which does not exhibit the problem. So you can narrow down further between "ivy-20190716.1748" and "ivy-20190717.1355".
…name `read-directory-name' returns "" when the completion function passes it back the DEF argument. This is a highly questionable behavior that some old functions depend on. Looks like it's better to break those old functions, rather than break the more important functions that have no idea why `read-directory-name' returns "". * ivy-test.el (ivy-read-file-name-in-buffer-visiting-file): Now fails. (ivy-read-directory-name): Add test. Fixes abo-abo#2165 Fixes abo-abo#2149 Re abo-abo#1170