GNU bug report logs - #19151
24.4; Batch mode doesn't call package-initialize, can't find packages

Previous Next

Package: emacs;

Reported by: Gary Oberbrunner <garyo <at> oberbrunner.com>

Date: Sat, 22 Nov 2014 22:32:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.4

Fixed in version 25.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gary Oberbrunner <garyo <at> oberbrunner.com>
Cc: 19151 <at> debbugs.gnu.org
Subject: bug#19151: 24.4; Batch mode doesn't call package-initialize, can't find packages
Date: Sun, 23 Nov 2014 18:29:46 +0200
> Date: Sat, 22 Nov 2014 17:24:25 -0500
> From: Gary Oberbrunner <garyo <at> oberbrunner.com>
> 
> In batch mode, emacs doesn't load installed packages, although the doc implies
> that it should. If you want to eval forms that require packages, you have to
> call (package-initialize) explicitly.
> 
> For instance, from a shell:
> 
> % emacs -batch -eval '(progn (message "%s" package-directory-list))'
> Symbol's value as variable is void: package-directory-list
> % emacs -batch -eval '(progn (package-initialize) (message "%s"
> package-directory-list))'
> (c:/emacs/emacs/share/emacs/24.4/site-lisp/elpa
> c:/emacs/emacs/share/emacs/site-lisp/elpa)
> 
> Or, since I have the 'dash' package installed in my ~/.emacs.d/elpa:
> 
> % emacs -batch -eval "(progn (require 'dash))"
> Cannot open load file: no such file or directory, dash
> % emacs -batch -eval "(progn (package-initialize) (require 'dash))"
> %
> 
> The documentation at
> http://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html
> is not totally clear on this, but it implies that packages should be loaded.

I think this is a documentation bug.  package-initialize is not
invoked under -q (which I Think makes sense), and -batch implies -q.




This bug report was last modified 9 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.