wyuenho / emacs-pet

Tracks down the correct Python tooling executables from your virtualenvs so you can glue the binaries to Emacs and delete code in init.el
GNU General Public License v3.0
105 stars 13 forks source link

Unable to guess virtualenv #16

Closed Compro-Prasad closed 1 year ago

Compro-Prasad commented 1 year ago

pet-project-root returns nil in my sample python project initialized using poetry. I am using Emacs 28.2 without projectile.

pet-locate-dominating-file should generally return the directory which has pyproject.toml but fails to do so as it is also dependent on pet-project-root. Removing the dependency on pet-project-root should help in this case.

Source:

https://github.com/wyuenho/emacs-pet/blob/7620c18223f126c384dbf42b0b167a6066a81dd1/pet.el#L157

wyuenho commented 1 year ago

Just git init the directory will solve your problem.

Compro-Prasad commented 1 year ago

@wyuenho Technically speaking you are correct.

On the other hand I have many throw out projects where doing a git init is too much.

Many people who don't know about version control system and only python wont be able to make use of this package.

In such cases this package wont have any use even though there are valid ways to guess virtualenvs.

wyuenho commented 1 year ago

In that case, install projectile.

Compro-Prasad commented 1 year ago

Since you don't consider this an issue, I just copied your pet.el and modified for my own purposes.

https://github.com/Compro-Prasad/emacs-config/blob/master/lisp/pet.el

On Sat, 18 Feb 2023, 5:20 am Jimmy Yuen Ho Wong, @.***> wrote:

In that case, install projectile.

— Reply to this email directly, view it on GitHub https://github.com/wyuenho/emacs-pet/issues/16#issuecomment-1435402238, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACVAWGQGQ62RSEAZ6V6EDQDWYAFF5ANCNFSM6AAAAAAU2ACPIY . You are receiving this because you authored the thread.Message ID: @.***>