0

I've just installed the latest version of Orgmode (20170515) from the package list of elpa (M-x package-list-packages, marked I then x).

Now, when I try to export an *.org file to a *.pdf by either pressing C-c C-e or via Org menu, I get an error msg that says:

Symbol's function definition is void: org-define-error

What does it mean? How do I get the export buffer back? (I'm trying to export an org file to pdf via tex)

I'm on Windows 7 and I think I previously had Org 8.0 (can't remember...).

Can someone kindly please help me?


EDIT

Today, the command C-c C-e now displays the buffer for export options (a set of keyboard combos to export in pdf or HTML) BUT when I select l o I get this msg:

 org-get-limited-outline-regexp: Variable binding depth exceeds max-specpdl-size

Anyone knows what this means? And how do I fix it?


EDIT 2

I added these lines to my .emacs file and told emacs to 'Evaluate the buffer'.

(setq max-specpdl-size 5)  ; default is 1000, reduce the backtrace level
(setq debug-on-error t)    ; now you should get a backtrace

This is the response:

Debugger entered--Lisp error: (void-variable speedbar)
  eval(speedbar nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

I've purposely omitted typing in C-h a as this was causing some other kind of error:

Debugger entered--Lisp error: (void-variable C-h)
  eval-buffer()  ; Reading at buffer position 840
  call-interactively(eval-buffer nil nil)
  command-execute(eval-buffer)

UPDATE 3

On Nick's suggestion I changed those line in my .emacs file. Now it looks like this:

(setq max-specpdl-size 5000)  ; default is 1000, reduce the backtrace level
(setq debug-on-error t)    ; now you should get a backtrace
;;C-h a

And this is what the buffer says following another attempt to export from org to pdf: (this is after recompiling all elpa installed pkgs)

variable depth error after recompiling

  • 1
    Try settting debug-on-error without decreasing `max-specpdl-size. You've made the latter so small that you are making other things (e.g. speedbar) fail, even though they are unrelated to the org problem. – NickD May 31 '17 at 19:33
  • The problem could be that having an old org-mode loaded while compiling the new one messes things up, try recompiling it from emacs -Q (see stackoverflow.com/questions/24725778/…) – npostavs Jun 1 '17 at 4:23
  • On windows 7, I pressed M-: then typed in (byte-recompile-directory package-user-dir nil 'force). Some error came up but I proceeded to restart emacs. Next, I tried to export an existing org file but the Variable binding depth issue came up again. Please see the latest Update 3 above, in the OP. – WobblyWindows Jun 1 '17 at 15:45
  • By the way, after recompiling all pkgs, when I load my first (existing) .org file I get this msg in the lower buffer Problems while trying to load feature "org-rmail" (I suppose it's an email service? Anyways, I usually don't use it). – WobblyWindows Jun 1 '17 at 15:58
  • 1
    Tried these lines in @npostavs link. Now Orgmode can export again! (defun package-reinstall-activated () "Reinstall all activated packages." (interactive) (dolist (package-name package-activated-list) (when (package-installed-p package-name) (unless (ignore-errors ;some packages may fail to install (package-reinstall package-name) (warn "Package %s failed to reinstall" package-name)))))) I'm still not sure what went wrong or how to fix a similar problem next time... – WobblyWindows Jun 2 '17 at 14:19
1

http://orgmode.org/manual/Installation.html:

Recent Emacs distributions include a packaging system which lets you install Elisp libraries. You can install Org with M-x package-install RET org.

Important: you need to do this in a session where no .org file has been visited, i.e., where no Org built-in function have been loaded. Otherwise autoload Org functions will mess up the installation.

So it looks like your initial installation was indeed messed up. To avoid this, you should start Emacs as emacs -Q before calling package-install for org.

  • npostavs, I have Powershell on my Windows 7 32bit OS. I've used Pwrshell to 'cd' into c:\home\ which is where I have my .emacs configuration file and a projects directory with all my current org or tex files (I really only use Orgmode and AUCTeX in emacs). So is it ok to use Pwrshell > cd c:\home\ > emacs -Q > M-x package-install RET org before upgrading, next time? Do you think this is the correct procedure? – WobblyWindows Jun 2 '17 at 15:34
  • @WobblyWindows Yup. I think cd c:\home isn't actually necessary. Also, if you already have the new org successfully installed, then you probably don't need this whole procedure, it's just to avoid loading the old org mode that comes with Emacs. – npostavs Jun 2 '17 at 15:56

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.