emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [RFC] Display most recent log item in Agenda


From: Nicolas Goaziou
Subject: Re: [O] [RFC] Display most recent log item in Agenda
Date: Tue, 16 Dec 2014 10:10:33 +0100

Eric Abrahamsen <address@hidden> writes:

> I thought that's what `org-log-beginning' was for: finding where the
> log-note list would be (drawer or no), if it exists.

Not exactly. It finds where the next note is to be inserted. This may
not be in front of the log-note list even if it exists (e.g., if
`org-log-states-order-reversed' is nil you may end up in front of the
following paragraph).

> If users aren't using `org-log-into-drawer', `org-log-beginning'
> should still go to the spot where the list would be, right?

Not necessarily. It actually doesn't look for such a list. It could end
up after the list (see above) or even in a different location (see
below).

Also, it doesn't tell if there is a list at all, so if you rely on it,
you need to double-check if you really are close to a log-note.

Unfortunately, recognizing a log note is impossible, since it is
a regular plain list. Contents change, and templates are customizables
(see `org-log-note-headings'). See, for example, the hack in
`org-skip-over-state-notes'.

> Then, if there's a list there, I take the first or last note (depending
> on log-state-notes-reversed).
>
> I don't know why the notes would be scattered across the section...

Because in this case, the list is not necessarily re-used. The first
note is inserted after planning info and properties drawer. If, later,
you insert some text before it, logging process will create a new list
above, and so on. E.g.,

Step 1:

  * Headline
    - Note 1

Step 2:

  * Headline
    Some text
    - Note 1

Step 3:

  * Headline
    - Note 2
    Some text
    - Note 1


Regards,



reply via email to

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