From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] Display most recent log item in Agenda Date: Mon, 15 Dec 2014 13:43:19 +0100 Message-ID: <87vbld5biw.fsf@nicolasgoaziou.fr> References: <87388imto5.fsf@ericabrahamsen.net> <878uia6kdh.fsf@nicolasgoaziou.fr> <87ppbllmqj.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0Uyu-0006kO-Io for emacs-orgmode@gnu.org; Mon, 15 Dec 2014 07:42:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0Uyl-0004hQ-PC for emacs-orgmode@gnu.org; Mon, 15 Dec 2014 07:42:32 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:54438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0Uyl-0004gM-JC for emacs-orgmode@gnu.org; Mon, 15 Dec 2014 07:42:23 -0500 In-Reply-To: <87ppbllmqj.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 15 Dec 2014 09:34:28 +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 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. >> Better, you could store the last note as a text property on the headline >> and skip altogether the parsing phase. > > When would the storing happen? As the agenda was being built? When the storing is done, i.e. after calling `org-store-log-note'. However, you would need persistent data to save log notes across sessions. So it isn't a good idea after all. Regards,