New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home directory behavior #679

sachdevaprash opened this Issue Sep 16, 2016 · 5 comments


None yet
3 participants

sachdevaprash commented Sep 16, 2016

This is a subtle difference in the way Swiper deals with the home directory. The home directory seems to be accessible with pressing ~, so C-x C-f ~.emacs would open the .emacs file in the home directory. This behavior is incompatible with the default emacs find-file behavior of using ~/ for home directory. This leads to unfamiliar behavior, such as pressing C-x C-f ~/.emacs when in home directory and finding that you have reached file /.emacs


This comment has been minimized.


abo-abo commented Sep 16, 2016

The defaults aren't perfection, there's always room for improvement.

I think the ability to cd to home with only rather than / is an enhancement rather than regression.

@abo-abo abo-abo closed this Sep 16, 2016


This comment has been minimized.

sachdevaprash commented Sep 19, 2016

Let me elaborate on my point and then you can choose to ignore it if you still like.

Typing C-x C-f ~/.emacs produces the text ~//.emacs in the minibuffer. In most terminals (I checked bash, zsh and eshell), ~//.emacs corresponds to ~/.emacs, but counsel-find-file opens /.emacs.


This comment has been minimized.

UnwashedMeme commented Oct 24, 2016

@sachdevaprash I came across this as well, there's a pull-request and code you can copy in if you want at #687 we've been unable to come up with any good way to integrate this without breaking existing behavior.


This comment has been minimized.

sachdevaprash commented Oct 25, 2016

@UnwashedMeme That seems like what I need. Thanks!
Can't this behavior be based on a variable to decide how ~ functions?

abo-abo added a commit that referenced this issue Oct 25, 2016

ivy.el (ivy-magic-tilde): New defcustom
Decide if "~" or "~/" should cd home.

* ivy.el (ivy--exhibit): Update.

Fixes #687
Fixes #679

This comment has been minimized.


abo-abo commented Oct 25, 2016

Now you can set the variable to get the behavior that you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment