From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: htmlize doesn't work in --batch mode Date: Wed, 19 Sep 2012 19:03:53 +0200 Message-ID: <87zk4mgd1i.fsf@bzg.ath.cx> References: <3F22EBFC-FB52-42B1-B717-482FBD010B5B@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:43529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TENgv-0006Ip-30 for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 13:04:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TENgp-0001lH-9j for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 13:04:01 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:34809) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TENgp-0001ki-42 for emacs-orgmode@gnu.org; Wed, 19 Sep 2012 13:03:55 -0400 Received: by wgbdt14 with SMTP id dt14so732632wgb.30 for ; Wed, 19 Sep 2012 10:03:54 -0700 (PDT) In-Reply-To: <3F22EBFC-FB52-42B1-B717-482FBD010B5B@gmail.com> (Dmitri Makarov's message of "Fri, 14 Sep 2012 11:38:19 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dmitri Makarov Cc: "emacs-orgmode@gnu.org" Hi Dmitri, Dmitri Makarov writes: > If anyone interested, it's easy to explicitly load the required ELPA > packages in batch mode. For example, the following command loads htmlize > for publishing org files in batch mode > > emacs --batch -l ~/.emacs.d/init.el --eval "(progn (add-to-list 'load-path > \"~/.emacs.d/elpa/htmlize-20120616.1716\") (require 'htmlize))" -f > org-publish-all > > It should be easy to include such a command in a makefile or build.xml and > automatically locate the latest installation of necessary packages rather > than explicitly specifying the path. I let Achim be the final judge on this -- my intuitions in this areas are just too fragile. But my gut feeling is that this would be too complicated, and the solution above is simple enough. > Still I wonder why ELPA packages are not loaded by default in --batch > mode even though (package-initialize) is being evaluated. Please ask this on the emacs-devel mailing list, I'm sure this will help many other users. Several users (including me) have been puzzled by the way ELPA packages are loaded/initialized in Emacs. Best, -- Bastien