From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Protesilaos Stavrou Newsgroups: gmane.emacs.bugs Subject: bug#61661: 30.0.50; [PATCH] Define 'appt-notification' face Date: Mon, 20 Feb 2023 21:15:12 +0200 Message-ID: <874jrgdu7z.fsf@protesilaos.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19054"; mail-complaints-to="usenet@ciao.gmane.io" To: 61661@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 20 20:16:46 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUBeV-0004e6-24 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 20 Feb 2023 20:16:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUBeA-0004DE-0D; Mon, 20 Feb 2023 14:16:22 -0500 Original-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 1pUBdt-0004Ao-H8 for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 14:16:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUBdq-0003Ak-Rc for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 14:16:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pUBdq-00034f-85 for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 14:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Protesilaos Stavrou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Feb 2023 19:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61661 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167692054911795 (code B ref -1); Mon, 20 Feb 2023 19:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 20 Feb 2023 19:15:49 +0000 Original-Received: from localhost ([127.0.0.1]:53675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUBdd-00034A-E4 for submit@debbugs.gnu.org; Mon, 20 Feb 2023 14:15:49 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:41164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pUBda-00033w-5p for submit@debbugs.gnu.org; Mon, 20 Feb 2023 14:15:47 -0500 Original-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 1pUBdA-00042l-HA for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 14:15:32 -0500 Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUBd8-0002wk-0v for bug-gnu-emacs@gnu.org; Mon, 20 Feb 2023 14:15:20 -0500 Original-Received: (Authenticated sender: public@protesilaos.com) by mail.gandi.net (Postfix) with ESMTPSA id 9E95F1BF203 for ; Mon, 20 Feb 2023 19:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protesilaos.com; s=gm1; t=1676920513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=dAYI/t2H7NmJ5ETQaOnE73gQ3xJ8hX2GmApdpHpDS+Y=; b=ElGKJX9Q8H3DKm36u6mdTPIqd6fL87lHn/C/vownI/hJiXhK+paSjhQ3D6vV27K/vWbkYB obM/taYlexL+977apQc3rb3QkpkOkNU9BvkgQmWJunm93TC5oGJuCU0htPwYtKHWahrvw5 UI3AEiHJK68Lpy4jYAIxV+O19PEt6LF5+XlDjiNbVnCprkngPFNby5khuW51t3uXj4bKev ZZiVr1Cp6T5rzPSo9oB7A4KK3Fp9IUr50ddUAPECM0cECeKy7kFlSifYlEVvVmxewcTSMt eZ1eBPc+P2d4KCpjDPPphK5Zpe2trvjQWkmRs6FZpli1pOOuiWbAaVxzyMyKJw== Received-SPF: none client-ip=217.70.183.201; envelope-from=info@protesilaos.com; helo=relay8-d.mail.gandi.net X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256214 Archived-At: --=-=-= Content-Type: text/plain Dear maintainers, The appt.el library can show a notification for upcoming appointments on the mode line. The face it uses is hardcoded to 'mode-line-emphasis' which, by default, is a bold weight. With the attached patch, we have a new face that the user/theme can set to something easier to spot like bold+red. Decoupling this indicator from the generic 'mode-line-emphasis' allows us to add extra styling only to the notification without affecting other parts of the mode line that may be using 'mode-line-emphasis'. What do you think? All the best, Protesilaos (or simply "Prot") -- Protesilaos Stavrou https://protesilaos.com --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Add-appt-notification-face.patch >From 02a8768e4e81b8a645b81cb4864387bf4422bcfe Mon Sep 17 00:00:00 2001 Message-Id: <02a8768e4e81b8a645b81cb4864387bf4422bcfe.1676919809.git.info@protesilaos.com> From: Protesilaos Stavrou Date: Mon, 20 Feb 2023 21:03:08 +0200 Subject: [PATCH] Add 'appt-notification' face * etc/NEWS: Announce the new face. * lisp/calendar/appt.el (appt-notification): Declare the new face. (appt-check): Implement the new face. --- etc/NEWS | 6 ++++++ lisp/calendar/appt.el | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index bcce416ebc1..04fe60be493 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -61,6 +61,12 @@ This allows the user to customize the prompt that is appended by This is used for displaying the time and date components of 'display-time-mode'. +--- +** New face 'appt-notification'. +This is used for the warning message when 'appt-display-mode-line' is +non-nil. + + * Editing Changes in Emacs 30.1 diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 49597739446..3c2d7fee24b 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -165,6 +165,12 @@ (defcustom appt-delete-window-function #'appt-delete-window :type 'function :group 'appt) +(defface appt-notification + '((t :inherit mode-line-emphasis)) + "Face for appointment notification on the modeline. +Shown when `appt-display-mode-line' is non-nil." + :group 'mode-line-faces + :version "30.1") ;;; Internal variables below this point. @@ -406,7 +412,7 @@ (defun appt-check (&optional force) (appt-mode-line (mapcar #'number-to-string min-list) t) - 'face 'mode-line-emphasis) + 'face 'appt-notification) " "))) ;; Reset count to 0 in case we display another appt on the next cycle. (setq appt-display-count (if (equal '(0) min-list) 0 -- 2.39.2 --=-=-=--