emacs-eldev / eldev

Elisp development tool
https://emacs-eldev.github.io/eldev/
GNU General Public License v3.0
226 stars 17 forks source link

Automatically detect ELDEV_LOCAL #63

Closed declantsien closed 2 years ago

declantsien commented 2 years ago

Automatically set ELDEV_LOCAL when runing eldev directly from source.

I have a copy of eldev source using straight.el. IMO, It's kind of chore to set envs like ELDEV_LOCAL.

Does changes like this) make sense?

doublep commented 2 years ago

This seems to be too confusing. I don't really want automatism here. I have export ELDEV_LOCAL="~/eldev" in my ~/.profile, which is enough for most purposes. But I also sometimes run ELDEV_LOCAL= eldev ... to quickly see differences in behavior between local code I change and the stable package.

declantsien commented 2 years ago

I have export ELDEV_LOCAL="~/eldev" in my ~/.profile, which is enough for most purposes

Well this doesn't seem ideal to me. More like a hard-code setting, in my case I guess it would be ~/.config/emacs/var/straight/repos/eldev. I don't want this random path in my profile, mainly because I only want to try it out at this point.

The use case here I think (developer experience(installation process) point of view):

Anyway, not a deep user here. But I do have some other questions:

doublep commented 2 years ago

I don't want this random path in my profile, mainly because I only want to try it out at this point.

Then just run export ELDEV_LOCAL="~/eldev" in a console. Until you close it, the variable will be set there. From my point of view, ELDEV_LOCAL is a developer-only thing and should never be implicitly set. If you want it, you need to make an explicit decision.

Will it showup in system package manager?

If someone asks and someone takes effort to add and maintain a package. Such a package would consist basically of just the short script, because bootstrapping happens automatically. I won't make any efforts to arrange this myself in any distro, though.

Does it make sense to use straight.el instead of package.el?

No. Eldev is supposed to provide a "native Emacs" environment. Maybe using straight.el could become an option, but certainly not by default, i.e. not instead of native Emacs code.

declantsien commented 2 years ago

Thank you for taking my questions. Closing this one.