emacs-devel
[Top][All Lists]
Advanced

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

Re: Docs on ELPA (was Re: Adding Flycheck to NonGNU ELPA)


From: Philip Kaludercic
Subject: Re: Docs on ELPA (was Re: Adding Flycheck to NonGNU ELPA)
Date: Sat, 24 Feb 2024 08:04:52 +0000

Adam Porter <adam@alphapapa.net> writes:

>> Something similar I had in mind was a variation on package-install that
>> wouldn't persist the installation, and instead of extracting the files
>> into .../elpa/, would store them in a /tmp/ sub-directory.  That would
>> go further than what you are describing, but would make trying out a
>> package easier.
>
> FYI, that exists in the form of the `try' package available on
> MELPA.

I am surprised to hear that someone had to write a package for that,
when the basic functionality can be provided by

--8<---------------cut here---------------start------------->8---
(defun package-install-temporarily (pkg)
  (interactive
   (progn
     (package--archives-initialize)
     (list (intern (completing-read "Try: " package-archive-contents)))))
  (let ((package-user-dir (make-temp-file "package-tmp" t nil)))
    (package-install pkg t)))
--8<---------------cut here---------------end--------------->8---

(and if we extracted the interactive part from package-install, then it
would be even shorter).  Another idea would be to provide a generic
temporary package prefix command or minor mode.

>        It works well.  Maybe it could be added to GNU ELPA.  Or maybe
> a `package-try' command could be added to package.el.

That name is a bit short, and it is not clear what is meant.  Try to
install a package, try to find a package, etc.



reply via email to

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