unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* upgrading packages via script
@ 2017-09-26 14:55 Seb
  2017-09-27 13:21 ` Michael Heerdegen
  2017-09-27 14:21 ` Bastian Beischer
  0 siblings, 2 replies; 6+ messages in thread
From: Seb @ 2017-09-26 14:55 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm trying to set up a script to upgrade packages using a cron job,
rather than interactively, as the latter has become a burden.  I'm using
Emacs 25.2.2 from Debian testing, and something is working inherently
different in the script compared to the interactive session.  At any
given time, the interactive session may display a number of packages
that can be upgraded, whereas the script fails to find any, even though
both are run with the same `package-archives' setting.

This is the script I wrote:

╭───── [ upgrade_packages.el ]
│ (setq package-archives
│       (quote
│        (("gnu" . "http://elpa.gnu.org/packages/")
│ 	("melpa" . "http://melpa.org/packages/")
│ 	("marmalade" . "https://marmalade-repo.org/packages/")
│ 	("org" . "http://orgmode.org/elpa/"))))
│ (package-initialize)
│ (list-packages)
│ (package-menu-mark-upgrades)
│ (package-menu-execute t)
╰─────

and this is how I run it:

---<--------------------cut here---------------start------------------->---
$ emacs -q --script upgrade_packages.el 
Loading 00debian-vars...
Loading /etc/emacs/site-start.d/20apel.el (source)...
Loading /etc/emacs/site-start.d/50asymptote.el (source)...
Loading /etc/emacs/site-start.d/50auctex.el (source)...
Loading /usr/share/emacs/site-lisp/auctex.el (source)...
Loading /usr/share/emacs/site-lisp/preview-latex.el (source)...
Loading /etc/emacs/site-start.d/50autoconf.el (source)...
Loading /etc/emacs/site-start.d/50bbdb3.el (source)...
Loading /etc/emacs/site-start.d/50cmake-data.el (source)...
Loading /etc/emacs/site-start.d/50devscripts-el.el (source)...
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...
Loading /etc/emacs/site-start.d/50dictionary-el.el (source)...
Loading dictionary-init...
Loading /etc/emacs/site-start.d/50dpkg-dev-el.el (source)...
Loading /etc/emacs/site-start.d/50el-get.el (source)...
Loading /etc/emacs/site-start.d/50emacs-goodies-el.el (source)...
Loading /etc/emacs/site-start.d/50festival.el (source)...
Loading /etc/emacs/site-start.d/50flim.el (source)...
Loading /etc/emacs/site-start.d/50gnugo.el (source)...
Loading /etc/emacs/site-start.d/50mailutils-mh.el (source)...
Loading /etc/emacs/site-start.d/50mh-e.el (source)...
Loading /etc/emacs/site-start.d/50mu4e.el (source)...
Loading /etc/emacs/site-start.d/50psvn.el (source)...
Loading /etc/emacs/site-start.d/50pylint.el (source)...
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...
Loading /etc/emacs/site-start.d/50texlive-lang-english.el (source)...
Loading /etc/emacs/site-start.d/50w3m-el-snapshot.el (source)...
Loading /etc/emacs/site-start.d/51debian-el.el (source)...
Loading /etc/emacs/site-start.d/51semi.el (source)...
Loading /etc/emacs/site-start.d/65wl.el (source)...
Setting ‘package-selected-packages’ temporarily since "emacs -q" would overwrite customizations
Waiting for refresh to finish...
No operations specified
---<--------------------cut here---------------end--------------------->---

Remove the -q option doesn't make a difference.  If I do the same in an
interactive session, there are a number of packages available for
upgrade.  Any idea why the script fails to work?

-- 
Seb




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-27 22:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 14:55 upgrading packages via script Seb
2017-09-27 13:21 ` Michael Heerdegen
2017-09-27 15:33   ` Seb
2017-09-27 22:39     ` Seb
2017-09-27 14:21 ` Bastian Beischer
2017-09-27 15:31   ` Sebastian P. Luque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).