emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Richard Stanton <stanton@haas.berkeley.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>, schulte.eric@gmail.com
Subject: Re: Error on opening org files
Date: Fri, 13 Apr 2012 23:24:33 -0400	[thread overview]
Message-ID: <4145.1334373873@alphaville> (raw)
In-Reply-To: Message from Richard Stanton <stanton@haas.berkeley.edu> of "Fri, 13 Apr 2012 16:24:16 PDT." <40C7B1BFC291ED4E9D10436D07736A33470409D43D@EXMAIL7.haas.uc.berkeley.edu>

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.

      reply	other threads:[~2012-04-14  3:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 23:24 Error on opening org files Richard Stanton
2012-04-14  3:24 ` Nick Dokos [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4145.1334373873@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    --cc=stanton@haas.berkeley.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).