emacs-devel
[Top][All Lists]
Advanced

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

Re: package-update-all from command line


From: Tassilo Horn
Subject: Re: package-update-all from command line
Date: Fri, 27 May 2022 22:33:40 +0200
User-agent: mu4e 1.7.23; emacs 29.0.50

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> The same question applies to `package-update' but there it would be
>> annoying if it always refreshed first when updating one package after
>> the other.  So maybe the refreshes should be restricted to "there
>> hasn't been a refresh in the last <N> <TIMEUNIT>".
>
> Yes, perhaps that'd be nice?  But I'd expect somebody who'd use that
> function would already know that the package in question has an
> update, so a refresh might not be vital there.
>
> Or...  Hm.  No, I think you're right.  Perhaps it should only do these
> refreshes when called interactively, though?

I'm not sure how people will use that command.  FWIW, I just update all
and be done.  But others might want to use package-update in order to
know exactly what is going to be updated and then invoke it multiple
times in a row.  In such a case, I think it would be a bit annoying if
it always refreshed just because that might take some seconds.

One easy way around that would be to use completing-read-multiple
instead of completing-read in package-update so that you don't need to
call it multiple times in order to update more than one package.

>> However, your "emacs -batch -l ~/.emacs ..." recipe doesn't work with
>> every init file, at least it didn't work with mine.  I use
>> `user-init-file' in my ~/.emacs.d/init.el which is nil if emacs is
>> started with -batch, and it seems that packages are not initialized
>> so emacs complained about void-function use-package.  I've catered
>> for it in my init file now but I guess -batch -l <init-file> cannot
>> be recommended as a general practice for this purpose.
>
> It's a bit of a chicken/egg problem, perhaps?

I wouldn't say so.  It's just that -batch is more suited for stuff like
"byte-compile this lisp file".  I wouldn't mind having additional
options -user-batch and -user-script which act the same as the non-user
versions but do the normal startup initialization.

Bye,
Tassilo



reply via email to

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