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

counsel--project-current should use project-root #3041

Closed
leahneukirchen opened this issue Apr 10, 2024 · 3 comments
Closed

counsel--project-current should use project-root #3041

leahneukirchen opened this issue Apr 10, 2024 · 3 comments
Labels
bug compat Issues relating to backward/forward compatibility

Comments

@leahneukirchen
Copy link

At some point project-current started to return longer lists such as (vc Git "/tmp/myrepo"), so counsel--project-current should not simply call cdr but project-root to get the directory out of this.

@basil-conto basil-conto added bug compat Issues relating to backward/forward compatibility labels Apr 13, 2024
@basil-conto
Copy link
Collaborator

At some point project-current started to return longer lists such as (vc Git "/tmp/myrepo"), so counsel--project-current should not simply call cdr

Thanks for reporting this! A fix was already proposed in PR #3003, but...

but project-root to get the directory out of this.

...I hope to have addressed the issue in a more general way now, which does not assume project-root (before it, there was only project-roots, and before that, there was no project.el!).

@leahneukirchen
Copy link
Author

I worry that this breaks if (project-current) returns nil.

basil-conto added a commit that referenced this issue Apr 13, 2024
* counsel.el (counsel--project-current): Fix when outside
project (#3041).
@basil-conto
Copy link
Collaborator

I worry that this breaks if (project-current) returns nil.

Oops, your worry is justified. Sorry about that, and thanks for catching it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compat Issues relating to backward/forward compatibility
Projects
None yet
Development

No branches or pull requests

2 participants