Matt Price <mopto...@gmail.com> writes:

> Hello,
>
> for some time I've noticed that the export to odt options were not
> being offered in the export menu options (C-c E-c), even though I have
> (require ox-odt) in my startup file.  Attempts to evaluate ox-odt
> manually failed with this error:
>

Not sure what that means: do you mean "load"?

> defconst: Wrong type argument: stringp, nil
>
> I've tracked the problem down to org-odt-lib-dir:
>
> (defconst org-odt-lib-dir
>   (file-name-directory load-file-name)
>   "Location of ODT exporter.
> Use this to infer values of `org-odt-styles-dir' and
> `org-odt-schema-dir'.")
>
>
> from what I can tell, 'load-file-name' appears to be nil.  Replacing
>
>   (file-name-directory load-file-name)
>
> with a string like:
>
>   "/home/matt/src/org-mode/lisp/ox-odt.el"
>
> fixes the problem for me, but that doesn't seem like a very robust
> solution.  I don't understand emacs internals very well, but is this
> possibly a bug in ox-odt.el, or more likely something in my own
> (poorly maintained) setup files?
>

load-file-name is a variable that's supposed to hold the full name of
the file being loaded by `load'. It's going to be nil most of the time.
It's only while a file is being loaded that it assumes a non-nil value.
Try M-x load-file RET /path/to/ox-odt.el RET and see if you get an
error. And maybe update org.
-- 
Nick


Reply via email to