From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: BIKESHED: completion faces Date: Fri, 8 Nov 2019 15:09:31 +0000 Message-ID: References: <87zhhaxalt.fsf@gmail.com> <83bltpgffr.fsf@gnu.org> <83tv7gg9oz.fsf@gnu.org> <83r22kg8pa.fsf@gnu.org> <20191106205133.njij3ve7qqy7yh3q@Ergus> <83ftizg4nr.fsf@gnu.org> <8336ezg2vm.fsf@gnu.org> <83wocbelu1.fsf@gnu.org> <83imnvegcp.fsf@gnu.org> <83ftizeelw.fsf@gnu.org> <83bltne6oq.fsf@gnu.org> <87lfsrqs63.fsf@gmail.com> <838soqeuzr.fsf@gnu.org> <87ftiyn07t.fsf@gmail.com> <8336eycvpf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="72610"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Ergus , Dmitry Gutov , Stefan Monnier , emacs-devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 08 16:24:14 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 1iT67Q-000IiA-8g for ged-emacs-devel@m.gmane.org; Fri, 08 Nov 2019 16:24:12 +0100 Original-Received: from localhost ([::1]:56116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iT67O-00016T-UA for ged-emacs-devel@m.gmane.org; Fri, 08 Nov 2019 10:24:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47767) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iT5tV-0003lu-M5 for emacs-devel@gnu.org; Fri, 08 Nov 2019 10:09:51 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iT5tU-0002bH-0H for emacs-devel@gnu.org; Fri, 08 Nov 2019 10:09:49 -0500 Original-Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]:35068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iT5tR-0002a3-6R; Fri, 08 Nov 2019 10:09:45 -0500 Original-Received: by mail-il1-x133.google.com with SMTP id z12so5426007ilp.2; Fri, 08 Nov 2019 07:09:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=au9x9Ie1oeWZ9CxYaPTIUbDvgpVURM+fHOCkABJ/4Zc=; b=LrRjw45O/mYVKZVgdrsH/e3gchWy8342qX1ttI1VmWx+h/9bHuucRfjVne2+DEz2Le z8LblMeJET6mh4P+HLG4KwXL6DwRGUSRPJeHn5v+LVL4Q0giEHTsNFI+jbpyHnxUrBzV sClTYNGbFSQycadWDltiyJpk+s0lfk9PDOlTBhxD5/KnbRVyuMJgdnLqPTU3+43crWMv P295QaH8PsWHonUAJnk9I4rmsEumBeoe6eKDywh52Jj+r20GWZWAaQ6egsoSLLR2wfz5 TpMyc45idFs4UER17hg+6pWlvz61GHrf2NPfdVlXi1uYs4wiThi9DoGhgiKdm07N8FdJ 9sBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=au9x9Ie1oeWZ9CxYaPTIUbDvgpVURM+fHOCkABJ/4Zc=; b=UcyxoIswYdzcGDJofXCzkSWfwmD2Yl+RY4gBJSKMS+LMUO4Qs7esSfWhTYLjU/1Ulr UYyON6x/MVvQg/KlW1ar5E+7M4pCRQN9lmiq6vJT1hKoZ2VVRJQFHqub+Gj1ljA+/NMp XvYNHMLG2PUA+sgZA0BMV0pT/4P/WY6K+Xm25nOGlF7z6qDXRx9jZdbMtZ53womPdkpS mXmaH9bQnUfmtZn5z8Gc08BoUS/VxqcJzGOtPXkXG87o1iI8xkov9wsUde91CtNwRa05 G3msNVT2BqkquKTvYNIgfUo5CjjsCCXuvtatDaCRlnqL1msIiHmDDKNn8MOcXQftaDc2 Tn2A== X-Gm-Message-State: APjAAAVncpMVF5tju6iV8/2/ja97L4F7q5T4OtIVLLykXAma8RH552NM CbbLSGlymflaoukr2LMCAgTJA37cK7i9svRlWdHJWTWZY9g= X-Google-Smtp-Source: APXvYqy8C3f4nk9ZEVrGGBYx9NjisJ+tiG/351285lgdvfu/nATqCM4ywUQQ56RwKn+HKWsFHXwUFdCQVssVKK4fg2I= X-Received: by 2002:a92:868f:: with SMTP id l15mr4117770ilh.199.1573225783648; Fri, 08 Nov 2019 07:09:43 -0800 (PST) In-Reply-To: <8336eycvpf.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::133 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:241984 Archived-At: On Fri, Nov 8, 2019 at 2:02 PM Eli Zaretskii wrote: > > > From: Jo=C3=A3o T=C3=A1vora > > Cc: spacibba@aol.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, > > dgutov@yandex.ru > > Date: Fri, 08 Nov 2019 10:15:02 +0000 > > > > It's pretty simple. In that mail I made three statements, you objected > > to the second, which lead me to think that you agree with the other > > two. > > I'm sorry for causing you to misunderstand what I was saying. > > > 1. Alias 'completions-first-difference' to 'completion-emphasis' > > 2. Alias 'completions-common-part' to 'completion-secondary-emphasis' > > 3. Make 'flex' use only completion-emphasis to highlight the > > pattern in the candidates. > > We are miscommunicating. These faces aren't flex-specific, and I was > talking about their names in the context of any completion style, > including, but not limited to flex. I know that. Therefore I chose the names to work in any context, so they aren't specific to 'flex', nor specific to 'basic' or 'p-c-m' or any other style. > In any case, I consider both completion-emphasis and > completion-secondary-emphasis to be sub-optimal names, because they > say nothing at all regarding what is being emphasized. Because, in my opinion, if they are to be useful across different styles, their names shouldn't make the commitment to say exactly the thing they highlight. Their names should rather state "I am the face for whatever the completion style believes is visually relevant" and "I am the face for whatever ... is visually relevant at a secondary level". > > >> fabrobazor > > >> ^ ^ ^ > > >> `---`---`----- I want these bold by default in the future > > >> > > >> no change to the 'basic/prefix' completion. > > > > > > I understand that you want to highlight both f, o, o, and r, but the > > > latter with a different face. If my understanding is incorrect, > > > > It is incorrect indeed: 'r' is should have the same face as 'a' or 'b'. > > Did I say that _only_ r will be highlighted with that face? I don' think so. I think you can read what you said above. I confirmed your sentence "if my understanding is incorrect". Because I _don't_ intend flex to "highlight" r at all, or 'a' or any other charact= er except 'f', 'o' and ' o'. So these characters ('a','b','r' and 'z' in this example) should, for now, have the same face, 'default'. We can think about the value of highlighting other neighboring characters later. > I'm okay with highlighting a and b as well in this example, provided > that typing "faoo" will include "fabrobazor" in the results. It will indeed include that in the results. But in that your example only 4 characters should be highlighted: f, a (the first one),o, and o . So no 'b'. > However, please note that r is somewhat different from a and b, > because to type r I don't need to move point, I need just to type the > letter, whereas the other two require me to use cursor motion commands > first. Not sure if this difference is significant enough to justify > yet another face (and another round of bikeshedding). Exactly, I don't think so. Not at this moment. But your concern could be addressed. > > > then what will the other face be used for? > > > > Nothing. I don't (yet) see 'flex' as needing secondary kinds of > > emphasis. > > What about styles other than flex? They keep using it for whatever they think is secondary. 'basic', for one, will keep using it for the prefix substring in each candidate. > That would mean this face is used inconsistently: in basic and other > similar styles it highlights the character(s) that narrow(s) the > selection of candidates, while in flex they will highlight the > characters already typed by the user. Is that correct? Yes it is, but "this face" would now be called "completion-emphasis" , not "completion-narrower" or "completion-already-typed" or "completion-first-difference". That's why the renames are important. > If so, I object to this inconsistency. OK. It's good to finally clear that up. But when I talked about this topic ealier in the thread you replied this. https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00176.html JT> However some people have made a point that there should be JT> some kind of consistency at this level between completion styles, that JT> the thing emphasized in 'prefix/basic' should have some semantic JT>relation to the thing emphasized thing for 'flex' and 'substring' too. EZ > Sorry, but I see no reason for any kind of "consistency" here. We EZ> need to highlight to help the user specify the right completion EZ> candidate, all the rest is secondary IMO. Maybe you weren't understanding my proposal completely back then, but in any case your "then-reply" is exactly, verbatim, word for word, what I would say to you in this situation. Take care, Jo=C3=A3o