I have recently started using ivy, and I've been very happy with it. The only behaviour which I've found quite surprising, is the combination of completions and read-file-name
. As an example, if I evaluate the following snippet with ivy switched off, and just press return, I get the expected result that "test" is printed.
(let* ((default "test")
(name (read-file-name (format "Master file (default %s): "
(or default "this file"))
nil default)))
(print name))
If instead I evaluate the code with ivy running, and just press return, ivy selects the first filename completion candidate (./
), and /home/myusername
is printed. There are quite a few different packages that I use which ask for filenames, but supply a sensible default value.
Ideally, I would like to be able to press return to use the default value, or start typing and have all of ivy's completion facilities handy. Is there any way of achieving that?