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 ms1.migadu.com with LMTPS id KClQMYWbJ2YdDAAA62LTzQ:P1 (envelope-from ) for ; Tue, 23 Apr 2024 13:29:09 +0200 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 KClQMYWbJ2YdDAAA62LTzQ (envelope-from ) for ; Tue, 23 Apr 2024 13:29:09 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=LVt0Z+nm; 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=1713871749; a=rsa-sha256; cv=none; b=Z43w7l1TDqwtUL+ZGIrqZrT0eouIB7F2W/phHppDSbknV4O96mZI+IniYAQqPsCFCuls9o Oz7xEB0v2cDNIeNVu929Du4ypfwBt3mLhIF6FKBERI37lVq0CwFQpG/3XI9Os9gTpAqcCP sJ/e0xcDDxsMSUaoYv+kmMfjI9xZloa/zJGzBwtT5JAnUoe07QmcW+f22V5I4XmmXPDDlX R3QEPAoOL2Yo7J+fx86Hea13r9FDHOlqPatEHEuUuWYvQGHiF5PY8NhYKV1fhdE+ni/s9x cOM6xYinTEN5tGZzTD4hYWRi/YDw0ga3srfcKr6FodAXQtiyT4VOhhCK98alVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=LVt0Z+nm; 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=1713871749; 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=eUSmgX+EFc59rV3XaYf4Q6Rc8+eD65WYi5ZTLmB+DLk=; b=s1GC1qMPqicDz9udfI3yI7O1zPOdiWjPoiX/8a3J0ySEWff/rAoOwIyiH7x4WKvou5sxRT +dY+SQpByKRS+4ES6YDWmFa5wuzjq5jEMg77IEzZYXwTzPX2Mla6WyosK8ITFxlinQDyio CgHyFCrO7c3TSo8xmCfy4Q5RE/R/6/weMRl7+cL3zyVE+e38bPB11bqaGPKzc/qz2AYoia MfixfR5cXymTMdLTm38J6esKzuV5LRZCr/P0po3y7NMqRCezIDYsaiOaUCvWFmdCwqLjJE 8Bg65v6DbUPtFDetzUvq9Z2/6UNJFLxKcZrkHUsFPWOWjLLkr9Ju1DxSOl7rwA== 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 413717058C for ; Tue, 23 Apr 2024 13:29:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzEJr-0002rc-DD; Tue, 23 Apr 2024 07:28:15 -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 1rzEJo-0002p2-Hi for emacs-orgmode@gnu.org; Tue, 23 Apr 2024 07:28:12 -0400 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 1rzEJk-00065f-Gz for emacs-orgmode@gnu.org; Tue, 23 Apr 2024 07:28:10 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 23995240104 for ; Tue, 23 Apr 2024 13:27:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1713871679; bh=AaV4al3gntbQpXwLPwg2OAcQfOt9NaHUQjxi9GIg+KU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=LVt0Z+nm+8msrtqDk+8gbk+OXEh6za70gpsNM8+Sru7xkEbYbCTHEcItIAR/Oe4Bl Y0FhJngZTstu8nKXxYjT+KEv35HTGAX0kcmjSxDBHwqxnFGX0BBcPGovHxxbl6wr1v LBtNyILZuilYUb5zjmA4X3GL18xfue7uTrlbPARwy0M/THWCRiaCJpri95BxAw0+m/ HSlWiUFXMn8kK3pMz5FwnJc7pql3boXkj9kgmXL14PEifaCUMniNALGiROjEh9ahDh OMhhWZlu7KboxBsRGOKaMnddv5oVLN4rmsKeESGNZqAFCZukZhvI2P9/oLwUi76eQq plz4DWOTauDSw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VP0Gj39Rgz9rxP; Tue, 23 Apr 2024 13:27:57 +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: <117e93f189241f4800af207ce30aa606@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> <87a5lpeiey.fsf@localhost> <87zftp6zz3.fsf@localhost> <98f04a910f31ff9ab38e2ddf9e7f2f5c@condition-alpha.com> <87mspmq1ce.fsf@localhost> <117e93f189241f4800af207ce30aa606@condition-alpha.com> Date: Tue, 23 Apr 2024 11:28:52 +0000 Message-ID: <87zftkpbbf.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_H4=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-Spam-Score: -9.59 X-Migadu-Queue-Id: 413717058C X-Migadu-Spam-Score: -9.59 X-Migadu-Scanner: mx10.migadu.com X-TUID: DVGWS9P09DYt --=-=-= Content-Type: text/plain Alexander Adolf writes: > Ihor Radchenko writes: > >> [...] >> Calling `org-columns--clean-item' is a must to create a valid table. > > True. > > Additionally, it would seem advisable to call `org-quote-vert' on the > data, too, as `org-columns--clean-item' does not take care of vertical > bars? This is done in a previous step in `org-columns--capture-view', > however, so that the vertical bars get converted to "\vert" before the > formatting function gets called. > > `org-link-heading-search-string', and `org-link-make-string' (both > called from the formatting function _after_ `org-columns--clean-item') > OTOH take care of the link's path and description parts being > appropriate for a link. It would make sense then to include `org-quote-vert' call into `org-columns--clean-item' then. > Kindly find updated patches below. I hope to have succeeded in > addressing all your comments; that was my intention at least. Thanks! > (defun org-columns--capture-view (maxlevel match skip-empty exclude-tags format local) > "Get the column view of the current buffer. >... > +When LOCAL is non-nil, only capture headings in current subtree. When > +LINK is non-nil, item headlines will be linked to their origins. Looks like you removed the LINK parameter, but forgot to remove its description from the docstring. > + (let ((search (org-link-heading-search-string raw))) > + (org-link-make-string > + (if (not (buffer-file-name)) search > + (format "file:%s::%s" (buffer-file-name) search)) > + cleaned)) This will unconditionally generate file: links, even when the dynamic block only refers to headings in the same buffer. The clock tables do use internal links when appropriate (see `org-clock-get-table-data'). I am attaching a patch containing test case making sure that internal links are generated when appropriate. The test case is failing with the latest version of your patch. If you can, please add some more tests like mine checking `org-columns--clean-item'. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-colview-Add-test-for-the-new-link-parameter.patch >From 3961072d80883aef5da21d8d6ba10213778ff32f Mon Sep 17 00:00:00 2001 Message-ID: <3961072d80883aef5da21d8d6ba10213778ff32f.1713871396.git.yantar92@posteo.net> From: Ihor Radchenko Date: Tue, 23 Apr 2024 14:22:44 +0300 Subject: [PATCH] org-colview: Add test for the new :link parameter * testing/lisp/test-org-colview.el (test-org-colview/dblock): New test case. --- testing/lisp/test-org-colview.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testing/lisp/test-org-colview.el b/testing/lisp/test-org-colview.el index 7f0aa763e..872a61753 100644 --- a/testing/lisp/test-org-colview.el +++ b/testing/lisp/test-org-colview.el @@ -1422,6 +1422,18 @@ (ert-deftest test-org-colview/dblock () "* H\n:PROPERTIES:\n:A: 1\n:END:\n#+BEGIN: columnview\n#+END:" (let ((org-columns-default-format "%ITEM %A")) (org-update-dblock)) (buffer-substring-no-properties (point) (point-max))))) + ;; Test `:link' parameter. + (should + (equal + "#+BEGIN: columnview +| ITEM | +|------| +| [[*H][H]] | +#+END:" + (org-test-with-temp-text + "* H\n#+BEGIN: columnview\n#+END:" + (let ((org-columns-default-format "%ITEM")) (org-update-dblock)) + (buffer-substring-no-properties (point) (point-max))))) ;; Test column widths. (should (equal -- 2.44.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 --=-=-=--