You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@abo-abo if I call (read-file-name "test: " "~/.emacs.d") in scratch buffer , then the result is correct, but it's not working when I open any files in my disk...
DIR is the directory to use for completing relative file names.
It should be an absolute directory name, or nil (which means the
current buffer's value of `default-directory').
Activity
abo-abo commentedon May 20, 2016
A minimal example, please.
zilongshanren commentedon May 20, 2016
At first, turn ivy-mode on, open any file and press
M-S-:to execute the sexp(read-file-name "test:" ~/.emacs.d"),it will list the current file's directory rather than the files in "~/.emacs.d" directory.
zilongshanren commentedon May 20, 2016
@abo-abo
If I give a extra 3nd parameter to the
read-file-namefunction, it will give me the correct file lists.abo-abo commentedon May 20, 2016
That's because the first arg is
promptand the second isdir.This works:
zilongshanren commentedon May 20, 2016
@abo-abo
sorry, my mistake,
(read-file-name "test: " "~/.emacs.d")is still not working...zilongshanren commentedon May 20, 2016
@abo-abo if I call
(read-file-name "test: " "~/.emacs.d")in scratch buffer , then the result is correct, but it's not working when I open any files in my disk...abo-abo commentedon May 20, 2016
Read the doc of
read-file-name:You must use an absolute path.
zilongshanren commentedon May 20, 2016
@abo-abo
it's still not working... when I disable the ivy-mode, problem solves...
/Users/guanghuiis my HOME directory, am I wrong here?Thanks.
When reading file names, check preselect and initial-input compat
abo-abo commentedon May 20, 2016
Please check.
zilongshanren commentedon May 20, 2016
@abo-abo 👍 thanks, problem solved.