From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Error on opening org files Date: Fri, 13 Apr 2012 23:24:33 -0400 Message-ID: <4145.1334373873@alphaville> References: <40C7B1BFC291ED4E9D10436D07736A33470409D43D@EXMAIL7.haas.uc.berkeley.edu> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SItbN-0006jT-8S for emacs-orgmode@gnu.org; Fri, 13 Apr 2012 23:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SItbK-0003Qh-Q1 for emacs-orgmode@gnu.org; Fri, 13 Apr 2012 23:24:40 -0400 Received: from g4t0014.houston.hp.com ([15.201.24.17]:25923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SItbK-0003Pd-JV for emacs-orgmode@gnu.org; Fri, 13 Apr 2012 23:24:38 -0400 In-Reply-To: Message from Richard Stanton of "Fri, 13 Apr 2012 16:24:16 PDT." <40C7B1BFC291ED4E9D10436D07736A33470409D43D@EXMAIL7.haas.uc.berkeley.edu> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Richard Stanton Cc: "emacs-orgmode@gnu.org" , schulte.eric@gmail.com Richard Stanton 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(# "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.