From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: How to track down "No heading for this item in buffer or region."? Date: Thu, 24 Jan 2013 14:35:38 -0500 Message-ID: <4467.1359056138@alphaville.americas.hpqcorp.net> References: <20130124123204.GB24543@boo.workgroup> <87y5fioimf.fsf@bzg.ath.cx> <20130124162311.GE24543@boo.workgroup> <87libipeot.fsf@bzg.ath.cx> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:47666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TySaO-0001LP-57 for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 14:35:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TySaL-0004g3-9g for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 14:35:43 -0500 Received: from g5t0007.atlanta.hp.com ([15.192.0.44]:19616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TySaL-0004fk-3r for emacs-orgmode@gnu.org; Thu, 24 Jan 2013 14:35:41 -0500 In-Reply-To: Message from Bastien of "Thu, 24 Jan 2013 20:24:18 +0100." <87libipeot.fsf@bzg.ath.cx> 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: Bastien Cc: emacs-orgmode , Carsten Dominik Bastien wrote: > Hi Gregor, > > Gregor Zattler writes: > > > But alas, the message "No heading for this item in buffer or > > region." still appears two times in my agenda -- for today. > > The attached patch fixes it. > > Carsten, was there any special reason for allowing to add > an agenda entry before the first headline? The following > patch prevent this. > I think you'd be better off fixing the lazily assigned text properties and then you don't need to worry about adding restrictions. In addition, this fix does not do anything for the following case: If I slightly modify the previous example ,---- | # timestamp: <2013-01-24 Thu> | | * TODO foo | # SCHEDULED: <2013-01-24 Thu> `---- to try to reproduce Rainer's problem, when I first construct the agenda, I get *both* the TODO and the no-heading message: text properties are not active. If I then visit the file (e.g. RET on the TODO item) and construct the agenda again, neither the TODO nor the no-heading message appears. Nick