Eric Abrahamsen <e...@ericabrahamsen.net> writes:

> I started with this approach for two reasons: 1) I thought collecting
> the list items would be simpler, and as it became more and more
> complicated, I didn't rethink the approach, and 2) collecting all the
> items is the actual feature I was after (for future hackage), and the
> agenda display was just a nice bonus.

OK.

> I'd like to keep the collection routine (even just for myself, if it's
> not necessary for core), but you're right, the most-recent note display
> could be done differently.

Collecting is fine, but instead of using `org-log-beginning', I suggest
to factor out parts you need (e.g. find the log drawer, if any).

Note that if `org-log-into-drawer' is nil, you can only find all notes
heuristically (they might be scattered across the section). In this
case, finding the last note is safer.

>> Better, you could store the last note as a text property on the headline
>> and skip altogether the parsing phase.
>
> When would the storing happen? As the agenda was being built?

When the storing is done, i.e. after calling `org-store-log-note'.
However, you would need persistent data to save log notes across
sessions. So it isn't a good idea after all.


Regards,

Reply via email to