From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MHrMCydTrWA0CgAAgWs5BA (envelope-from ) for ; Tue, 25 May 2021 21:42:31 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oD5gBydTrWCJPAAAbx9fmQ (envelope-from ) for ; Tue, 25 May 2021 19:42:31 +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 4EF3618DC2 for ; Tue, 25 May 2021 21:42:30 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id BF3EA2AFF8; Tue, 25 May 2021 15:42:22 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [IPv6:2a0b:5c81:1c1::37]) by mail.notmuchmail.org (Postfix) with ESMTPS id B56EC271DA for ; Tue, 25 May 2021 15:41:54 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 885B81B00107; Tue, 25 May 2021 22:41:50 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1621971710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/I63lQeIus1wax4QmIsWm3HX6UwIpE8+eMAjQzacgEY=; b=YRsLkuH11F15zxXUFI6AuP1cy4v1BCAxSoFh+pYSzIf8l4yOr7wurkmneWAb+y1vW1/J6Q VtVQ3P6/nN99F1bHnZU1a9mizqgtrfokkYpn4CtRgez0rOlYJ0AYd0kir0c+Z2qhGQ26cQ corB+hGocyTSHxbZ5UZzNJ3BqpTysMGUC+7sKbtLAr8gRr1AiaVJmQQbX6wXiOI277NVkx JKc/cTPQ0Ahltiu1euBrSJKTLrqTDn3/8JzsTY3bhY7blqi25i2fVp7g+tKL9M1SDr/O0q scDEOvLCX3fTlDrU7kJse6kbRNeNPuqZYXz7kvPSJH9KMe2KROHqCOo67WdRhA== From: Tomi Ollila To: Protesilaos Stavrou , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: use new face for notmuch-jump and related In-Reply-To: References: User-Agent: Notmuch/0.32+21~gfdddd4c (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1621971710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/I63lQeIus1wax4QmIsWm3HX6UwIpE8+eMAjQzacgEY=; b=jmL3eLD3U4zsf6QHGjwAv6Y1YPQQYOJS277hadXM6BwkXns3ZWeATAjuqe9SL7P18qqHfG oSwGSiq9DGd5RrYzFjs5TRGgSO6nOQx9t45CTTVDjXj9fzVUaJntxy3E+Pq4npcKnLX/Dr 3cKZhkkaJh6/KqCcIgcnDcNoQEiFDAhwwp5R8t30yu4UJLW4UJzcjD+lOyHqpTE4glw9nL /ZiWT/YVFmEsNMaHhcfE0YHGcp/Pd+M9LI1SyVKLg3eRtsHcmOvfpR3IY/6ALHPhNw5t5N /UD1d2q+ceqWgl7YbOKy34xuk06lqjCzXmJsXUGY0S9Gof4AJFOp+rpHro6ifw== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1621971710; a=rsa-sha256; cv=none; b=MsFUnTqSoW5Q1A2CdcfwYmpnLH8LSte2FUDGtw7xdAIbAb8iy2S+WPJdGMz+etbZrXislz gqmt2L3ewLRIW646RMmmDIoO/TTyUDTmcVJNJyZWdFHJKgGwLi9EhCKwarZpEcVGMnEk3n zdjWs/tR5CVaCX2nIJHNCVfXNCGtaMuxgkqBqSCKlHKA6Gnxvm0qGrhOBWzwbQ8cDYQE4E qznS4gZbeV2xgmkoS0ktUeY3i/Aw+dWFHgupYVXaMxYZTcs4fr9tsBiKEiByAFmRU53N3k lNcoMAz6oblLk8URoY7EZD7QcQXA/MJISN4m0hNCrIfhAU/LC8oBRxGTCTuOOA== Message-ID-Hash: TZN7IX37Y2YGJCZRDP5AZJ5DDJAZX4HX X-Message-ID-Hash: TZN7IX37Y2YGJCZRDP5AZJ5DDJAZX4HX X-MailFrom: tomi.ollila@iki.fi 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621971750; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=3VUJwiYoH/vyKpuFfn8RaK8Osswe7sPoo27ydeLyisE=; b=geXIKmD7RD9BMwGsgTd8tERorr3r+Dme3EjnRXZzmY+kSrdJO5rYFyAgsaLL3udJaaKU6a WYcYxsQZwaNhg79eLPMQF+pt+B6rAoZYDP5fR1UNjHN7zTv1HKw1Auj4zG+rWQRebpshHD 1jZE73CV4QRsyWhqeBmhdwHRxYKrBEdtfGBeH5t80AOwDUx1S/qL5avcdfQFc6gZfaHaxp YD93/PpqfB6j906NJ5DA3Mpn2/URX9rcS3MiRtuSkHzC7goabYvPAXFyOeF/q9e6tFmVzp 3M60SpYq9WUoK4LrIRJVtf4WCrowx4vlsFiPdKKmXfFlH8WR/v6/bMS3MPIxkA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1621971750; a=rsa-sha256; cv=fail; b=hGYlTeY4GeHJwY5HRSmDL9RGldwODlmQeXrb0Zo+lB5tKTELHv/rOIFIl/IHwMrfEXDpxZ O16hCFUNWG+I3PfFdw9dm1igp03dhaP6RclMxKZp6zf735r7XPdOMesipd/r57eI/u6R1z py8iJ8Jd9SSD23fsJnRICRdUSl6spvrcRuGkGyZFyqXCuWsgxTIDa/h2LPtRfN3JOBAvo+ wxBB0IDUNMyHh3xjXq9bHbHZRkDr9bazHQCOGQKlfNwElaPtCU+t7YhFw0zpC1XeZTA8Fq Tl8R00jHflvt/CBHiur1bcV5eU1popIC0tHaW4OGcioSE6kZyfkOes9cRsDXqg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=YRsLkuH1; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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: 0.94 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=YRsLkuH1; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); 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: 4EF3618DC2 X-Spam-Score: 0.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: IhuzgCcWQ8at On Fri, May 21 2021, Protesilaos Stavrou wrote: > 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. This looks like a good change. How does one test this and see the difference? Tomi > --- > 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 > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org