emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to track down "No heading for this item in buffer or region.


From: J. David Boyd
Subject: Re: [O] How to track down "No heading for this item in buffer or region."?
Date: Fri, 25 Jan 2013 11:11:21 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

Nick Dokos <address@hidden> writes:

> Bastien <address@hidden> wrote:
>
>> Nick Dokos <address@hidden> writes:
>> 
>> > 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.
>> 
>> I see -- it was not obvious to me you were trying without opening the
>> file in a buffer.  With my patch, I can reproduce the error, but only
>> the TODO (which appears instead of being skipped, not with the
>> timestamp line.  Yes, seems related to properties.  I'll digg further.
>> 
>
> Not quite: the file *is* opened in a buffer (the agenda code opens all the
> files, I presume with find-file-noselect), but the text properties are
> not up to date. It's only when I explicitly visit the buffer
> that they get updated.
>
> E.g. if you evaluate
>
> (setq buf (find-file-noselect "/path/to/test.org"))
> (with-current-buffer buf
>   (setq s (buffer-substring 1 2)))
>
> the echo area shows
>
> ,----
> | #("#" 0 1 (fontified nil))
> `----
>
> But if you visit the buffer with C-x b test.org RET and then
> evaluate the second form again, you get 
>
> ,----
> | #("#" 0 1 (fontified t font-lock-fontified t face font-lock-comment-face))
> `----
>
> There is a section on lazy properties in the elisp manual but I don't
> know how to use the mechanism described there: there are no examples in
> current emacs code, some half-hearted experiments failed for unknown
> reasons, and googling a bit found only one relevant thread in the emacs
> group from 2004 - quoting Stefan Monnier from that thread:
>
> #+BEGIN_QUOTE
>   I think the lazy text properties that you refer to (i.e. variable
>   buffer-access-fontify-functions) are a sadly perfect example of C code
>   implemented before we knew what we needed.  It's implemented,
>   documented, and 100% unused.
> #+END_QUOTE
>
> AFAICT, nothing has been done in this area since then.
>
> Nick
>
> PS. Here's the trivial test.org again for completeness:
>
> # timestamp: <2013-01-24 Thu>
>
> * TODO foo
> #  SCHEDULED: <2013-01-24 Thu>



There was a message in here a while back about something like this.   I
can't find it at the moment, but the author talked about org mode hooks
that aren't being run when a file is loaded or moved to from the agenda,
only when explicitly loaded.   He had a work around for that, but I
don't recall that either....   Sorry for no more help than this




reply via email to

[Prev in Thread] Current Thread [Next in Thread]