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.bugs Subject: bug#45260: 28.0.50; Maybe flex should only sort when there is no sorting metadata? Date: Tue, 28 Sep 2021 19:30:49 +0300 Message-ID: References: <86a6uehpod.fsf@matem.unam.mx> <87v944wdxu.fsf@gmail.com> <847fabdb-8b06-dd0f-b2ad-6c71d2f5c3cd@yandex.ru> <87v944uiv5.fsf@gmail.com> <87lf3hr0x5.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6020"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 Cc: 45260@debbugs.gnu.org, Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 28 18:31:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mVG0g-0001Og-DZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 18:31:14 +0200 Original-Received: from localhost ([::1]:50454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVG0f-0006qG-Bt for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Sep 2021 12:31:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVG0U-0006oI-Cj for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 12:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35264) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVG0T-00021T-Ur for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 12:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVG0T-0005kC-QU for bug-gnu-emacs@gnu.org; Tue, 28 Sep 2021 12:31:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Sep 2021 16:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45260 X-GNU-PR-Package: emacs Original-Received: via spool by 45260-submit@debbugs.gnu.org id=B45260.163284666022069 (code B ref 45260); Tue, 28 Sep 2021 16:31:01 +0000 Original-Received: (at 45260) by debbugs.gnu.org; 28 Sep 2021 16:31:00 +0000 Original-Received: from localhost ([127.0.0.1]:46810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVG0S-0005jr-9Z for submit@debbugs.gnu.org; Tue, 28 Sep 2021 12:31:00 -0400 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:42666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVG0P-0005jd-Vp for 45260@debbugs.gnu.org; Tue, 28 Sep 2021 12:30:58 -0400 Original-Received: by mail-wm1-f45.google.com with SMTP id q127-20020a1ca785000000b0030cb71ea4d1so3194671wme.1 for <45260@debbugs.gnu.org>; Tue, 28 Sep 2021 09:30:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XBOvHueWhmv0Wn/imsLXwbBTxjFdz0qx8DFmSCGLx9M=; b=pjwtQofXBC1HmRlAJWCB9b7EMsD8l123nt50araaMHdfxttLZmXqSGRbryHFeQ+GT2 07v6wOM+HW28DibJL91lirIgwI6e9HuZ7yXcK9h5Iglzpdevk2J/C4QnZLzaacUe9BL2 67hb4t9xdSU2yML9WzgZH0laOuHX9Vym5N/Y4+MkLQL+rn38YvsdoMRuwbWJ6bIgEVX+ gzXjs6ZMnh+P0zS4ufxj/FvJEqTnv1TtCAOpWdCK8JPnvy6iJjOHiQUGIe3P7X1lK4Cq BNTHb8mCdo9uKDQ9iHidOp6hNvB1yC1qkp3VK67ruFBPY3qrLLORqDFaaJlkoGq2MZqK U3vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=XBOvHueWhmv0Wn/imsLXwbBTxjFdz0qx8DFmSCGLx9M=; b=CcNut29+He4qbGlUygnU9y1lnKKTSv8LW8SBDGfFSrazU3r/l8gsnc+C9DFcj8semo ifHP7hguf/u0yer/hXUMDSI16w2+ufWDuDv0ywgnyxJH2DtO2URvWx9LdNkaQm2s7QQ9 7lD/F1mFTSHyGS94cG+bu3/W1/FR1ramG/0Ra+YzeN4Hf7DH+KQUhUaaoDQHeTariT6R B90bjHD9pvs8YfzdgQE78vveAioBdZbFVg3EmV1zYfzz2SQhkgvVw4GvnHx5WEOT0B/V nJteGfq9bS4AZTai0A8zyTOe4AbcgQqZU8t+Wpx+BSi7yyND5ZZTNk7ijHdDmNZ8TwTS VPvw== X-Gm-Message-State: AOAM530a/cDFQJBNREQsG+QpWnw5dtqw+r5P0i6ryur1Dxo6PtweopsC /zOUO8ZiH4n5cNA/9K8KF7MQ+YWwUDU= X-Google-Smtp-Source: ABdhPJwxqaEcvhQGI6Sj3U2iZ8DPr71a56A0JNaHiXQaEAwh7fPyKHoNst0SqOvHqzetbD9ooACE2A== X-Received: by 2002:a1c:f703:: with SMTP id v3mr5483310wmh.177.1632846652239; Tue, 28 Sep 2021 09:30:52 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id o7sm25251859wro.45.2021.09.28.09.30.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Sep 2021 09:30:51 -0700 (PDT) In-Reply-To: Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215781 Archived-At: On 28.09.2021 19:09, João Távora wrote: > On Tue, Sep 28, 2021 at 1:38 PM Dmitry Gutov wrote: > >> So the references to company-capf in that discussion are necessary, but >> incidental. > > So it should be possible to describe the problem in simpler terms. Which > is what I'm asking you to do. In the simplest terms _possible_ of course. I have already done this here. Twice, I think? And more, if we count the underlying technical issue that is the headline of this report. > It's not about the beginner developer here, it's about the user. The user-developer line is fairly blurred in this particular case. > The beginner developer of the c-a-p-f API has to do more work than the user to understand what the purpose is of the things > she is invoking. If she invokes 'flex' in some program, she must > be aware of what she's doing, of how 'flex' works. That seems optimistic. Especially since 'flex' is a rare exception among other completion styles, in that it affects sorting (through an opaque mechanism), and not just filtering. >> But would it? Break existing behavior in any scenario that matters? > > See my reply to Omar. Omar brought in a scenario of something the user does, starting with the UI, and the full use case. You responded with an abstract piece of behavior. In your scenario, which UI is the user going through? What completion table would they be querying? How much effort would it be for such UI to switch to a completion table that doesn't specify the sorting function, so that 'flex' still applies its sorting, to the satisfaction of your hypothetical user, while now satisfying Omar's user as well? >>> What is the problem with you telling those users to use 'pikachu' >>> instead of 'flex'? Or tell them to set a hypothetical variable >>> flex-prefer-table-sorting to t? >> >> Discovery. > > So you're talking about changing defaults. But flex is not even the default, > so I don't understand. Why are people using it if they're not content with > what it does? > > Do a 'flix' style, as I've suggested multiple times! Look, if you're right and > it represents much less friction it should rapidly become popular and your > burdens will be solved. It probably take few lines of code. I didn't do 'flex' and I don't do 'flix'. I'm not the person/place/piece-of-software people come to for completions styles. I have to deal with existing styles. Even if just one of them has a problem, that can bring a question or a bug report on my doorstep. Furthermore, 'flex' being in the core implicitly gives it a strong recommendation over alternatives. >>> I also suggest that people: "if you're writing a completion table, make >>> sure you try it without company as well". >> Not something I'm eager to recommend to somebody just starting out. It >> wouldn't help here either, I believe. > > So you decide that it's a good idea for a beginner to mix company internals > into her adventures.... Questionable, I'd say. See the thread.