emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Error on opening org files
@ 2012-04-13 23:24 Richard Stanton
  2012-04-14  3:24 ` Nick Dokos
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stanton @ 2012-04-13 23:24 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Error on opening org files
  2012-04-13 23:24 Error on opening org files Richard Stanton
@ 2012-04-14  3:24 ` Nick Dokos
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2012-04-14  3:24 UTC (permalink / raw)
  To: Richard Stanton; +Cc: emacs-orgmode@gnu.org, schulte.eric

Richard Stanton <stanton@haas.berkeley.edu> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-14  3:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 23:24 Error on opening org files Richard Stanton
2012-04-14  3:24 ` Nick Dokos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).