abo-abo / swiper

Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
https://oremacs.com/swiper/
2.27k stars 337 forks source link

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

Closed leahneukirchen closed 2 months ago

leahneukirchen commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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

basil-conto commented 2 months ago

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

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