From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: possible bug in ox-odt.el? Date: Sun, 25 May 2014 23:32:32 -0400 Message-ID: <87vbst1agf.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Woleo-000131-6V for emacs-orgmode@gnu.org; Sun, 25 May 2014 23:33:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Woleg-0003xY-MQ for emacs-orgmode@gnu.org; Sun, 25 May 2014 23:33:02 -0400 Received: from plane.gmane.org ([80.91.229.3]:43258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Woleg-0003xU-G7 for emacs-orgmode@gnu.org; Sun, 25 May 2014 23:32:54 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wolee-0002bG-V8 for emacs-orgmode@gnu.org; Mon, 26 May 2014 05:32:52 +0200 Received: from pool-98-110-160-12.bstnma.fios.verizon.net ([98.110.160.12]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 May 2014 05:32:52 +0200 Received: from ndokos by pool-98-110-160-12.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 May 2014 05:32:52 +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: emacs-orgmode@gnu.org Matt Price 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