emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] odt export not working


From: John Hendy
Subject: Re: [O] odt export not working
Date: Tue, 7 May 2013 13:46:47 -0500

On Tue, May 7, 2013 at 11:32 AM, Nick Dokos <address@hidden> wrote:
> "Julian M. Burgos" <address@hidden> writes:
>
>> Ok, I see what you mean.  So I should do
>> (setq org-export-backends '(odt)) or something like that.  Fair enough. :)
>>
>
> That's *not* what Nicolas suggested and it's *not* what you should do.
>
> Just do
>
> C-h v org-export-backends
>
> and click the Customize link, then mark all the (additional) backends
> you want to use. Please read the documentation of the variable: simply
> setting it in the middle of an emacs session will *not* work.

Though, know that there's a difference in how backends are treated
when loading them via the two methods:[1]

#+begin_quote

3 Installation

══════════════

There are two ways to install export back-ends.

1. You may customize `org-export-backends' variable. It contains the
list of back-ends that should always be available.

2. You can also simply require the back-end libraries (e.g. `(require
'ox-icalendar)' for the iCalendar back-end). Note that with method 1,
the back-ends will be loaded only when the export framework is used
for the first time.

#+end_quote

[1] http://article.gmane.org/gmane.emacs.orgmode/65574

If you customize =org-export-backends=, the actual backend is not
loaded until you export for the first time per new Emacs session.
Mostly not a big deal, but try this out with the following minimal
config:

#+begin_src emacs-config-method-1

;; set load paths
;; set load dirs and global config options
(add-to-list 'load-path "~/.elisp/org.git/lisp/")
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp")

(setq org-export-backends (quote (odt)))

#+end_src

- emacs -Q
- M-x load-file RET ~/path/to/min-config
- M-x help RET v org-odt-TAB
- Note completions

Now try this:

#+begin_src emacs-config-method-2

;; set load paths
;; set load dirs and global config options
(add-to-list 'load-path "~/.elisp/org.git/lisp/")
(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp")

(require 'ox-odt)

#+end_src

Repeat the steps above and note the difference. If you want to do any
customizing or (like me) use =C-h v= or =M-x help= to remember the
name of the variable you're looking for, you won't get auto-completion
as Org isn't aware of the variable until you actually use the exporter
the first time (use the first minimal config, export to ODT, and then
repeat the steps described and you'll see that the variables are now
known).

Anyway, just wanted to make sure this was well known. I've taken to
using a =(require 'ox-backend)= line for every exporter I want vs. the
org-export-backends variable for this reason.



John


>
> Nick
>
>>
>> Nicolas Goaziou writes:
>>
>>> "Julian M. Burgos" <address@hidden> writes:
>>>
>>>> Right... I did not saw it.  And even if I did, I would not know that the
>>>> package needed for loading the back-end for ODT is called ox-odt.
>>>
>>> You don't need to know that. The manual tells you to customize
>>> `org-export-backends' instead.
>>>
>>>
>>> Regards,
>
> --
> Nick
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]