From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SBuRBh7qp2DQrwAAgWs5BA (envelope-from ) for ; Fri, 21 May 2021 19:13:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id yAljAh7qp2DUaAAAB5/wlQ (envelope-from ) for ; Fri, 21 May 2021 17:13:02 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C348F1F401 for ; Fri, 21 May 2021 19:13:01 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 25F8A2716D; Fri, 21 May 2021 13:12:57 -0400 (EDT) X-Greylist: delayed 925 seconds by postgrey-1.36 at nmbug; Fri, 21 May 2021 13:12:53 EDT Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by mail.notmuchmail.org (Postfix) with ESMTPS id 1ACAA270CC for ; Fri, 21 May 2021 13:12:53 -0400 (EDT) Received: from relay3-d.mail.gandi.net (unknown [217.70.183.195]) by mslow1.mail.gandi.net (Postfix) with ESMTP id D444ACEC26 for ; Fri, 21 May 2021 16:55:56 +0000 (UTC) Received: (Authenticated sender: public@protesilaos.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 138A660002 for ; Fri, 21 May 2021 16:55:32 +0000 (UTC) From: Protesilaos Stavrou To: notmuch@notmuchmail.org Subject: [PATCH] emacs: use new face for notmuch-jump and related User-Agent: Notmuch/0.32 (https://notmuchmail.org) Emacs/28.0.50 (x86_64-pc-linux-gnu) Message-Id: Date: Fri, 21 May 2021 19:55:31 +0300 MIME-Version: 1.0 Message-ID-Hash: MMIQUCFIVWSVUUE3G3GPOFL46PGYZUQM X-Message-ID-Hash: MMIQUCFIVWSVUUE3G3GPOFL46PGYZUQM X-MailFrom: info@protesilaos.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621617181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=2f0m2JQHqY8Evw7ZOT8nCEK+s7PtdBykMK1m5n+hJKc=; b=m4DrWbhMrke9KdN2GpVjm6C/u7+jhRCUJWGBB+5s7jYt0Mj119q2qm97R5lUzengmF1Hva deP6i6WRsHKXqDQKT2OlshtMQi3sZYP/ipUQkUBQGwPVC9g6oKOprME+OzmS1+/rFFkrUp gizI/n0WrFPY1JYAcJkFC0lRlfDF5/0E9LFhO9DS5+u+yD9E/i8egLHcP4VDHGoD3b+suT hEoFFDHv5MzARvxZNItBh6Dxj0h6LBCLP27TKiQGtzgTnmTlimxiGrCcaAnSJ0lJEhAS/R NQjjlczV1T04Fixf+w7Kj9jKTeSW0z7xfbHd3gJSlI1kGdNKsq3xmWeXmvwp3w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621617181; a=rsa-sha256; cv=none; b=t3K98AgLMy1DkEw/tM7zENmRE3H2cFIKNGD8tkP88TIiTPm6kPEmhzbARO805avyT8gfgz oa7cw8uc7PfWaWzs+dHtSqShzusKHHs6C7hjzmM1Gz43ITZDKf2Rf25gtzLpxBnqmCcKUE iozKGuQX5UO+rOKjsd4fkFuQHuLmM6dOnhKoLzYDYQQkbmlUJGMwRe0jY5u4lvxh/DC80R h9csqjusFhuyKGHqgt1frpOFKCLuZBpjQZTh1m3vfCJ8Z8chKlHmc0EwujMqkkNWzWrt/p Fe435sm3h1B5tZgGrLK/JCWGEA3M/ns7ihGsIiS5kt2n6yczn1qr0otuns5NfQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.07 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: C348F1F401 X-Spam-Score: -1.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: lp7BvdYUqdQE The minibuffer-prompt face that was used before made it impossible to differentiate between two distinct UI elements: (i) the prompt's text which itself cannot be acted upon, (ii) the actionable keys used to jump to searches/tags. The use of a named face, notmuch-jump-key, makes it possible for users or theme developers to apply properties that are specific to each of those two cases. In the interest of backward compatibility, the new face inherits from minibuffer-prompt. --- NEWS | 4 ++++ emacs/notmuch-jump.el | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index c0ae6afe..83e42b44 100644 --- a/NEWS +++ b/NEWS @@ -29,6 +29,10 @@ Emacs Restore the dynamically bound variables `tag-changes` and `query` in in `notmuch-before-tag-hook` and `notmuch-after-tag-hook`. +Add `notmuch-jump-key` face to fontify keys in `notmuch-jump` and +related functions. To ensure backward compatibility, the new face +inherits from `minibuffer-prompt`. + Notmuch 0.32 (2021-05-02) ========================= diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el index 6fab5a79..e228c8a2 100644 --- a/emacs/notmuch-jump.el +++ b/emacs/notmuch-jump.el @@ -62,6 +62,11 @@ (defun notmuch-jump-search () (error "To use notmuch-jump, %s" "please customize shortcut keys in notmuch-saved-searches.")))) +(defface notmuch-jump-key + '((t :inherit minibuffer-prompt)) + "Default face used for keys in `notmuch-jump' and related." + :group 'notmuch-faces) + (defvar notmuch-jump--action nil) ;;;###autoload @@ -88,7 +93,7 @@ (defun notmuch-jump (action-map prompt) (buffer-string))) (full-prompt (concat table "\n\n" - (propertize prompt 'face 'minibuffer-prompt))) + (propertize prompt 'face 'notmuch-jump-key))) ;; By default, the minibuffer applies the minibuffer face to ;; the entire prompt. However, we want to clearly ;; distinguish bindings (which we put in the prompt face @@ -123,7 +128,7 @@ (defun notmuch-jump--format-actions (action-map) ;; Format each action (mapcar (pcase-lambda (`(,key ,desc)) (setq key (format-kbd-macro key)) - (concat (propertize key 'face 'minibuffer-prompt) + (concat (propertize key 'face 'notmuch-jump-key) (make-string (- key-width (length key)) ? ) " " desc)) action-map))) -- 2.31.1 -- Protesilaos Stavrou https://protesilaos.com