From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: BIKESHED: completion faces Date: Tue, 05 Nov 2019 10:44:29 -0500 Message-ID: References: <4c5631d4-9dfd-04c6-c573-b83c67fcc2fa@yandex.ru> <87pni7p83l.fsf@gmail.com> <87h83ipoi0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/x-markdown; charset=UTF-8 Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="67713"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: =?windows-1252?B?Sm/jbyBU4XZvcmE=?= , emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 05 16:49:52 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 1iS15Y-000HND-Jn for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 16:49:48 +0100 Original-Received: from localhost ([::1]:45434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS15W-0000YA-Q9 for ged-emacs-devel@m.gmane.org; Tue, 05 Nov 2019 10:49:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42478) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS10W-0004tt-Ts for emacs-devel@gnu.org; Tue, 05 Nov 2019 10:44:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iS10V-0002vY-En for emacs-devel@gnu.org; Tue, 05 Nov 2019 10:44:36 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58770) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iS10V-0002tz-83 for emacs-devel@gnu.org; Tue, 05 Nov 2019 10:44:35 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 737D281231; Tue, 5 Nov 2019 10:44:32 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 239D2820A6; Tue, 5 Nov 2019 10:44:31 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1572968671; bh=5HP4L5SDbe870UnodNjWtiBZotFPNJsZD/91ikQ0oNw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GtKKNoAErwXfhh8AmjR8BDnMTk55NEDlLs6NisplptQFtLI3XEl6emlM2D3kk21fA 1DXBSZoWtDMoS/RtHFZ5q274PjI4xacv+WESCeQyDWby2K8+VAeCCeCJC0BU+4mhMg OM6YDen3gMnUfo/6EsB2djHv+tlk8JMdqbAr6dRhFl5AoDVQR7BVz1npU9aMCQhJ8X OTxjCIgmzs9ZEzPVxGI2+LrOxk/wJm19Rsjc+Zd0iM3JKNeVpbyupn2JlGY1ngGm8c KdRiWDMEFviPubpMgkdwQayLFexDfZi/analJvGKJJFmkNhDjC6sdyIXhIg1I3T/8Q htGBBs1iT+xNA== Original-Received: from pastel (unknown [216.154.47.134]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D2CB112089C; Tue, 5 Nov 2019 10:44:30 -0500 (EST) In-Reply-To: (Dmitry Gutov's message of "Tue, 5 Nov 2019 16:57:29 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 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:241806 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? Stefan PS: I think the approach used in your patch will lead to undesirable behavior when some matches (but not all) have all chars before first-diff highlighted with common-part. E.g. 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".