Skip to content
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

Closed
sachdevaprash opened this issue Sep 16, 2016 · 5 comments
Closed

Home directory behavior #679

sachdevaprash opened this issue Sep 16, 2016 · 5 comments

Comments

@sachdevaprash
Copy link

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

@abo-abo
Copy link
Owner

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 as completed Sep 16, 2016
@sachdevaprash
Copy link
Author

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.

@UnwashedMeme
Copy link

@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.

@sachdevaprash
Copy link
Author

@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
Decide if "~" or "~/" should cd home.

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

Fixes #687
Fixes #679
@abo-abo
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants