[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: |
Wed, 25 May 2022 14:27:16 +0200 |
User-agent: |
mu4e 1.7.23; emacs 29.0.50 |
Lars Ingebrigtsen <larsi@gnus.org> writes:
Hi Lars,
>> When seeing that command being introduced, I've also made my own version
>>
>> (defun th/package-update-all ()
>> (interactive)
>> (package-refresh-contents)
>> (package-update-all (called-interactively-p)))
>>
>> because package-update-all doesn't seem to update the package database.
>> I can't see the "Contacting host: elpa.gnu.org" message and the same for
>> the other archives.
>
> Yes, perhaps -update-all should also call -refresh-contents?
IMHO, yes. 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>".
> By the way, the following also seems to work:
>
> ./src/emacs -batch -l ~/.emacs -f package-refresh-contents -f
> package-update-all
Indeed. So you another way to handle this issue was to just document
the current behavior and add a command line update-all recipe.
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.
Bye,
Tassilo
- Re: package-update-all from command line, (continued)
- Re: package-update-all from command line, Stefan Monnier, 2022/05/24
- Re: package-update-all from command line, Sam Steingold, 2022/05/24
- Re: package-update-all from command line, Stefan Monnier, 2022/05/24
- Re: package-update-all from command line, Sam Steingold, 2022/05/25
- Re: package-update-all from command line, Stefan Monnier, 2022/05/25
- Re: package-update-all from command line, Sam Steingold, 2022/05/26
- Re: package-update-all from command line, Stefan Monnier, 2022/05/26
Re: package-update-all from command line, Lars Ingebrigtsen, 2022/05/24