From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico Date: Sat, 10 Apr 2021 17:40:05 +0300 Message-ID: <9b76beed-13f8-18e4-1d14-4dc0a04d4ab6@yandex.ru> References: <9c9af088-580f-9fb1-4d79-237a74ce605c@inventati.org> <874kgkxxs0.fsf@posteo.net> <78741fe6-2612-d7c9-2bc4-0b68ea7fa51a@yandex.ru> <76a4d0e2-117b-165d-d56e-5bc2f504b50c@yandex.ru> <87blapln0r.fsf@posteo.net> <37bd2e96-ce04-eb6d-24da-fdd7ea427e61@yandex.ru> <87im4wx2ct.fsf@posteo.net> <83ft0080hi.fsf@gnu.org> <16784f40-b959-9a84-65d4-93b71d1bebec@yandex.ru> <83blam7gzh.fsf@gnu.org> 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="1912"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 Cc: philipk@posteo.net, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 10 16:41:31 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lVEni-0000Or-JM for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 16:41:30 +0200 Original-Received: from localhost ([::1]:52052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVEnh-00074u-JU for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 10:41:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVEmR-0006Kg-WC for emacs-devel@gnu.org; Sat, 10 Apr 2021 10:40:12 -0400 Original-Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:41953) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVEmP-0005Qb-AD; Sat, 10 Apr 2021 10:40:10 -0400 Original-Received: by mail-ej1-x631.google.com with SMTP id g17so10309309ejp.8; Sat, 10 Apr 2021 07:40:08 -0700 (PDT) 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=FDr4KAdNbq56OwD0SWE40WU8Y5kk+olxYhQ1jWvnyVg=; b=gEDd1hbUIapHpPg7W4T72m3PNz59molc85REqLbC3bKW8qvofvi5ZYzE1o6LRzhwXy xGnCKhOUYgvQMDa2T9i/gW4u5kOYd05Ffx+0xldDSI1bvDZE2lNuYWBMCFCepTX7SUV0 HY8lhpKbmcfFvVuhczT8wE6S0eF78P3m+B9FT+44BM37H8aZzXF1XzrWj89qCy6k7rHK wdC5W7Fs7RFcwrpOTYYZihNdC9yy9Iufyqsk5sWUEvN3Vu9oEl+9jWsJBXlDwepPxmR7 ap0i3YM/QKqGX8VddL5Yn1kfaxxlN0y/KyylkdPY9TYmTYzq30Ry0BJcCTcyi6/O3hxJ rd6Q== 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=FDr4KAdNbq56OwD0SWE40WU8Y5kk+olxYhQ1jWvnyVg=; b=K07ZMm6FHtZR9y2ONp3aCknR3zByq+FgGXmzf0eNxUZukAz/bvLScJcZ5m41xh+dh9 RtG7NSAUUNJ8wIC3F3a3k3heQF2T9QKamq59ziM9CNVPVS8GD8fnw6/f8hXcRFvRo7yo Bevc/2jh3pNDV4+IioEwsd3yhza/sqntMUfuTVz7OB9FH6Z1JE+58oENgdg175fziyDw K9J6A77pDQbRg4QgdiZSaKNMTeaMXduHtBfCFDqaFQFuphGI00ntUXwnA7e/pMXX5qfg ZuDwNDdlHtrlafTbbl5Q2kIQJcgbWLx/aAeOOaeD7m4qqhGanHQaBNMkbBYVC9k52DqW P6kA== X-Gm-Message-State: AOAM530ajA62x8OgRd1/8OqgvdYejDUHs/6nTzeHynrL3zPayqwYOjE4 3yh4gokchyQUL6eVXXzI2n2rM+Cxm2c= X-Google-Smtp-Source: ABdhPJx9FJBRYkjTK72ik/zz5mmP1vNpNS0cKO3xa5cuGtQVsTbKbwhxIXy3p5uKniCpmdtwOsTw+w== X-Received: by 2002:a17:906:5f90:: with SMTP id a16mr3560784eju.38.1618065607614; Sat, 10 Apr 2021 07:40:07 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id q20sm2727541ejs.41.2021.04.10.07.40.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 10 Apr 2021 07:40:07 -0700 (PDT) In-Reply-To: <83blam7gzh.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=raaahh@gmail.com; helo=mail-ej1-x631.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267827 Archived-At: On 10.04.2021 10:09, Eli Zaretskii wrote: > I think our interpretation of "completion vs selection" are different, > at least to some extent. For me, completion is for when you (almost) > know what you want to type, and type enough of it to have a single TAB > more or less do the rest of the job. IOW, it's a typing-saving tool. > Selection is for when you don't know what to type, and need the full > list to choose from. IOW, it's a discovery tool. I don't think we disagree too much, it's just there are cases where "completion" (as defined by you) is really inconvenient: you both don't know what you want to type, and the options are hard to type as well. But there are also cases (IME) when you don't necessarily know what to type, but you want to continue typing. That is the scenario of an average (or, perhaps, a beginner) Java developer typing in a IDE: when you don't remember the method name, you try to guess by typing a relevant word, see what names match, and often enough get it right. > With that in mind, completion for symbols in invoking M-. and > completion for file names in invoking some file-related command have > the same traits, at least for me. I don't always know what file name I want to type either, and either guess by typing a part of the word and pressing TAB. Or type multiple relevant words at once, if the completion UI allows it (that's very helpful for choosing a project-relative file name in project-find-file). > Where selection is needed, we pop > up the XREF buffer at the end. This default operation makes sense to > me. The problem with it is the user can end up in two different states: either having jumped to the target location (if there is just one), or having a list of all matching locations displayed. And then do extra work to get where they wanted to go. Whereas we want (I think) the process to always end up at the location which the user intended to get to. > By contrast, using xref-show-definitions-completing-read, I'm > asked to choose twice: first in a "normal" completion context, then > again in a strange way (it says "Choose" without showing me anything > to choose from, and I need to type TAB to see a *Completions* buffer). ^ this is the most puzzling aspect of it indeed, as we've mentioned here. > I guess to each their own, but the latter method strikes me as weird > and inconvenient. What I'm saying is the process is handicapped by the limitations of the default completion UI. With Ivy (which I use only for 3 commands), the process becomes much more obvious and faster. Wish you could try it. And it's not something I invented: a user contributed the first version of xref-show-definitions-completing-read, which we then tweaked for efficiency, and it turned out to result in a very sensible workflow. Not with the default completing-read, though. > IMO, its place is in Company-style "completion" > when writing code -- there one would like to see the list of > pertinents alternatives to select from without typing anything, not > when the user invokes a command and needs help in typing as few > characters as possible. Not 100% sure I understand, but if you meant the second step could use Company-style completion (which can also work as selection-type UI), then we're in agreement. But Company is just as useful in "needs help in typing as few characters as possible" kind of scenarios.