From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] Display most recent log item in Agenda Date: Sat, 20 Dec 2014 22:02:19 +0100 Message-ID: <878ui2yqzo.fsf@nicolasgoaziou.fr> References: <87388imto5.fsf@ericabrahamsen.net> <878uia6kdh.fsf@nicolasgoaziou.fr> <87ppbllmqj.fsf@ericabrahamsen.net> <87vbld5biw.fsf@nicolasgoaziou.fr> <87wq5sqqin.fsf@ericabrahamsen.net> <87k31s559y.fsf@nicolasgoaziou.fr> <871tnwnhu4.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2R9Y-0006Dw-KP for emacs-orgmode@gnu.org; Sat, 20 Dec 2014 16:01:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2R9O-00031W-Q4 for emacs-orgmode@gnu.org; Sat, 20 Dec 2014 16:01:32 -0500 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:50769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2R9O-00031S-Jv for emacs-orgmode@gnu.org; Sat, 20 Dec 2014 16:01:22 -0500 In-Reply-To: <871tnwnhu4.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Fri, 19 Dec 2014 16:50:59 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Hello, Eric Abrahamsen writes: > 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! You're right. Thanks for the patch. I applied something slightly different, however. Regards, -- Nicolas Goaziou