Dear Jambunathan and others, Apologies for my very late response in concerning the difficulties loading certain org-files related to Opendocument export (unfortunately, I have very little time for things like research in my job now, and this is a very busy time with assessment marking and everything :)
To summarise at first, the results in my 2nd IELM session (at the end of the message below) differed clearly from those in your kindly provided template -- in several cases symbol-file returned nil instead a path, and for (symbol-file 'org-macs 'require) it returns a different path that in your template. Does that perhaps point towards the problem? Here is the full story. Please remember that I cannot not use the OpenDocument export, because -- as far as I understood -- (the correct version of) "org-compat.el" and "org-odt.el" are not loaded. This is perhaps caused by the fact that the Emacs I am using (the latest stable release of Aquamacs, version 2.4) is based on the rather old GNU Emacs 23.3.50.1. Aquamacs is widely used on the Mac platform, so likely I am not the only one with these problems. I temporarily fixed my problem by loading the respective libraries manually in my ~/.emacs file as below, but as others may also have this problem this is probably not the best and certainly not a clean solution. ;; TMP hack to get OpenDocument export working again (load-library "org-compat.el") (load-library "org-odt.el") Anyway, I finally ran the tests you suggested (thanks a lot for detailing these!). > 1. Load Emacs like this. Adjust the `-L's. Note also the -Q. > > emacs --debug-init -L ~/src/org-mode/lisp -L ~/src/org-mode/contrib/lisp > -Q Aquamacs started. Clearly, Aquamacs was not fully loaded (e.g., standard Mac short-cuts where not yet defined). Anyway, it output the following message in *Messages* Aquamacs is based on GNU Emacs, a part of the GNU/Linux system. It is Free Software: you can improve and redistribute it under the GNU General Public License, version 3 or later. Copyright (C) 2011 Free Software Foundation, Inc. (C) 2011 D. Reitter. No Warranty. ns-handle-drag-file: Symbol's value as variable is void: one-buffer-one-frame-mode To double check, I confirmed the Emacs version. GNU Emacs 23.3.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2011-10-25 on braeburn.aquamacs.org Copyright (C) 2011 Free Software Foundation, Inc. > 2. M-x load-library RET org-odt RET Loading org-odt... Loading /Users/torsten/emacs/org-mode/lisp/org-loaddefs.el (source)...done Debug (org-odt): Searching for OpenDocument schema files... Debug (org-odt): Trying /usr/share/emacs/etc/org/schema/... [2 times] Debug (org-odt): No OpenDocument schema files installed Debug (org-odt): Searching for OpenDocument styles files... Debug (org-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times] Debug (org-odt): Trying /Users/torsten/emacs/org-mode/etc/styles/... Debug (org-odt): Using styles under /Users/torsten/emacs/org-mode/etc/styles/ Loading org-odt...done > 3. M-x ielm RET > | ELISP> (symbol-file 'org-compat 'require) "/Users/torsten/emacs/org-mode/lisp/org.elc" > | ELISP> (symbol-file 'org 'require) "/Users/torsten/emacs/org-mode/lisp/org-exp.elc" > | ELISP> (symbol-file 'org-exp 'require) "/Users/torsten/emacs/org-mode/lisp/org-lparse.elc" > | ELISP> (symbol-file 'org-lparse 'require) "/Users/torsten/emacs/org-mode/lisp/org-odt.elc" > | ELISP> (symbol-file 'org-odt 'require) nil I restarted Aquamacs and repeated all above except for the previous ielm session (just in case, as I do not know whether symbol-file has any side effects). > | ELISP> (symbol-file 'org-compat 'require) "/Users/torsten/emacs/org-mode/lisp/org.elc" > | ELISP> (symbol-file 'org 'require) "/Users/torsten/emacs/org-mode/lisp/org-exp.elc" > | ELISP> (symbol-file 'org-element 'require) nil > | ELISP> (symbol-file 'org-export 'require) nil > | ELISP> (symbol-file 'org-e-odt 'require) nil > | ELISP> (symbol-file 'org-macs 'require) "/Users/torsten/emacs/org-mode/lisp/org-exp.elc" Again, thanks a lot for your help! Best wishes, Torsten On 4 Dec 2012, at 05:33, Jambunathan K wrote: >> I will go through your detailed list of suggestions a bit >> later. Thanks a lot again for your help! > > I hope you do revert with your observations on broken setup. > > In my experience, most users don't :-). > > There is some confusion around the area of macros and autoloads. > Something is amiss. Only non-programmers seem to run in to this and it > has been very difficult to understand what is happening on their setup, > without their co-operation. > > Here is another suggestion. A bit easy one though. This will be > archived and will serve as a written hint to debug macro/autoload > issues. > > When the err happens, > > 1. Load Emacs like this. Adjust the `-L's. Note also the -Q. > > emacs --debug-init -L ~/src/org-mode/lisp -L > ~/src/org-mode/contrib/lisp -Q > > 2. M-x load-library RET org-odt RET > > 3. M-x ielm RET > > Here is a sample session both for org-odt and org-e-odt. Sample > illustrates the sequence of events that led org-compat.el to be > loaded. > > The sequence below is courtesy this suggestion/thread: > http://lists.gnu.org/archive/html/help-gnu-emacs/2012-11/msg00227.html > > > So the load chain is: > org-compat <= org <= org-exp <= org-lparse <= org-odt > > ,---- > | *** Welcome to IELM *** Type (describe-mode) for help. > | ELISP> (symbol-file 'org-compat 'require) > | "/home/kjambunathan/src/org-mode/lisp/org.elc" > | ELISP> (symbol-file 'org 'require) > | "/home/kjambunathan/src/org-mode/lisp/org-exp.elc" > | ELISP> (symbol-file 'org-exp 'require) > | "/home/kjambunathan/src/org-mode/lisp/org-lparse.elc" > | ELISP> (symbol-file 'org-lparse 'require) > | "/home/kjambunathan/src/org-mode/lisp/org-odt.elc" > | ELISP> (symbol-file 'org-odt 'require) > | nil > `---- > > So the load chain is: > org-compat <= org <= org-element <= org-export <= org-e-odt > > ,---- > | *** Welcome to IELM *** Type (describe-mode) for help. > | ELISP> (symbol-file 'org-compat 'require) > | "/home/kjambunathan/src/org-mode/lisp/org.elc" > | ELISP> (symbol-file 'org 'require) > | "/home/kjambunathan/src/org-mode/lisp/org-element.elc" > | ELISP> (symbol-file 'org-element 'require) > | "/home/kjambunathan/src/org-mode/contrib/lisp/org-export.el" > | ELISP> (symbol-file 'org-export 'require) > | "/home/kjambunathan/src/org-mode/contrib/lisp/org-e-odt.elc" > | ELISP> (symbol-file 'org-e-odt 'require) > | nil > | ELISP> (symbol-file 'org-macs 'require) > | "/home/kjambunathan/src/org-mode/lisp/org.elc" > `---- > > ps: I hope I am invoking `symbol-file' properly. > > -- -- Dr Torsten Anders Course Leader, Music Technology University of Bedfordshire Park Square, Room A315 http://www.torsten-anders.de