From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Clemens Newsgroups: gmane.emacs.bugs Subject: bug#45780: 28.0.50; [PATCH] Face used for affixation function annotations Date: Thu, 14 Jan 2021 18:21:00 +0100 Message-ID: <4779a90d-a475-0490-7de2-de072efe64f5@posteo.net> References: <9b1409af-58b9-3a62-4162-343fd25293ca@posteo.net> <87ft378gjk.fsf@mail.linkov.net> <8735z6xx11.fsf@mail.linkov.net> <7763f3e7-475c-9adb-ce62-7801faf47a90@posteo.net> <875z3z50if.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39621"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 45780@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 14 18:37:41 2021 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 1l06Z3-000ACa-0O for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 18:37:41 +0100 Original-Received: from localhost ([::1]:58454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l06Z2-0002Hl-0U for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jan 2021 12:37:40 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l06Ju-0002MY-Op for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 12:22:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55777) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l06Ju-0005VK-42 for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 12:22:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l06Jt-0007IO-Vv for bug-gnu-emacs@gnu.org; Thu, 14 Jan 2021 12:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Clemens Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jan 2021 17:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45780 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 45780-submit@debbugs.gnu.org id=B45780.161064487327990 (code B ref 45780); Thu, 14 Jan 2021 17:22:01 +0000 Original-Received: (at 45780) by debbugs.gnu.org; 14 Jan 2021 17:21:13 +0000 Original-Received: from localhost ([127.0.0.1]:39090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l06J7-0007HO-Fm for submit@debbugs.gnu.org; Thu, 14 Jan 2021 12:21:13 -0500 Original-Received: from mout01.posteo.de ([185.67.36.65]:54421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l06J2-0007H7-6h for 45780@debbugs.gnu.org; Thu, 14 Jan 2021 12:21:12 -0500 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 989A9160062 for <45780@debbugs.gnu.org>; Thu, 14 Jan 2021 18:21:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1610644861; bh=awBA0syZAEtybf7jQBs5iEcGj1N61GJ8ecV1PFeIhgo=; h=Subject:To:Cc:From:Date:From; b=G8CCAgrARDEhihgeviLPAs8zoLY17DUqBrra70YjByv6oOZOltymdayqhgrBZOrkd 4+WqTtMyKgJTOgHQ9B8RJzoLGbsXz/Z+TFTALLpWsyFganI59TxDJLEchfWLJzBQmE qYM4DDQZyn8SzU9S36N1QU2d07kfbsN53mvwOJYadP0Cb+UlviYsOsMYoDkHPp4Afe IipjcW7PKsZDVxcdyabh+q7ngeBKg+8vkbmNbBflYAPjiLVsJkLATtSPDYLq/T2D0z lsp7AXG9zdsZbeEAJbWYZIQ75M2uCOnBaUJhyKY4oAQo5Ale8Hw+QEYxd1k5gHbgbU /Iajdi+GHko3w== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4DGrgc6tBQz6tmL; Thu, 14 Jan 2021 18:21:00 +0100 (CET) In-Reply-To: <875z3z50if.fsf@mail.linkov.net> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:197954 Archived-At: > Do you want to use the completion-annotations face conditionally only > for annotations, i.e. when only the suffix is provided by the client? > Because when a prefix is provided as well, then it's not an annotation > anymore, so the completion-annotations face is not applicable to prefixes. I see, personally I think of all strings besides the completions themselves as annotations ;) Makes sense to do it only for the suffix then. > Doing this is not something new, we already have the same logic > in minibuffer-message: > > (unless (or (null minibuffer-message-properties) > ;; Don't overwrite the face properties the caller has set > (text-properties-at 0 message)) > (setq message (apply #'propertize message minibuffer-message-properties))) > > Is this logic suitable for completion-annotations? I guess this could also be used, the version I posted earlier only checks for the face property and then also check the whole string: (if (text-property-not-all 0 (length str) 'face nil str) str (propertize str 'face face)) When only the face matters my proposed version might be better?