From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wFEGKXPM9mKoSgEAbAwnHQ (envelope-from ) for ; Fri, 12 Aug 2022 23:56:03 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mKDzKHPM9mKTcgAAauVa8A (envelope-from ) for ; Fri, 12 Aug 2022 23:56:03 +0200 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 4822515F3D for ; Fri, 12 Aug 2022 23:56:03 +0200 (CEST) Received: from localhost ([::1]:54826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMcdO-0002gA-2e for larch@yhetil.org; Fri, 12 Aug 2022 17:56:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60894) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMccK-0002ET-1d for Emacs-orgmode@gnu.org; Fri, 12 Aug 2022 17:54:56 -0400 Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:54140) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMccI-0006iQ-6F for Emacs-orgmode@gnu.org; Fri, 12 Aug 2022 17:54:55 -0400 Received: by mail-pj1-x102b.google.com with SMTP id pm17so2117401pjb.3 for ; Fri, 12 Aug 2022 14:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=+9vTeDjcAQyVdQeLFTpK3SCHP1eE9jOqsT7dsncB7qE=; b=ZTVrMwbOOcuvSrnXkcy/QHE1myfL8Sk+egtQsWnzBhGk1t6NsZqG0JoSBxvCJZHGND 38CPRCLX+ve09Z/WqAZXZ4gBBnWt7QCWOFnKMCzk8qUCvPcVwe56oSDddQAaBnukrKmS coEzoibM2jmBVyRKCtb0aEKPWr3at/HAi3QuJNisLa8Du7FUpRop4fUUWFnU42FnlvVM qDTnky8+NPt/iJ3YYeV4mkN4U21HNFNQ22+3rLCf0GsoELGyG25U6FxxsgZkUjeWtUpA mnHMCt95a4HGgaNoA93C7tMut+eUrBt8/Kdc1CvoCJ2mpbiZNJ38a5RCB7bNrpS3FpEc c4WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=+9vTeDjcAQyVdQeLFTpK3SCHP1eE9jOqsT7dsncB7qE=; b=KiADGfaXYmR+jrcRqoi+9NaegHQc1aOZKF8pGPwpBLiR694rjn9D8wdFnxGFARtM2k PMHZAqtmcqE9I7dFrb2uHST0xVHa3+JQu+6Y0J2U5oHbr2LMtbrrzr16PXt9vEmCfDvd LdehQzs7khuhDFD3KGCB3XPHZGe4E1wR7rOREUxF9uNGjW8Ob97s95ymya3X5bmRt844 9bBr6KFpTp7YaEJ704JG1LWfna47BUw0lm96L5bC4tVX1uoWVA7Bdx9FCLmv5CkQYMwB wl9AyuEAxKI9zasMVLGS1oyP9Vm42+D139OMkRe7hEGqyQLU8pF0I2ZeVNAk7JWNctaR f2Jw== X-Gm-Message-State: ACgBeo3dpWmsdo4rrFblHHuXmIKI3YbujGz39kHVItpCh3GJC6C2NqJT t2O5paoemHkyhtF/Lbk/iyonWY2nyhZ41cCjhk3YimRY88tvlg== X-Google-Smtp-Source: AA6agR4UKrTCAw3qNHb4kgaB609+dwuRc5M+vK29hSX3JgZtgRu0XZxW1WZtd8J6F7+Bo3wNJ7c6NHoUBfgelNmuqjc= X-Received: by 2002:a17:902:cf12:b0:16c:a263:62b8 with SMTP id i18-20020a170902cf1200b0016ca26362b8mr5820444plg.31.1660341291837; Fri, 12 Aug 2022 14:54:51 -0700 (PDT) MIME-Version: 1.0 From: Duy Nguyen Date: Fri, 12 Aug 2022 23:54:40 +0200 Message-ID: Subject: [Patch] Show org file title in org-clock clocktable To: Emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000e924fa05e6125418" Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=ddnguyen2101@gmail.com; helo=mail-pj1-x102b.google.com 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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1660341363; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Q9RVv+rKF3Pq2z4blyc+2xtFKS6FRRKhXkyrU/au7Rc=; b=CIzOm4ZK5FhB3znukoMONnfIY1XAMH0WYol0WCnyYeeIy+11ho3FqxwTThIlVpjO67SzD1 y47/tLgWppuLSt439ylGlLuFyk5Eu0W0rOYekbWby7Tu3eL4Z1wSQp33x0ZYqSAE/lgAyv hc1+/RLdnSWISO2sKqbH6dFofw7QYGlK8W59I6TkRAvYtQbSyJzvBB3khAnZjYXX4XOiLn nDDfhTZjZqTdD/4A1vHvEel4JFk6tcvOTLGMzVkmASjwHv9kVDN9iIGjkBssWSgwCxi/3o V1Owq1ZoAcRcKOh+ppZ8nhVWWeG/W4Iki9s5Dnmicwc8gnsWg5+fNB3S1ePRfQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1660341363; a=rsa-sha256; cv=none; b=NKoCo0UtS5jvnhJ5YM2igZhEYWNpr42hjKtJO9/HC5thyBW2qCzINgCdHxNMMOp1HhqzGW JJQFl8dAZgjkLyvXnAY65pPtcEYq3cRcZrmYSUNivzayCwAXZT4VdAY1jzPcSHg/FkSrGJ 3GcKQ/DQ1tt+mVUeAmVa9zuoaD9VSektDFS9ZW7BwvdIVcnsA0jiD9p1nfvHIRtO83udhg VGj5/zb8Gp7lz7XPzNneqbbK480rNqifF9m1Q5loCLy/f9BhwYJnaMX7DtLf9gE6hQysHm h+wgf87g/5DDpWY/tPy6gXEndd/HL1VprbIy9Bt0KZrLT7bu0Zg7W9ZJTmQP9Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=ZTVrMwbO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 7.33 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=ZTVrMwbO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Queue-Id: 4822515F3D X-Spam-Score: 7.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: KhHwpnMzj+J3 --000000000000e924fa05e6125418 Content-Type: multipart/alternative; boundary="000000000000e924f905e6125416" --000000000000e924f905e6125416 Content-Type: text/plain; charset="UTF-8" Hello, Please find attached a patch to allow users to show the org file titles (i.e. the value of #+title) instead of the file name in the org-clock clocktable. I created this patch as I am using a combination of org-roam and org-agenda to manage my tasks, where each project has its own org-roam file (and therefore, a #+title). For my work I also need to generate weekly time reports, with my todos spread over different org(-roam) files. I think the clocktable looks nicer with the org file title than the name generated by org-roam, which also has some other irrelevant information (for the clocktable) in it such as date and time created. I believe this feature could be useful for other users as well who have their tasks spread over multiple org-roam files like me. The feature can easily be used by adding ":filetitle t" as an option in the clocktable. Please note that the org-clock-get-file-prop function is heavily inspired by vulpea-buffer-prop-get from the vulpea package - I just copied it over and made some adjustments to make it work for the envisioned use case. As I am relatively new to emacs / elisp and this is my first patch submission ever, I am open to feedback on my patch or on how I did this submission in general. Special thanks to Ihor, who provided me with hints on how to solve this issue and inspired me to submit a patch (original post ). Thanks, Duy --000000000000e924f905e6125416 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

