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: Eric Abrahamsen
Subject: Re: [O] [RFC] Display most recent log item in Agenda
Date: Fri, 19 Dec 2014 16:50:59 +0800
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> 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).

I keep hammering on this but... There's still a bug in
`org-log-beginning', I think maybe the same one as before. Say it's
called on an empty entry, or one that only contains a property drawer
and/or a planning line, and there's another entry immediately after it,
no blank line. Then we reach this line:

(if (org-at-heading-p) (point)

The test returns true because we're already on the next headline.
(point) is returned as the place to put the new note, without checking
if a drawer should be inserted, too. That means the first note won't go
in a drawer, but all subsequent ones do.

I came up with something that works, but I look forward to seeing a more
elegant solution!

Eric

Attachment: 0001-Fix-for-org-log-beginning-on-empty-entries.patch
Description: Text Data


reply via email to

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