From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id 6IPvIey/t2WAAAAA62LTzQ:P1 (envelope-from ) for ; Mon, 29 Jan 2024 16:10:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6IPvIey/t2WAAAAA62LTzQ (envelope-from ) for ; Mon, 29 Jan 2024 16:10:36 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="bHcTn/43"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706541036; a=rsa-sha256; cv=none; b=sOx/k8dLbQ3wtVG2nukbzufAUTUqwh98WauvEAQ0Qo0Hw5H2uNNNzxUMYtN9sAhJWV0SXB hcGA/AeIXMdOL+cy+VjxC5fhz7a4O8SZY9iRYGqUcliPRdURS9HatxdYHblppVczE19aYP u+Be5IGgBz00AvA0F2qqkdH9VntEuK5Zv65vmtfBmaYKfFBED+7uk2MjInx7p9vRlQmj7f b+8V6fnyzsHBucG/feRi78/3DSkgqFkxwi1dg2voJ5ZcC6TXMp4PjOcK3ytwuSnkN95Hw1 jLY2FpXCelJ2w0/l40ESS93OVbVXZd1i4omahxj9OM5N4wx5l4Uf8nLDyAM6mg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="bHcTn/43"; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706541036; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4kv9Bpn6Jema1BBTHl6Bl/OP3+oWGatGL05gjKzkh6c=; b=qc2E6wFEBzrihxn6t1sVwSp8yjo/kHwouY2oeyBH7JIJN6IIp01ZD+hLBP+E71AhDQnBEk kgOEfLU1lW1yl/xuMG7EspRIAGAkR80sDB3BftHh4MRwx1otdRAmOMdNWEs06ncZQZZYzX SJlSwqJk+eD+adB936JRp8ChXt6vWtIZnnu+sUeovBonOInLHPIQlZT7hd5jNJvlljyA62 fs+Ag1+R8GLnrlDT56HyxEDhJ6VtoY2CDlqi3PJeLYjMTPjND1CKXTX4FgtGdenECC87F3 os96gOLK4y6JPpi7RhMYd5IJDkbSOIPJVDExI544qm46CqeVtRqidifS/1WnuQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7437E269DE for ; Mon, 29 Jan 2024 16:10:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUTGb-000332-TR; Mon, 29 Jan 2024 10:09:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUTGZ-00032b-TZ for emacs-orgmode@gnu.org; Mon, 29 Jan 2024 10:09:44 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUTGX-0005EP-JH for emacs-orgmode@gnu.org; Mon, 29 Jan 2024 10:09:43 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id DCD2F240103 for ; Mon, 29 Jan 2024 16:09:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1706540978; bh=8P00D7xXYrhby9P9VDOjuYofQYtCfma8Jq48GEuzHLE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=bHcTn/43KaR9ueOvg1gxep9lbP/beWDjjCjyDwDjqdoC1Jn0gBTTImwJ8ViSsJ1Jf UEWLgMpQ9ZSsFC2QJMT2DEVeJ4RClbRgpnlWMfyQ0e7hDHlhtVJrRa2+6wCk0vYy+N LO1TItqNlJrpXHMeWNLJ7HT0VYbu8/eD3FumCHAMySp431/TICQESSk191nGvDIlgY /PEOSTtu+fXXoNgZFsHS1B5XXxNAw9evwtwWVkfqbnzu4+wIiTaj9/ANaKH8IOIp/i wL7mzaA8lxZDtO3dJUMhISEdgvdjdomKexS43bCvJXNpMAEEHEDfXxXiGrsKuyPXS7 Dc5/BqCfO0iOg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TNsCj0cy7z6txr; Mon, 29 Jan 2024 16:09:36 +0100 (CET) From: Ihor Radchenko To: Uwe Brauer Cc: emacs-orgmode@gnu.org Subject: Re: bizarre: checkbox in properties, counting does not work with subheadings In-Reply-To: <87k07x8ls8.fsf@mat.ucm.es> References: <87k07x8ls8.fsf@mat.ucm.es> Date: Mon, 29 Jan 2024 15:13:10 +0000 Message-ID: <87ttmw41h5.fsf@localhost> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx10.migadu.com X-Spam-Score: -8.38 X-Migadu-Queue-Id: 7437E269DE X-Migadu-Spam-Score: -8.38 X-TUID: +qNgropvAH7D --=-=-= Content-Type: text/plain Uwe Brauer writes: > * Everything [3/4] > ... > *** DONE Books > ... > ** DONE Car > ... > ** DONE Food > ... > *** WAIT Computer > ... > ... The expected behavior should be > > #+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :hlines 1 :indent nil :format "%5TODO(Status) %5Nr(Nr) %5Comp1(Comp1){X/} %5Comp2(Comp2){X/}" > | Status | Nr | Comp1 | Comp2 | > |--------+----+-------+-------| > | | | [1/2] | [2/2] | > | DONE | 2 | [X] | [X] | > | DONE | 3 | [ ] | [X] | > #+END: I am not sure if it is expected. Why doesn't "DONE Books" contribute to the summary? It is also under "Everything" headline and has a checkbox. With the attached patch, the result would be the following: #+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :hlines 1 :indent nil :format "%5TODO(Status) %5Nr(Nr)%5Comp1(Comp1){X/} %5Comp2(Comp2){X/}" | Status | Nr | Comp1 | Comp2 | |--------+----+-------+-------| | | | [3/3] | [2/3] | | DONE | 2 | [X] | [X] | | DONE | 3 | [1/1] | [0/1] | #+END: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-lisp-org-colview.el-Fix-computing-summary-with-low-l.patch >From a4927f9ea530db180efdaea6bb01511c03bb1051 Mon Sep 17 00:00:00 2001 Message-ID: From: Ihor Radchenko Date: Mon, 29 Jan 2024 16:09:29 +0100 Subject: [PATCH] lisp/org-colview.el: Fix computing summary with low-level first child * lisp/org-colview.el (org-columns--compute-spec): Do not assume that all the children of an entry have the same LAST-LEVEL. Handle situation when the first child has lower level: * Heading ****** Child 1 ** Child 2 ** Child 3 Reported-by: Uwe Brauer Link: https://orgmode.org/list/87wn8yj2i5.fsf@localhost --- lisp/org-colview.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index b1b79257b..39ca01502 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1244,9 +1244,9 @@ (defun org-columns--compute-spec (spec &optional update) ;; property `org-summaries', in alist whose key is SPEC. (let* ((summary (and summarize - (let ((values (append (and (/= last-level inminlevel) - (aref lvals last-level)) - (aref lvals inminlevel)))) + (let ((values + (cl-loop for l from (1+ level) to lmax + append (aref lvals l)))) (and values (funcall summarize values printf)))))) ;; Leaf values are not summaries: do not mark them. (when summary -- 2.43.0 --=-=-= Content-Type: text/plain -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at --=-=-=--