Please find attached a patch to = allow users to show the org file titles (i.e. the value of #+title) instead= of the file name in the org-clock clocktable.

I c= reated this patch as I am using a combination of org-roam and org-agenda to= manage my tasks, where each project has its own org-roam file (and therefo= re, a #+title). For my work I also need to generate weekly time reports, wi= th my todos spread over different org(-roam) files. I think the clocktable = looks nicer with the org file title than the name generated by org-roam, wh= ich also has some other irrelevant information (for the clocktable) in it s= uch as date and time created. I believe this feature could be useful for ot= her users as well who have their tasks spread over multiple org-roam files = like me. The feature can easily be used by adding ":filetitle t" = as an option in the clocktable.

Please note that t= he org-clock-get-file-prop function is heavily inspired by vulpea-buffer-pr= op-get from the vulpea package - I just copied it over and made some adjust= ments to make it work for the envisioned use case.

As I am relatively new to emacs / elisp and this is my first patch submiss= ion ever, I am open to feedback on my patch or on how I did this submission= in general.

Special thanks to Ihor, who provided = me with hints on how to solve this issue and inspired me to submit a patch = (original post).

<= div>Thanks,

Duy
--000000000000e924f905e6125416-- --000000000000e924fa05e6125418 Content-Type: application/octet-stream; name="0001-lisp-org-clock.el-Show-file-title-in-org-clock-clock.patch" Content-Disposition: attachment; filename="0001-lisp-org-clock.el-Show-file-title-in-org-clock-clock.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l6r069as0 RnJvbSBlZGUxMGY1ZjYxMDNjYjU4MDJhNzM0ZGY5NTI1YjdiNDdjMjZjOGFhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEdXkgTmd1eWVuIDxkdXluZ3V5ZW5ARHV5cy1NQlAuaG9tZT4K RGF0ZTogRnJpLCAxMiBBdWcgMjAyMiAxODo0MDoxMCArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIGxp c3Avb3JnLWNsb2NrLmVsOiBTaG93IGZpbGUgdGl0bGUgaW4gb3JnLWNsb2NrIGNsb2NrdGFibGUK CiogbGlzcC9vcmctY2xvY2suZWwgKG9yZy1jbG9ja3RhYmxlLWRlZmF1bHRzKTogQWRkIGRlZmF1 bHQgdmFsdWUgZm9yCm5ldyBjbG9ja3RhYmxlIG9wdGlvbiBgOmZpbGV0aXRsZScuCihvcmctY2xv Y2stZ2V0LWZpbGUtcHJvcCk6IEFkZCBuZXcgZnVuY3Rpb24gdG8gZXh0cmFjdCB0aXRsZSBvZiBv cmcgZmlsZS4KKG9yZy1jbG9ja3RhYmxlLXdyaXRlLWRlZmF1bHQpOiBQcmludCBvcm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