[Top][All Lists]

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

Re: [package-vc] Consider cleaning up files from install process

From: Philip Kaludercic
Subject: Re: [package-vc] Consider cleaning up files from install process
Date: Tue, 19 Sep 2023 13:50:23 +0000

Adam Porter <adam@alphapapa.net> writes:

> I noticed this problem myself when I first tried using package-vc-install.
> An alternative would be to follow Quelpa's example: rather than
> loading the package directly from the git repository's directory, the
> package's files could be copied into a new directory in the elpa/
> directory, and Emacs could load the package from there.
> As a developer, I would prefer that approach, because I don't usually
> want Emacs to load whatever commit I may have checked out in a
> package's repository.  I want to install a commit of a package into my
> Emacs configuration and have that one loaded until I install a
> different one.

Isn't this workflow already supported by `package-install-file'?  And
otherwise, there wouldn't be much of a point to just replicate the
functionality of an existing package manager.

> In other words, the way package-vc-install currently works leaves me
> vulnerable to this scenario:
> 1.  I use package-vc-install to install one of my packages from its
> local repository directory.
> 2.  I check out a feature branch of that package to work on a new
> feature, saving some files but not loading any of the changed code.
> 3.  I restart Emacs (e.g. maybe I shut down the system and turned it
> back on the next day).
> 4.  That work-in-progress feature branch of my package gets loaded
> into Emacs automatically (which may be entirely broken, being a WIP).

I understand your issue, but anecdotally, I can also give an example
where I wanted to change some functionality, by M-x find-function'ing
the source buffer and then loosing the change after upgrading the

> Whereas if I use Quelpa, it installs the files a package's recipe
> specifies into the expected location in the elpa/ directory, and that
> remains independent of whatever I may have checked out in the
> package's local git directory.  My Emacs configuration and installed
> packages remain consistent regardless of whatever in-between state I
> may have left a package's repository in.
> Philip, would you be willing to consider switching to that model for
> package-vc-install, or offering it as an option?

Can you describe the interface you are imagining.  From what I
understand, it should be possible to reproduce what you need by
combining `package-vc-checkout' and `package-install-file'?

> Thanks,
> Adam

reply via email to

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