From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [RFC] Display most recent log item in Agenda Date: Sun, 21 Dec 2014 12:08:45 +0800 Message-ID: <8761d5ejaq.fsf@ericabrahamsen.net> 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> <878ui2yqzo.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2XjY-0004Ue-6P for emacs-orgmode@gnu.org; Sat, 20 Dec 2014 23:03:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2XjS-0006ff-PM for emacs-orgmode@gnu.org; Sat, 20 Dec 2014 23:03:08 -0500 Received: from plane.gmane.org ([80.91.229.3]:35557) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2XjS-0006dX-IT for emacs-orgmode@gnu.org; Sat, 20 Dec 2014 23:03:02 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y2XjP-0007X4-LF for emacs-orgmode@gnu.org; Sun, 21 Dec 2014 05:03:00 +0100 Received: from 123.123.16.212 ([123.123.16.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Dec 2014 05:02:59 +0100 Received: from eric by 123.123.16.212 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Dec 2014 05:02:59 +0100 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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > 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. It's always interesting to see your tweaks...