I'm a relative emacs newbie and have set up my emacs (24.4.1) to work with clojure.

The gist of it is that I am now using the latest org-mode from git and loading it in my init.el (I am using prelude btw) as below:

   (add-to-list 'load-path "~/repos/org-mode/lisp")
   (require 'org)
   (require 'ob-clojure)

I am trying to use org to write a literate clojure program that I can export to markdown. Clojure and babel now work well, evaluation works etc, but when I try to export my org file I get an error.

    load-with-code-conversion: Symbol's value as variable is void: p

The stack trace when I set toggle-debug-on-error is:

    Debugger entered--Lisp error: (void-variable p)
        eval-buffer(#<buffer  *load*> nil
             "/Users/krisfoster/repos/org-mode/lisp/ox.el" nil t)
             ; Reading at buffer position 229233
             "/Users/krisfoster/repos/org-mode/lisp/ox.el" nil t)
        autoload-do-load((autoload "ox" "Export dispatcher for Org mode.\n
            \nIt provides an access to common export related tasks in a         
            buffer.\nIts interface comes in two flavors: standard and 
            expert.\n\nWhile both share the same set of bindings, only the 
            former\ndisplays the valid keys associations in a dedicated 
            buffer.\nScrolling (resp. line-wise motion) in this buffer is done 
            with\nSPC and DEL (resp. C-n and C-p) keys.\n\nSet variable `org-
            export-dispatch-use-expert-ui' to switch to one\nflavor or the 
            other.\n\nWhen ARG is \\[universal-argument], repeat the last 
            export action, with the same set\nof options used back then, on 
            the current buffer.\n\nWhen ARG is \\[universal-argument] \\
            [universal-argument], display the asynchronous export 
            stack.\n\n(fn &optional ARG)" t nil) org-export-dispatch)

I tried to resolve this by (require-ing the various org export packages, the ones in the clone of the org git repo that is, from within my init.el. But no dice - in fact that generated yet more issues. I have tried debugging but can't figure out what is wrong. I am suspecting I need to be requiring something but don't know what.

I have my init.el here - init.el gist

Any-one have any ideas what I am doing wrong?

Thanks in advance.


Just did an update of org-mode and built with make autoloads and now get a new error which is saved in this gist https://gist.github.com/krisfoster/247358228d2f2bd3089f.

Note I have had to remove the link to the original article whose setup I was following as I don't have enough rep. points to post more than 2 links.

  • 1
    First thing to do in such case is to M-x toggle-debug-on-error. This will show backtrace buffer when the error occurs and will most likely point to the offending function. Then it will be the matter of understanding of why that function was called and / or what went wrong with the input. – wvxvw Mar 26 '15 at 7:04
  • Append the stacktrace to your question, this might help the folks here to give advice. – schaueho Mar 26 '15 at 8:46
  • I tried debugging it but couldn't really get to the bottom of the issue. Prob my lack of elisp experience. Will recreate and post the stack trace. Thanks – Kris Mar 26 '15 at 15:50
  • The culprit seems to be related to ox.el, that much is clear. – schaueho Mar 26 '15 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.