emacs-eldev / eldev

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

unable to run code with a different version #51

Closed Trevoke closed 2 years ago

Trevoke commented 2 years ago

Hi! I am using eldev 0.9.2 .

According to the documentation I should be able to do this:

% EMACS=emacs27.2 eldev test

But i get this error:

/home/stag/bin/eldev: 35: emacs27.2: not found

This also goes wrong if I try EMACS=emacs25 which is the example. Am I doing something wrong?

doublep commented 2 years ago

Well, is it installed? Is it in $PATH? This is the same error I get if I do e.g. $ EMACS=emacs999 eldev test:

/home/paul/.local/bin/eldev: 35: emacs999: not found

Basically, Eldev cannot do magic, you have to have Emacs of that version installed. It can be named whatever, it's just a name, e.g. EMACS=emacs-with-funny-extensions ... will work fine as long as that executable exists in $PATH and is some supported Emacs version. Eldev only guarantees that you can run using different versions interchangeably and this will not screw some internal state (the only exception, AFAIR, are byte-compiled files if you use those, but this is a general Emacs limitation).

Trevoke commented 2 years ago

Okay, makes sense. I assumed that since eldev handles package retrieval and installation, it might also handle installing and keeping track of versions of emacs.

Since it doesn't, I guess I have some additional work to do. Thanks.

What are the odds we can add a feature for eldev to retrieve/install multiple emacs versions? It might be able to piggyback on top of evm ?

doublep commented 2 years ago

What are the odds we can add a feature for eldev to retrieve/install multiple emacs versions?

Doesn't sound likely, because this seems to be very difficult to do across various supported OSes. If you want you can try creating a PR, I'd be willing to accept e.g. "this doesn't work on Windows", but even then I'd estimate this to be extremely complicated.

It might be able to piggyback on top of evm ?

Maybe, I never tried. Personally, I have installed a few versions of Emacs from Git and manually renamed /usr/local/bin/emacs to emacs-VERSION. This worked fine for me, though I never managed to compile anything older than 25.2.

I assumed that since eldev handles package retrieval and installation, it might also handle installing and keeping track of versions of emacs.

Fair enough, never looked at it from this angle. I will add a couple of sentences to the documentation to clear possible confusion.

doublep commented 2 years ago

Thank you. I cannot solve this, but at least I improved documentation to avoid further confusion.

doublep commented 2 years ago

By the way, there is now eldev docker command that might be what you need.

Trevoke commented 2 years ago

Oh that is awesome, thank you !

On Sat, Nov 13, 2021 at 3:25 PM Paul Pogonyshev @.***> wrote:

By the way, there is now eldev docker command that might be what you need.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/doublep/eldev/issues/51#issuecomment-968130925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQSSJ7P6DG5RLNRBFNSMTUL3CSRANCNFSM5FIBAJ4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.