emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Installing binaries with package.el


From: Clément Pit-Claudel
Subject: Re: Installing binaries with package.el
Date: Thu, 9 Feb 2017 15:11:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 2017-02-09 14:47, Achim Gratz wrote:
> Clément Pit-Claudel writes:
>> Sorry, maybe my original question wasn't clear.  The question was:
>> I wrote a command line utility in ELisp (it doesn't provide
>> interactive commands; just a command line interface).  What's the
>> preferred way for users to install it?
> 
> I understood that to be the case, but it's a very surprising use of 
> package.el and ELisp.

I don't know how common it is, but the support for this has been there this 
version 22 (shebang lines are skipped by the ELisp interpreter, and emacs can 
be started with --script).  There seems to be a fair number of uses on Github 
(https://github.com/search?q=emacs+--script&type=Code&utf8=✓)

> As I said I don't really have a suggestion at
> the moment, but this particular use case should not be handled as an
> "Emacs package".  You use Emacs as a VM for some scripting here.

Not entirely.  The above was a bit of an exaggeration: the package does provide 
interactive commands, in addition to the CLI.  And it has dependencies on other 
Emacs packages, meaning that it isn't trivial to just distribute it as (say) a 
Debian package.

>>> I simply don't think that wrapper scripts and/or compiling
>>> binaries is appropriate for ELPA packages, it just opens one big
>>> can of worms that I don't really want to deal with in any way.
>> 
>> I don't understand this part too well.  Are you saying that ELPA
>> isn't the right place to distribute a command line application
>> written entirely in ELisp?  (Note that the task that I'm describing
>> has nothing to do with compiling binaries — sorry if that wasn't
>> clear).
> 
> Well, I would want to distinguish between Emacs packages proper and 
> Emacs as a scripting VM.

Do you know of other systems that distinguish in that way? The ones that I'm 
familiar with (cabal, pip, and opam) are all used to install both applications 
and libraries.  Do you think there's something special about Emacs Lisp that 
makes it different?

> The more I think about it, package.el should guarantee that it
> doesn't write outside the package directory unless it has explicit
> user consent.

That's fine by me: I have no problem with writing to e.g. elpa/bin/.  And I'd 
be even happier if this was taken care of by package.el.
I don't have objections to prompts, either.

Clément.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]