emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Error on opening org files


From: Nick Dokos
Subject: Re: [O] Error on opening org files
Date: Fri, 13 Apr 2012 23:24:33 -0400

Richard Stanton <address@hidden> wrote:

> I just updated org-mode to version 7.8.09 (release_7.8.09.199.g5e4cff.dirty=
> ), and now get the following error when I try to open any .org file:
> 
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   org-babel-header-arg-expand()
>   run-hook-with-args-until-success(org-babel-header-arg-expand)
>   org-cycle((4))
>   org-set-startup-visibility()
>   org-mode()
>   set-auto-mode-0(org-mode nil)
>   set-auto-mode()
>   normal-mode(t)
>   after-find-file(nil t)
>   find-file-noselect-1(#<buffer work.org> "c:/Dropbox/org/work.org" nil nil=
>  "c:/Dropbox/org/work.org" ((16640 12 . 1731) (37630 . 48608)))
>   find-file-noselect("c:/Dropbox/org/work.org" nil nil nil)
>   find-file("c:/Dropbox/org/work.org")
>   steve-ido-choose-from-recentf()
>   call-interactively(steve-ido-choose-from-recentf nil nil)
> 

There's a bug in org-babel-header-arg-expand. As a temporary
workaround, edit lisp/ob.el and comment out line 715:

;(add-hook 'org-tab-first-hook 'org-babel-header-arg-expand)

Max Mikhanosha suggested a more-or-less equivalent workaround
adding 

(remove-hook 'org-tab-first-hook 'org-babel-header-arg-expand)

to his org-mode initialization. However, you have to put it in the right
place: it needs to be added after ob.el is loaded (which may or may not
be obvious) and before anything else happens that will trigger the
error. In my case at least, that proved a bit tricky: I was calling
org-agenda-to-appt in my init file and I had to put Max's workaround
right before that. The commenting out method might be easier, but ymmv.

Nick

PS. The problem in org-babel-header-arg is the

    (= (char-before) 58)

comparison: when the file is opened, we are at the beginning
of the buffer and (char-before) returns nil, which is not a number.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]