From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sAAgEWmL6mGWSwEAgWs5BA (envelope-from ) for ; Fri, 21 Jan 2022 11:31:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id YIL/CWmL6mEf9QAAG6o9tA (envelope-from ) for ; Fri, 21 Jan 2022 11:31:05 +0100 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 5D88227EFB for ; Fri, 21 Jan 2022 11:30:59 +0100 (CET) Received: from localhost ([::1]:37762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nArC6-0001fc-Dr for larch@yhetil.org; Fri, 21 Jan 2022 05:30:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAr9v-0001ay-3Z for emacs-orgmode@gnu.org; Fri, 21 Jan 2022 05:28:43 -0500 Received: from [2001:4b98:dc4:8::223] (port=51587 helo=relay3-d.mail.gandi.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAr9s-0005lC-R8 for emacs-orgmode@gnu.org; Fri, 21 Jan 2022 05:28:42 -0500 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by mail.gandi.net (Postfix) with ESMTPSA id 4D85760007; Fri, 21 Jan 2022 10:28:35 +0000 (UTC) From: Nicolas Goaziou To: Samim Pezeshki Subject: Re: [PATCH] lisp/org-agenda.el: Add header to agenda clock report table References: Date: Fri, 21 Jan 2022 11:28:34 +0100 In-Reply-To: (Samim Pezeshki's message of "Mon, 10 Jan 2022 12:56:49 +0330") Message-ID: <875yqdtmb1.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:4b98:dc4:8::223 (failed) Received-SPF: pass client-ip=2001:4b98:dc4:8::223; envelope-from=mail@nicolasgoaziou.fr; helo=relay3-d.mail.gandi.net X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642761059; 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=3/gDQowWjKT5t0hls+kEeE17SwpGrdSzM7Ue0puyLKc=; b=mChw41L+9ijFbI2xXM0LtPvA0OYLfhf88rhusZ9qgxBhOQCEoRs0HmvALS+jCRPvHVHzGF hWNv1uMKsr5agz64afhJZJ73jNNOZptuZ6Zssg5T9xmQSLkeZ4ehIeOCl9Qh4qIisLrQ8R /URZvhL91Ba0aooLjDxRWjJxUK0YCI+JAoGr2kOAtRXSNJwEvEj21iy8IjG2gHR1Ebs6Xa kU05agr1QKxnjW2yosrLOrYxQG0LZ3zUObzA1hoFHK5zlkB9e880gMEJxVbT1UogUKKDOi 7hhjBkLMF11E2x3oIC/FnMNrVFAxWHcQ83+8i1soVKedyVux0ZPEhSJtm9pCag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642761059; a=rsa-sha256; cv=none; b=WTIiNkAZOCVYjF66wfal83lEU5sPxPNa8tyjBVuW+LypIzlhTw3sMtIQO6j3diy2cPnA9q nSpPZc8FxVXgbmvqm7Hm4z5UeQEXlHtz3mIRGIxk+oLxieQlMIqSbLmKKz2DGUZwOfo5LQ yQMrrlI8sXvBVi6RJJ1MQY5czJrwJVnLyLHeDaJVMeXrVYUpocGjE4UYGUWC9UKZzeN/cb J06+G0NtxJAe82ojk/Lf18tQvxcG3dekcvsDBYaKO5w47I6fE/uH/66FF1ozHot0MMC4WB aiXNLlAUi8KTerGUuWk73BYYOrN+TliucGTTVLfIr5k14t23V/AAPfeNjeMHxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=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: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 5D88227EFB X-Spam-Score: -3.12 X-Migadu-Scanner: scn1.migadu.com X-TUID: HIjCcz1CxdhH Hello, Samim Pezeshki writes: > +(defcustom org-agenda-clock-report-header nil > + "Header for org agenda clock report mode" > + :group 'org-agenda > + :type 'string) Please add :package-version and :safe keywords to the definition. Also, type does not match the default value. You probably mean (choice (string :tag "Header") (const :tag "No header" nil)) > + > (defun org-agenda-time-of-day-to-ampm (time) > "Convert TIME of a string like \"13:45\" to an AM/PM style time string." > (let* ((hour-number (string-to-number (substring time 0 -3))) > @@ -4473,6 +4478,10 @@ items if they have an hour specification like [h]h:mm." > (setq p (plist-put p :tend clocktable-end)) > (setq p (plist-put p :scope 'agenda)) > (setq tbl (apply #'org-clock-get-clocktable p)) > + (when org-agenda-clock-report-header > + (put-text-property 0 (length org-agenda-clock-report-header) 'face 'org-agenda-structure > + org-agenda-clock-report-header) > + (insert org-agenda-clock-report-header)) Maybe: (insert (propertize org-agenda-clock-report-header 'face 'org-agenda-structure)) Could you send an updated patch? Regards, -- Nicolas Goaziou