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

ivy.el (ivy--magic-file-slash): Fix dir expansion #1831

Closed
wants to merge 5 commits into from

Conversation

@basil-conto
Copy link
Collaborator

commented Nov 30, 2018

Please review each commit in turn. The first commit addresses #1829 and its commentary follows. The remaining commits are merely logic simplifications of the surrounding code.

Cc: @dwang20151005


Expand ivy-text against ivy--directory, not default-directory.

Perhaps the commentary of [1] was correct in that default-directory should be bound to ivy--directory more generally here.

[1]: ivy.el (ivy--magic-file-slash): Change priority in cond
2017-04-13 17:09:47 +0200 f94c15c

basil-conto added 5 commits Nov 30, 2018
ivy.el (ivy--magic-file-slash): Fix dir expansion
Expand ivy-text against ivy--directory, not default-directory.

Perhaps the commentary of [1] was correct in that default-directory
should be bound to ivy--directory more generally here.

[1]: ivy.el (ivy--magic-file-slash): Change priority in cond
  2017-04-13 17:09:47 +0200 f94c15c

Fixes #1829
ivy.el (ivy--magic-file-slash): Simplify I
Quote function symbols as such.  Assume default-directory is
non-nil.  Do not unnecessarily modify match data.  An existent
directory is also an existent file.
ivy.el (ivy--magic-file-slash): Simplify II
Remove duplicate ivy-magic-slash-non-match-create cond branch.
ivy.el (ivy--magic-file-slash): Simplify III
Tidy up ivy-magic-slash-non-match-cd-selected cond guard.
ivy.el (ivy--magic-file-slash): Simplify IV
Lift common subexpressions, namely expanded ivy-text and boolean
indicating whether ivy-text comprises more than just a single slash.
@abo-abo

This comment has been minimized.

Copy link
Owner

commented Dec 13, 2018

Thanks. Would be cool to eventually add some tests to this.

@dwang20151005

This comment has been minimized.

Copy link

commented Dec 13, 2018

Does "closed" mean this PR was accepted and merged, or rejected without merge?

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Dec 13, 2018

@dwang20151005 Means it's merged. You can check it if you look at the commit message.

Github doesn't recognize it as merged because I had to rebase the PR on top of new changes.

@dwang20151005

This comment has been minimized.

Copy link

commented Dec 13, 2018

Got it, thanks. (Sorry, not familiar with git/github.)

@basil-conto basil-conto deleted the basil-conto:blc/magic branch Dec 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.