From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Conditional summing in column-mode? Date: Tue, 29 Aug 2017 09:11:06 +0200 Message-ID: <87tw0qrgqd.fsf@nicolasgoaziou.fr> References: <87bmn4ytce.fsf@nicolasgoaziou.fr> <87shgfxvzr.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmag8-0002Y1-4V for emacs-orgmode@gnu.org; Tue, 29 Aug 2017 03:11:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmag2-0008FB-EK for emacs-orgmode@gnu.org; Tue, 29 Aug 2017 03:11:16 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:33858) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmag2-0008Dq-7n for emacs-orgmode@gnu.org; Tue, 29 Aug 2017 03:11:10 -0400 In-Reply-To: (Stig Brautaset's message of "Mon, 28 Aug 2017 11:41:01 +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" To: Stig Brautaset Cc: emacs-org list Hello, Stig Brautaset writes: > Unfortunately it doesn't quite: the functions in > =org-columns-summary-types= are passed a list of values already > extracted from the properties, so my calculation of "confirmed days" > only takes effect on the _next_ call to the summary function. You can ignore the provided values, collect your own and summarize those. Granted, this is sub-optimal. > Is there a hook I can use that is called before the property values > are extracted? (I wasn't able to find one.) There isn't. But here is an idea: `org-columns-summary-types' could also accept entries like: (LABEL SUMMARIZE COLLECT) where COLLECT is a function called on each summarized entry. SUMMARIZE is applied on the values returned by COLLECT. When not provided, COLLECT default to `org-entry-get' as it is the case already. WDYT? Regards, -- Nicolas Goaziou