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 IASrK4KMpGM7NwEAbAwnHQ (envelope-from ) for ; Thu, 22 Dec 2022 17:57:38 +0100 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 AKqsK4KMpGNlQgAAauVa8A (envelope-from ) for ; Thu, 22 Dec 2022 17:57:38 +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 57D8D36614 for ; Thu, 22 Dec 2022 17:57:38 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p8OsJ-0002d2-V3; Thu, 22 Dec 2022 11:56:56 -0500 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 1p8OsH-0002cp-Iq for emacs-orgmode@gnu.org; Thu, 22 Dec 2022 11:56:54 -0500 Received: from 6.mo584.mail-out.ovh.net ([188.165.36.253]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p8OsF-0008VD-QH for emacs-orgmode@gnu.org; Thu, 22 Dec 2022 11:56:53 -0500 Received: from director1.ghost.mail-out.ovh.net (unknown [10.109.143.109]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id 23B0125C17 for ; Thu, 22 Dec 2022 16:56:38 +0000 (UTC) Received: from ghost-submission-7678f9748b-88vcp (unknown [10.110.115.222]) by director1.ghost.mail-out.ovh.net (Postfix) with ESMTPS id B826C1FD31 for ; Thu, 22 Dec 2022 16:56:37 +0000 (UTC) Received: from gautierponsinet.xyz ([37.59.142.97]) by ghost-submission-7678f9748b-88vcp with ESMTPSA id J3roL0WMpGNEbAAAtqdjvQ (envelope-from ) for ; Thu, 22 Dec 2022 16:56:37 +0000 X-OVh-ClientIp: 147.210.21.1 Received: by gautier-laptop.localdomain (Postfix, from userid 1000) id B57EC442AFD; Thu, 22 Dec 2022 17:56:12 +0100 (CET) From: Gautier Ponsinet To: emacs-orgmode@gnu.org Subject: New face: org-agenda-calendar-timerange Date: Thu, 22 Dec 2022 17:56:12 +0100 Message-ID: <873597xtqr.fsf@gautierponsinet.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Ovh-Tracer-Id: 10107766414285268891 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 70 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrhedtgdeliecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecufghrlhcuvffnffculdejtddmnecujfgurhephffvufffkfggtgesmhdtreertddttdenucfhrhhomhepifgruhhtihgvrhcurfhonhhsihhnvghtuceoghgruhhtihgvrhesghgruhhtihgvrhhpohhnshhinhgvthdrgiihiieqnecuggftrfgrthhtvghrnheptdduueelvdduhefhteelkeethfdtjedvkeeiheefjeevieeuveetfeekffeljeffnecukfhppeduvdejrddtrddtrddupdefjedrheelrddugedvrdeljeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehgrghuthhivghrsehgrghuthhivghrphhonhhsihhnvghtrdighiiiqedpnhgspghrtghpthhtohepuddprhgtphhtthhopegvmhgrtghsqdhorhhgmhhouggvsehgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeegpdhmohguvgepshhmthhpohhuth Received-SPF: pass client-ip=188.165.36.253; envelope-from=gautier@gautierponsinet.xyz; helo=6.mo584.mail-out.ovh.net X-Spam_score_int: 1 X-Spam_score: 0.1 X-Spam_bar: / X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, FROM_SUSPICIOUS_NTLD=0.001, FROM_SUSPICIOUS_NTLD_FP=1.997, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , 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 ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671728258; a=rsa-sha256; cv=none; b=Bu1+QGEOFR7/fw/DpqsUuOZFyD4lc8eDtcI7d8/23ZFaHQfTvgP11D+5QS5jQaCf4akDyD NL6yUgn8bDlB1UiWDkxkSLlwIf3cE9k7yzAQExe75jQqQpfufGohu27/5Eyfkwpm+eBPQi CCe+YxuFw17pKG6alGEQY7bwKugtcfmsmvMAh6JM23Qd0QOjuFmGxWyUsvc773Qa+GQ26J lSWSkNwr1IvaXqfKoHr/V8ZAlPE2jZmJw7F7CucmUGsuC/4TEB0He11/iRqqxqkC5cWqup hpHDdjnocQ4GC4XuTsZCE6NxrVlVK7hebTRiNEOaO3efJV6Ju/T7m+FSjqAz3A== 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671728258; 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; bh=O/EEKE98njvNb6RQMbCxN57POVOrMkwVuqRZpi1XfZY=; b=H20BCcX47+09Q5MoqebIg/1Z0Iibocdb1sJKIyY0sW5SXyn9Beb4H6eoYfqVzb8NIoXMN9 JfUKkGm93pN1RKc0yDuglJSEqdKZzHJqJGKaga1kdk5FtdxgvCS+56S7FXhnvyu9a7SZyS mSJ0EaJ/i9Oul0+ui2BPg4XydCZgRcx7yeOVLhHrgG+OKF/lbBzJ8+T0hzEy4RbFquYoal wNWML87OqTBtTsEizKpBoAy6xjyJ8IP5LGJNWJXam0im9eAoKYKWzf0oFCS6wdXnI+WRQh QPHv8w4CMoT1cPY1Cz+DxPcd9BAjuCgJfY9kx2xx5+JBwOnU1TnyNd/n66wEYA== X-Spam-Score: -3.80 X-Migadu-Queue-Id: 57D8D36614 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 X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -3.80 X-TUID: gc8sp15AW3d9 --=-=-= Content-Type: text/plain Hello everyone, I would like to propose the introduction of a new face: org-agenda-calendar-timerange. It is used to show entries with a timerange in the agenda, that is, entries with a timestamp of the form: <2022-12-22 Thu>--<2023-01-01 Sun> At the moment, these entries with a timerange use the default face. Please find attached a patch. This is my first contribution (I just finished the copyright assignment process with the FSF), so any feedback would be greatly appreciated. In particular, could someone confirm that the function org-agenda-get-blocks is the right place to apply the face? I place it there mimicking how the faces org-agenda-calendar-event and org-agenda-calendar-sexp are applied but I am not sure of this. All the best, Gautier. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Define-the-face-org-agenda-calendar-timerange.patch >From 31f2c3fc0ed93a100ccf18472cb44e2434d3060f Mon Sep 17 00:00:00 2001 From: Gautier Ponsinet Date: Fri, 16 Sep 2022 22:14:11 +0200 Subject: [PATCH] Define the face org-agenda-calendar-timerange The face org-agenda-calendar-timerange is used to show entries with a timerange in the agenda. --- etc/ORG-NEWS | 5 +++++ lisp/org-agenda.el | 2 +- lisp/org-faces.el | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index a4e54dc41..d7f6ba846 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -27,6 +27,11 @@ backend delegates listing generation to another package like ,#+LATEX_HEADER: \DefineVerbatimEnvironment{lstlisting}{Verbatim}{...whatever...} #+END_src +*** New face: ~org-agenda-calendar-timerange~ +The face ~org-agenda-calendar-timerange~ is used to show entries with +a timerange in the agenda. It inherits from the default face in order +to remain backward-compatible. + * Version 9.6 ** Important announcements and breaking changes diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 05f2e3669..6f7a2c19c 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -7059,7 +7059,7 @@ scheduled items with an hour specification like [h]h:mm." (defun org-agenda-get-blocks () "Return the date-range information for agenda display." (with-no-warnings (defvar date)) - (let* ((props (list 'face nil + (let* ((props (list 'face 'org-agenda-calendar-timerange 'org-not-done-regexp org-not-done-regexp 'org-todo-regexp org-todo-regexp 'org-complex-heading-regexp org-complex-heading-regexp diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 0effa13a1..a6143cd21 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -668,6 +668,10 @@ month and 365.24 days for a year)." "Face used to show events computed from a S-expression." :group 'org-faces) +(defface org-agenda-calendar-timerange '((t :inherit default)) + "Face used to show entries with a timerange in the agenda." + :group 'org-faces) + (defconst org-level-faces '(org-level-1 org-level-2 org-level-3 org-level-4 org-level-5 org-level-6 org-level-7 org-level-8)) -- 2.39.0 --=-=-=--