Subject: Re: bug#19151: 24.4; Batch mode doesn't call package-initialize, can't find packages

From: Ted Zlatanov <[email-masked]>
Date: Sun, 23 Nov 2014 06:26:51 -0500

On Sat, 22 Nov 2014 17:24:25 -0500 Gary Oberbrunner <[email-masked]> wrote: 

GO> In batch mode, emacs doesn't load installed packages, although the doc
GO> implies that it should.  If you want to eval forms that require packages,
GO> you have to call (package-initialize) explicitly.
...
GO> The documentation at
GO> http://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html
GO> is not totally clear on this, but it implies that packages should be loaded.

I see this in the docs at (info "(elisp) Startup Summary")

  15. If ‘package-enable-at-startup’ is non-‘nil’, it calls the function
     ‘package-initialize’ to activate any optional Emacs Lisp package
     that has been installed.  *Note Packaging Basics::.

Seems pretty clear to me.  We could use a command-line argument to make
--batch more useful, though.  Something like

--package-initialize, -p     Set `package-enable-at-startup' so packages are initialized

WDYT?

Ted