From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id APbWFIqPImaQTQAAqHPOHw:P1 (envelope-from ) for ; Fri, 19 Apr 2024 17:36:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id APbWFIqPImaQTQAAqHPOHw (envelope-from ) for ; Fri, 19 Apr 2024 17:36:42 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713541002; 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; bh=LJjds8UCD4CWot4Tpf/e8qrdGg2DtepyQseJ3D2i0VY=; b=m84S7e/z0XG68ss7r3UUXta7VKZJ6CzCkAs18YsJ0YUGgP7ZqbTEvdOxHEkMIQoMjXpvOP zvrGqSsW5Fr3YaX+dHt/3BFeUm9xJNv3Es3Rzb3vpUXOk+3mYvtMSaZrfln1BkVb36zSz/ GIbNyvo1wO/XamVK1vihsC3N2tBtunm27HZnhls2PYvbmAb5mdq8DMddR6b+L5LUX5SyQq yxlM8xefo6glC4UHwQiaNe4uOCp39NyIeToAOGAtF4nKcNWYz2Y+0zu33CYUUkBsMBgxG5 Mvk2tSUMktwIjwwY6UKnLJPAsqwCLCwsWzGNaSVIaP0MaSviv5QJb1hhbHmuoA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713541002; a=rsa-sha256; cv=none; b=u5DWsN2T8NncrUUHHCfKLJxj8O13qQF/2YqhsbB8xMz3S8lZGU6f8prifuNOre147JBex9 AZuvBxuDUwGfdJp6HuX7jyhSHyeS82LTYDrHQlM/YxHxtaf76RmSzg+u7qN5QPZHRis4Km xeewIoNTkJvdYDnyZaq/Fp20q7cz0o8Pz7V3J98+XXo3W5oVkML1qpoNjJWu3vbNcu53uy lu4QbpWfEhkm+JW9HYg+0GO8gmT5uNUCgxQzM+fCYhT1q7kWNv+E+3topkA5fLqI4JvkGs JBjS5LjAqE1dmpqI7eSoVOpoA6+QfMLHnbcwFZbzmTFUAhbE7bW5e4HqnmN6tg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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"; dmarc=none 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 1193B14ED6 for ; Fri, 19 Apr 2024 17:36:42 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxqHK-0003ci-IM; Fri, 19 Apr 2024 11:35:54 -0400 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 1rxqHI-0003c6-AY for emacs-orgmode@gnu.org; Fri, 19 Apr 2024 11:35:52 -0400 Received: from smtprelay01.ispgateway.de ([80.67.31.35]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxqHG-0005Uy-Ha for emacs-orgmode@gnu.org; Fri, 19 Apr 2024 11:35:52 -0400 Received: from [185.17.206.20] (helo=condition-alpha.com) by smtprelay01.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1rxqHC-0000000064e-2Yyp; Fri, 19 Apr 2024 17:35:46 +0200 Message-Id: From: Alexander Adolf To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Subject: Re: columnview dynamic block - different time summing behaviour for EFFORT and CLOCKSUM In-Reply-To: <87a5lpeiey.fsf@localhost> References: <486d2b818b62c71b3f307305c06c4318@condition-alpha.com> <871q7cypxl.fsf@localhost> <00aa9bf72dc93f6554bdd236fdfba192@condition-alpha.com> <87y19hbb05.fsf@localhost> <8b72386d118136210f27b553f0a13066@condition-alpha.com> <87cyqtyzgt.fsf@localhost> <91dfeb0fed1a1fe0564e5eb9b95a409d@condition-alpha.com> <87a5lpeiey.fsf@localhost> Date: Fri, 19 Apr 2024 17:35:46 +0200 MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Received-SPF: pass client-ip=80.67.31.35; envelope-from=alexander.adolf@condition-alpha.com; helo=smtprelay01.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.38 X-Spam-Score: -6.38 X-Migadu-Queue-Id: 1193B14ED6 X-Migadu-Scanner: mx13.migadu.com X-TUID: dcTFvfHtUrO+ Ihor Radchenko writes: > Alexander Adolf writes: > >> Subject: [PATCH 1/2] lisp/org-colview.el: add formatter parameter to colview >> dynamic block > > Thanks for the patches! > See my comments below. Thanks for your swift review, and most helpful comments! While I'm implementing these, reactions of my own on a select, few comments of yours: > [...] >> +- =:formatter= :: >> + >> + A function for formatting the data in the dynamic block, overriding >> + the default formatting function set in >> + ~org-columns-dblock-formatter~. > > You can also mention that the function also inserts the data. Something > similar to what we do when describe the equivalent option for clock tables: > > - =:formatter= :: > > A function to format clock data and insert it into the buffer. > > Also, if you mention a variable in the manual, please add #+vindex: > entry. Maybe even #+cindex: entry for "formatter", to make the parameter > more discoverable. I kept it to the format of the existing parameter descriptions, which don't create index entries. Happy to add one though. #+cindex would seem more appropriate, as it's not a variable? On a loosely related note: the description of the :formatter parameter of the clock table does not have and index entry either. Should it get one too, then? Btw, I will also move the half-sentence about overriding the default formatting function from the manual to the docstring of org-dblock-write:columnview, where the :formatter parameter is explained, too. It somehow seems more appropriate there, since a user who is looking into implementing a formatting function will most likely be accessing that docstring anyway (so will find the information), whereas the information about the customization variable is likely adding more confusion than it tries to remove for the rest of the Org users (who will likely consult the manual only). > [...] > (defun org-columns--capture-view (maxlevel match skip-empty exclude-tags format local &optional link) > >> + (push (if (and link (string= p "ITEM")) >> + (let ((search (org-link-heading-search-string >> + cell-content))) >> + (org-link-make-string >> + (if (not (buffer-file-name)) search >> + (format "file:%s::%s" (buffer-file-name) search)) >> + cell-content)) > > In org-clock, we do > > (org-link-make-string > (if (not (buffer-file-name)) search > (format "file:%s::%s" (buffer-file-name) search)) > ;; Prune statistics cookies. Replace > ;; links with their description, or > ;; a plain link if there is none. > (org-trim > (org-link-display-format > (replace-regexp-in-string > "\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]" "" > headline)))) > > Is there any reason why you did not remove the statistics cookies here > as well? > [...] Somehow (how?) the statistics cookies get removed in my current implementation. org-link-make-string does not remove them (I double checked). I would thus speculate that perhaps the overlay creation (to show description only) removes them? OTOH, I'm happy to add the org-trim part to make things more robust. Will email updated patches when I will have addressed all your comments. Many thanks and cheers, --alexander