0

I want to be able to update Emacs packages from the command line and then quit. I have written this function

    (defun updateandquit ()
      (configuration-layer/update-packages t)
      (spacemacs/kill-emacs))

And I call it with this:

emacs --batch -l ~/.emacs.d/init.el --eval="(updateandquit)"
Local variables list is not properly terminated
Loading /home/dewi/.spacemacs.d/init.el (source)...
Howdie-doodie fella!!!
Package cl is deprecated
Mark set
Starting a server...
(Spacemacs) --> refreshing package archive: melpa... [1/3]
Contacting host: melpa.org:443
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: melpa.org:443
Contacting host: melpa.org:443
Package refresh done
(Spacemacs) --> refreshing package archive: gnu... [2/3]
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Package refresh done
(Spacemacs) --> refreshing package archive: nongnu... [3/3]
Contacting host: elpa.nongnu.org:443
Importing package-keyring.gpg...
Importing package-keyring.gpg...done
Contacting host: elpa.nongnu.org:443
Package refresh done
Fetcher: github
Source: bmag/command-log-mode

Updating /home/dewi/.emacs.d/.cache/quelpa/build/command-log-mode/
Fetcher: file
Source: nil

Fetcher: github
Source: emacsmirror/font-lock-plus

Updating /home/dewi/.emacs.d/.cache/quelpa/build/font-lock+/
Fetcher: file
Source: nil

Fetcher: github
Source: emacsmirror/info-plus

Updating /home/dewi/.emacs.d/.cache/quelpa/build/info+/
Fetcher: github
Source: mmontone/emacs-inspector

Updating /home/dewi/.emacs.d/.cache/quelpa/build/inspector/
Fetcher: github
Source: mickeynp/ligature.el

Updating /home/dewi/.emacs.d/.cache/quelpa/build/ligature/
Fetcher: github
Source: syl20bnr/nose.el

Updating /home/dewi/.emacs.d/.cache/quelpa/build/nose/
Fetcher: github
Source: dalanicolai/org-journal

Updating /home/dewi/.emacs.d/.cache/quelpa/build/org-journal/
Fetcher: github
Source: syl20bnr/ox-gfm

Updating /home/dewi/.emacs.d/.cache/quelpa/build/ox-gfm/
Fetcher: github
Source: alex-hhh/emacs-sql-indent

Updating /home/dewi/.emacs.d/.cache/quelpa/build/sql-indent/
(Spacemacs) --> Found 2 package(s) to update:

(Spacemacs) lsp-mode

(Spacemacs) posframe

(Spacemacs) --> performing backup of package(s) to update...

(Spacemacs) --> preparing update of package posframe... [1/2]
Package ‘posframe-20211109.1132’ deleted.
(Spacemacs) --> preparing update of package lsp-mode... [2/2]
Package ‘lsp-mode-20211109.826’ deleted.

But the problem is when I start Emacs it still spends a bit of time updating and installing packages. Is there a cli command to automate all this?

1
  • anyone? thanksvmuch Dec 22 '21 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.