From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: [RFC] Display most recent log item in Agenda Date: Tue, 16 Dec 2014 10:26:08 +0800 Message-ID: <87wq5sqqin.fsf@ericabrahamsen.net> References: <87388imto5.fsf@ericabrahamsen.net> <878uia6kdh.fsf@nicolasgoaziou.fr> <87ppbllmqj.fsf@ericabrahamsen.net> <87vbld5biw.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0hkf-0000RN-44 for emacs-orgmode@gnu.org; Mon, 15 Dec 2014 21:20:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0hkW-0007qk-Se for emacs-orgmode@gnu.org; Mon, 15 Dec 2014 21:20:41 -0500 Received: from plane.gmane.org ([80.91.229.3]:41974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0hkW-0007qg-Lb for emacs-orgmode@gnu.org; Mon, 15 Dec 2014 21:20:32 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y0hkV-0006mD-LS for emacs-orgmode@gnu.org; Tue, 16 Dec 2014 03:20:31 +0100 Received: from 114.248.5.200 ([114.248.5.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Dec 2014 03:20:31 +0100 Received: from eric by 114.248.5.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 16 Dec 2014 03:20:31 +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: > Eric Abrahamsen 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. I thought that's what `org-log-beginning' was for: finding where the log-note list would be (drawer or no), if it exists. If users aren't using `org-log-into-drawer', `org-log-beginning' should still go to the spot where the list would be, right? 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... Slightly confused, Eric