From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id KDYDOmFMImbELwEAe85BDQ:P1 (envelope-from ) for ; Fri, 19 Apr 2024 12:50:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id KDYDOmFMImbELwEAe85BDQ (envelope-from ) for ; Fri, 19 Apr 2024 12:50:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hceWa9Lo; 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=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1713523809; 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=HUx8ZUyjlJdwxQBO46O9FYAGz6XqBXGSldsammoX5c0=; b=a/Bq0BvafPNrFlJsNOIHwSPcr1XyV2R7ptIFOwQzaECKNJsLAsZH/RbtoJtMYBR/JzPfPE Csvy9i43rMpIlhhfEYvJstZ1XpjkKIez+ww4LIKK6Cb9VJFXqOypX0bRKQf8zTFh0Hb4sc FQ7d59pEP6zqJtUuIqp9brEIYTcCFprA3X3Zl7L1rmx29XJv9uduu5+o2Rh+ucLmSuWTQT XxTjKQh2AqhSBW+uzB8khYSsrRVlLE/K1k94VfgEJyu+GS14UT4k6HkPQefUBaEOS2/jEm jCKnj3miZypfMpqeuHECiKPBSoNJzxiNPAoLoWo3xF6oHf5C7PxdpaVwdeQMeQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1713523809; a=rsa-sha256; cv=none; b=TU6+8pm7fijcXos/pKtZK/h4TNBX1oFkD8LT9MLtWinVvD0Hjoqiu4uO0DXUIvrJNunQiQ Lr7jSiqnOc0wtuhIaer4gYPp6Pt8Jdwh7iJE83nKgnmDIzJxeRPEg7rzVPo6guqOCIin0v 5PknBTkVIMB9wnRFsza7chUf2JiNVnnyJsL/YWGyjOA0lr23ZzV9I0asliLHspEjS+CKs2 uzUpuNhr+Fq7p8eBEQerW5s3PYJLwaHRG5GhKDRjsU0cFRBsYKvPTLylQF0K+TD1zVY0kE +4UrXfY+UFMEOPKsIkvkEi0Y0lp/n1IPUm/gjPSCg5NBXVw6/WWKK5UtGQW4vQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hceWa9Lo; 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=pass (policy=none) header.from=posteo.net 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 552711BA45 for ; Fri, 19 Apr 2024 12:50:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxlnt-0004BZ-AJ; Fri, 19 Apr 2024 06:49:13 -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 1rxlnk-00043n-JJ for emacs-orgmode@gnu.org; Fri, 19 Apr 2024 06:49:06 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxlni-0005Ra-AS for emacs-orgmode@gnu.org; Fri, 19 Apr 2024 06:49:04 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 6DBB5240028 for ; Fri, 19 Apr 2024 12:48:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713523739; bh=Gk3Gfbx3yBZl+2fab6gW6SPLOrZ8Bps/nphYr37TXWg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=hceWa9LoAJl9RN1xN3R59fCUV7Uyb8TBsDfS3A5otSLAY75056Xna8f/ybvrWXT6c 30h7V7Cqoz2ozAOw/XtNXyVVeRNa5RFUV+DgXa/e2VBqn4YOGkE3+GjzrCumw9S284 ooYtqgUcXHz1y9FbkTA90OOSUvaRwE4ggHdrpzXWVhZqHPiJ53RXmpwkw0geOOEPfF 0GsQYXrf7g3J+gOS7B/SwIoTDlMO29XA+9W0+zrmu0KB1aDLWJn2nI/etFh3v4/3pd zEugGHFx/Jtg3J0keSOcViWjnihBr8xSF+ub8oXuzrJa0F9/eRCPsw2JzW3ho0HYNr Tm/BTMKp1ByWQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VLWbZ34F6z6typ; Fri, 19 Apr 2024 12:48:58 +0200 (CEST) From: Ihor Radchenko To: Alexander Adolf Cc: emacs-orgmode@gnu.org Subject: Re: columnview dynamic block - different time summing behaviour for EFFORT and CLOCKSUM In-Reply-To: <91dfeb0fed1a1fe0564e5eb9b95a409d@condition-alpha.com> 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> Date: Fri, 19 Apr 2024 10:49:41 +0000 Message-ID: <87a5lpeiey.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.59 X-Spam-Score: -9.59 X-Migadu-Queue-Id: 552711BA45 X-Migadu-Scanner: mx12.migadu.com X-TUID: WPIWo+6eFtKR 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. > * lisp/org-colview.el (org-dblock-write:column view): Factor out the > existing formatting code to new function > org-columns-dblock-write-default, and honour new dblock parameter > :formatter for specifying a different formatting function. In the changelog entries, we quote the symbol and variable names like `this'. > +- =: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. > +*** New option ~org-columns-dblock-formatter~ > + > +=colview= dynamic blocks now understand a new ~:formatter~ parameter > +to use a specific function for formatting the contents of the dynamic > +block. This new option can be used to set the global default ... and inserting its contents. It would also be helpful to refer to the existing :formatter parameter in clock tables. > +*** =colview= dynamic block supports custom formatting function > + > +The =colview= dynamic block understands a new ~:formatter~ parameter, > +which specifies a user-supplied function to format the data in the ... and insert the data > +(defcustom org-columns-dblock-formatter #'org-columns-dblock-write-default > + "Function to format data in column view dynamic blocks. > +For more information, see `org-columns-dblock-write-default'." > + :group 'org-properties > + :version "30.0" We do not need :version tag when there is :package-version. > +(defun org-columns-dblock-write-default (ipos table params) > + "Write out a columnview table at position IPOS in the current buffer. > +TABLE is a table with data as produced by `org-columns--capture-view'. > +PARAMS is the parameter property list obtained from the dynamic block > +definition." > + (let ((width-specs > (mapcar (lambda (spec) (nth 2 spec)) > org-columns-current-fmt-compiled))) > (when table This new function ignores IPOS parameter. It should not. > From 4d69c3407c7c00fe0a1f52c383ced572f3524076 Mon Sep 17 00:00:00 2001 > From: Alexander Adolf > Date: Mon, 15 Apr 2024 18:01:40 +0200 > Subject: [PATCH 2/2] lisp/org-colview.el: add link parameter to colview > dynamic block *Add (capitalize) > * lisp/org-colview.el (org-columns--capture-view): Add new link > parameter, which when non-nil causes ITEM headlines to be linked to > their origins. > (org-dblock-write:columnview): Pass new link parameter to > org-columns--capture-view, and explain its use in the docstring. `org-columns--capture-view' > -(defun org-columns--capture-view (maxlevel match skip-empty exclude-tags format local) > +(defun org-columns--capture-view (maxlevel match skip-empty exclude-tags link format local) While this is an internal function and we are free to change it as we need, it is generally more robust to not make changes in the order of function arguments. I recommend (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? > `make compile` didn't complain at all, and `make test` ended with the > following: > ... > 4 unexpected results: > FAILED ob-calc/matrix-inversion > FAILED test-ob-shell/bash-uses-assoc-arrays > FAILED test-ob-shell/bash-uses-assoc-arrays-with-lists > FAILED test-org-table/sort-lines MacOS? There are known issues with locale rules in MacOS that may cause test failures. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at