From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#21112: 25; Patch: show minibuffer messages with a face Date: Thu, 27 Jun 2019 00:28:06 +0300 Organization: LINKOV.NET Message-ID: <87y31orqm1.fsf@mail.linkov.net> References: <55AF90B9.5040401@gmail.com> <87si0jvkgv.fsf@gnus.org> <87pnn11nm5.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="172751"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: 21112@debbugs.gnu.org, Raffaele Ricciardi To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 26 23:38:28 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hgFcW-000ijA-I2 for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jun 2019 23:38:25 +0200 Original-Received: from localhost ([::1]:45042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgFcV-0006mK-EU for geb-bug-gnu-emacs@m.gmane.org; Wed, 26 Jun 2019 17:38:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54297) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hgFcB-0006kY-Uc for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 17:38:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hgFcA-0007Cc-PJ for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 17:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51826) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hgFcA-0007CT-Kf for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 17:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hgFcA-0003L8-H5 for bug-gnu-emacs@gnu.org; Wed, 26 Jun 2019 17:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jun 2019 21:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21112 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix patch Original-Received: via spool by 21112-submit@debbugs.gnu.org id=B21112.156158506712782 (code B ref 21112); Wed, 26 Jun 2019 21:38:02 +0000 Original-Received: (at 21112) by debbugs.gnu.org; 26 Jun 2019 21:37:47 +0000 Original-Received: from localhost ([127.0.0.1]:37130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgFbv-0003K4-7t for submit@debbugs.gnu.org; Wed, 26 Jun 2019 17:37:47 -0400 Original-Received: from eastern.birch.relay.mailchannels.net ([23.83.209.55]:60274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hgFbt-0003Jn-5n for 21112@debbugs.gnu.org; Wed, 26 Jun 2019 17:37:46 -0400 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0072B20777; Wed, 26 Jun 2019 21:37:44 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a82.g.dreamhost.com (100-96-38-146.trex.outbound.svc.cluster.local [100.96.38.146]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 74C6F2205E; Wed, 26 Jun 2019 21:37:43 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a82.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Wed, 26 Jun 2019 21:37:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Invention-Little: 009419957572d04d_1561585063769_2343829557 X-MC-Loop-Signature: 1561585063768:3472483297 X-MC-Ingress-Time: 1561585063768 Original-Received: from pdx1-sub0-mail-a82.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a82.g.dreamhost.com (Postfix) with ESMTP id EF71380F71; Wed, 26 Jun 2019 14:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=uGcqgfXTFozYD0QkpGtwH5+1WZM=; b= jBz8tJvsocLuod7lwuTyfZYidaT+SD85oiHo8KuPSHExYE7vVymZngE/pAJilz/M QG5mxPgWQ/RtJis2Crv6BggkzNcxa1RyUcFhhjFZtfajQfjZNNl/YIMv8L5oI+ti 5SFCfkvf08Zwa/UvjeDddLg5Anzr1rU2z0XVIrd+S0M= Original-Received: from mail.jurta.org (m91-129-109-209.cust.tele2.ee [91.129.109.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a82.g.dreamhost.com (Postfix) with ESMTPSA id EFDD980F8F; Wed, 26 Jun 2019 14:37:38 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a82 In-Reply-To: (Lars Ingebrigtsen's message of "Tue, 25 Jun 2019 22:43:30 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrudejgddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehmtderredtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddtledrvddtleenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdelrddvtdelpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtoheplhgrrhhsihesghhnuhhsrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161543 Archived-At: --=-=-= Content-Type: text/plain >>>> I think it might be a good idea to use a different face for these >>>> temporary messages, but you can currently do this: >>>> >>>> (minibuffer-message (propertize "Foo" 'face 'bold)) >>> >>> So I don't think this is something that we want; closing the bug report. >> >> For consistency with isearch messages that are highlighted with the >> minibuffer-prompt face, minibuffer-message needs to do the same. > > [...] > >> + (setq message (apply #'propertize message minibuffer-message-properties)) > > But this will overwrite the face properties the caller has set, right? This patch checks for existing face properties to not overwrite them: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=minibuffer-message-properties.3.patch diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 57702760fb..9a473b6867 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -714,6 +717,9 @@ minibuffer-message (copy-sequence message) (concat " [" message "]"))) (when args (setq message (apply #'format-message message args))) + ;; If not already propertized: + (unless (or (text-properties-at 0 message) (next-property-change 0 message)) + (setq message (apply #'propertize message minibuffer-message-properties))) (let ((ol (make-overlay (point-max) (point-max) nil t t)) ;; A quit during sit-for normally only interrupts the sit-for, ;; but since minibuffer-message is used at the end of a command, --=-=-=--