emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Dmitri Makarov <dmakarv@gmail.com>
To: emacs-orgmode@gnu.org
Subject: htmlize doesn't work in --batch mode
Date: Tue, 11 Sep 2012 15:16:03 +0200	[thread overview]
Message-ID: <0187D5B9-AF58-454C-814A-C2DC744E6063@gmail.com> (raw)

Hi all,

I'm having a problem with offline exports.
If I run emacs in --batch mode like this

emacs -batch -l ~/.emacs.d/init.el -eval '(org-publish-all)'

it doesn't seem to load the packages installed by the ELPA package manager.
In particular it doesn't load htmlize package and also loads the bundled org
version 7.8.11 whereas I have newer version 7.9.1 installed in packages.

Also, it seems for the new version of org to take over the bundled org
package when I run emacs in normal window mode I have to invoke
(require 'org-install) from after-init-hook like this

(add-hook 'after-init-hook
          (lambda ()
            (load-file "~/.emacs.d/org.el")))

org.el among other things includes (require 'org-install)

If I place (require 'org-install) directly in my init.el,
emacs loads the org package bundled with the emacs installation,
not the one installed by the package manager, probably because
package-initialize is evaluated after init.el has been loaded.

Is this normal?  Did anyone have the same problem?
My emacs version is GNU Emacs 24.2.1.

I hope my questions make sense, as I don't really have much experience with emacs package management, and it seems difficult to describe the problem clearly.
I apologize for this is not being an org-mode question, but since many org users
use htmlize, I figure some of them probably want to export their org files
in batch mode, and perhaps they've faced the same issues with packages
in batch mode that I'm having.

Regards,

Dmitri

             reply	other threads:[~2012-09-11 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 13:16 Dmitri Makarov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-09-14  9:38 htmlize doesn't work in --batch mode Dmitri Makarov
2012-09-19 17:03 ` Bastien
2012-09-19 18:29   ` Achim Gratz
2012-09-19 18:40   ` Dmitri Makarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0187D5B9-AF58-454C-814A-C2DC744E6063@gmail.com \
    --to=dmakarv@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).