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.devel Subject: Re: BIKESHED: completion faces Date: Tue, 05 Nov 2019 23:27:06 +0200 Organization: LINKOV.NET Message-ID: <87d0e6hv4l.fsf@mail.linkov.net> References: <4c5631d4-9dfd-04c6-c573-b83c67fcc2fa@yandex.ru> <87pni7p83l.fsf@gmail.com> <87h83ipoi0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="16616"; 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: emacs-devel@gnu.org, =?iso-8859-1?Q?Jo=E3o_T=E1vora?= , Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 05 22:49:18 2019 Return-path: Envelope-to: ged-emacs-devel@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 1iS6hO-00043O-Ea for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 22:49:15 +0100 Original-Received: from localhost ([::1]:50630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS6hL-0001A8-A3 for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 16:49:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44930) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS6Z9-0003Mm-UD for emacs-devel@gnu.org; Tue, 05 Nov 2019 16:40:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iS6Z8-0007YW-Ge for emacs-devel@gnu.org; Tue, 05 Nov 2019 16:40:43 -0500 Original-Received: from egyptian.birch.relay.mailchannels.net ([23.83.209.56]:15418) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iS6Z8-0007Tm-3L for emacs-devel@gnu.org; Tue, 05 Nov 2019 16:40:42 -0500 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 CCF88E1051; Tue, 5 Nov 2019 21:40:39 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a54.g.dreamhost.com (100-96-45-192.trex.outbound.svc.cluster.local [100.96.45.192]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 639EBE10CE; Tue, 5 Nov 2019 21:40:39 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a54.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.18.5); Tue, 05 Nov 2019 21:40:39 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Lonely-Obese: 7d1042621f984ac5_1572990039646_1525982625 X-MC-Loop-Signature: 1572990039646:1456627958 X-MC-Ingress-Time: 1572990039645 Original-Received: from pdx1-sub0-mail-a54.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a54.g.dreamhost.com (Postfix) with ESMTP id 941087F5CE; Tue, 5 Nov 2019 13:40:35 -0800 (PST) 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=GbfGADOFvP3ufklpczz/mcs3To4=; b= Hp4APD1yP+wUtQQHSBWWEI5lGIf6db70l8V/D3lNgjjC/NTE/cAFi52EOAGFI16g hpQH1D1qM5AeZODsF3dSZBj9qxlQsaL5F8PCPUeNAgFXg6IZLep7pI3PCkufwbwq v+kJOSSoOEsMMSa/TANc1z70e1BvW7p+b436jKJuwD0= Original-Received: from mail.jurta.org (m91-129-101-77.cust.tele2.ee [91.129.101.77]) (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-a54.g.dreamhost.com (Postfix) with ESMTPSA id 0B9F67F60B; Tue, 5 Nov 2019 13:40:32 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a54 In-Reply-To: (Stefan Monnier's message of "Tue, 05 Nov 2019 10:44:29 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.56 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:241819 Archived-At: >> I've tried to implement my idea, but somehow the added highlighting gets >> eaten before the buffer is displayed. But the attached patch should >> illustrate it anyway. > > Regardless of how we implement this, the question remains: do we want to > highlight the common-part of the prefix/basic completion differently > from the other cases? It seems inevitable to have a different set of faces for different completion styles. So for the prefix/basic completion the default could be underline for completions-first-difference (like in menus) and inheriting completions-common-part from the 'shadow' face to make the trivial part less prominent. More complex completion styles could use bold for a new face to make non-trivial parts more prominent. > src/emacs -Q --eval '(setq completion-styles (quote (partial-completion)))' > M-x re-b ? > > where `re-builder` would be highlighted with a "trivial common part" > whereas `rename-buffer` would be highlighted differently. > > You might consider it as a feature, of course. But if not, then we'd > have to first look at all the completions to make sure they all have > a "trivial common part". This really looks like a feature - it could help the users to see the prefix in the completions list.