From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: BIKESHED: completion faces Date: Mon, 4 Nov 2019 18:30:47 +0200 Message-ID: References: <4c5631d4-9dfd-04c6-c573-b83c67fcc2fa@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="51248"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 04 17:31:17 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 1iRfG8-000DDm-QH for ged-emacs-devel@m.gmane.org; Mon, 04 Nov 2019 17:31:16 +0100 Original-Received: from localhost ([::1]:35078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRfG6-00030S-Po for ged-emacs-devel@m.gmane.org; Mon, 04 Nov 2019 11:31:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53124) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iRfFo-00030B-Pm for emacs-devel@gnu.org; Mon, 04 Nov 2019 11:30:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iRfFn-0001MT-Ll for emacs-devel@gnu.org; Mon, 04 Nov 2019 11:30:56 -0500 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]:37457) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iRfFm-0001LW-RP for emacs-devel@gnu.org; Mon, 04 Nov 2019 11:30:55 -0500 Original-Received: by mail-ed1-x52e.google.com with SMTP id k14so4769422eds.4 for ; Mon, 04 Nov 2019 08:30:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=7EoB2eaSlrTlXNe39aTEMse6HuNS5VcCpPwduNO4PpM=; b=qtDB7RdBi9+DZokGgvVjyIyeq0h8I20mx09sl8Sc4Ct4VnlSz5qvpNQNkPj62DyVA0 BYGET+TKgtZr7TEzHPtOxjhc5STkh5LaVlFLg0zoYfeVCUkXCsD53Dj0dk2lXmCjVnoU EAZaDH0G/B8n2oJKmA+mGb6cKTck68T2Oxu0VaG9pFyjhVH30slmCq15DVP2XgsBrE2s bDpRkszeyy41mTd8KLA1H/Zcj/lPphntzNaBjcqxkJuRtQZmSA4MPtTnpsBoyuqO13dL CWYYDFIliaDOdxhuM9OZfzyrOROytJCdrpjBBcYqsPyQWfnaSPuK1eZuGwU8NuY8S83/ xEFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7EoB2eaSlrTlXNe39aTEMse6HuNS5VcCpPwduNO4PpM=; b=Wjac/kIaetIdKOEyfd9ilE9l0QSg7udUNk/eI9OqUnES4RcAPzCWtjKYP9UgVyRDT2 eU7113CDABqyO4ssL0z3Z+bdeIFV4pZ/cVUQXVX8wwv5CDN11pzoSizDyUbCOKzBmODf QFxidxgzxFhKZqvCGOPVcPa7hox2RwSC9sO92pOk3R/h92RVw/fCpGXtlKh+B5s72ovq 0s79DRV51vYRpIT7DaYmCAmGXBGQWtGYvx3dx2WKuPi4hJ199HwVFio3uyax4nWbBALx bq/01Q7bGl+oC0lsSCDgpPtQEXFJ5UmltHFi9isQjJ9fWKQTkTAVFWiKVrnZlM9Ol79s 0ycQ== X-Gm-Message-State: APjAAAVT4pZgmPyi/Ox4wnbL14Pr8h3azjQsnyGFSKtYtiMo9BoTV45F tmXUFWBaZPlC1VmBDvflkdEw18grd28= X-Google-Smtp-Source: APXvYqy86Aj+CrFaP4UxMb3Hg/SHiqH5bfe53NMJBJ6MEvMtxVC/f1HAy+CH39xRL7vXDrqS/qoaew== X-Received: by 2002:a50:de06:: with SMTP id z6mr13133463edk.279.1572885051197; Mon, 04 Nov 2019 08:30:51 -0800 (PST) Original-Received: from [192.168.0.149] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id t17sm145153edv.96.2019.11.04.08.30.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Nov 2019 08:30:49 -0800 (PST) In-Reply-To: Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::52e 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:241782 Archived-At: On 04.11.2019 1:30, Stefan Monnier wrote: > Indeed, part of the issue is the difference between something like > `basic` and something like `flex`: in `basic` the > completions-common-part is not terribly interesting, whereas in `flex` > it's much more so. > > We could use different faces in those two cases, but I feel like it > would be better if we can find a default that works well in both cases. I concur. >> I'm more against using bold for the common part. Underline is >> less aggravating. > > Hmm... sadly, I find underlying the completions-common-part to be pretty > awful. So it looks like both bold and underline are out? > Should we look for colors (background? foreground?)? As suggested previously, a light-grey background might work. Or a dark foreground. IOW, either (set-face-foreground 'completions-common-part "blue3") or (set-face-background 'completions-common-part "white smoke") But neither seems optimal for prefix completion still. Some other ideas: - No nothing, on the reasoning that 'flex' is not in 'completion-styles' by default. And many users who would add it there would probably use it exclusively, and could thus customize their completions-common-part face to be more informative, to their satisfaction. This suggestion could be in the docs somewhere, maybe in the NEWS section that introduces 'flex'. - Define a new face that would be applied by callers of completion-all-completions to those completions where the equation "common part == the whole part of the string before the char highlighted by first-difference" doesn't hold true. So all uses of this face would be informative. Although some absences of it might stand out (where a flex match is a strict-prefix one). That face would have a distinct background or foreground. >>> M-x dovi C-b C-b ? >>> you'll see that `completions-first-difference` is applied to the "c" >>> of the "doc-view..." commands because that's the first character after >>> the position in the candidate that corresponds to the position of >>> point in the pattern. >> >> I'm having trouble reproducing this. Should I be using icomplete-mode? > > No, just `emacs -Q` and then `M-x dovi C-b C-b ?` OK, thank you. I see it now. Normally one would press TAB, not '?', though.