GNU bug report logs -
#19151
24.4; Batch mode doesn't call package-initialize, can't find packages
Previous Next
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
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
In GNU Emacs 24.4.1 (i686-pc-mingw32)
of 2014-10-24 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/usr'
Important settings:
value of $LANG: ENU
locale-coding-system: cp1252
Major mode: Apropos
--
Gary
[Message part 2 (text/html, inline)]
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.