Bastien <b...@altern.org> wrote: > Hi Gregor, > > Gregor Zattler <telegr...@gmx.net> 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