From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#45260: 28.0.50; Maybe flex should only sort when there is no sorting metadata? Date: Tue, 17 Aug 2021 17:58:00 +0100 Message-ID: <87pmucuhyf.fsf@gmail.com> References: <86a6uehpod.fsf@matem.unam.mx> <87v944wdxu.fsf@gmail.com> <847fabdb-8b06-dd0f-b2ad-6c71d2f5c3cd@yandex.ru> <8735r8852c.fsf@matem.unam.mx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15204"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 45260@debbugs.gnu.org, Dmitry Gutov To: Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 17 18:59:09 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 1mG2Qf-0003lk-Aa for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Aug 2021 18:59:09 +0200 Original-Received: from localhost ([::1]:34624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mG2Qe-0003XE-Dh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 17 Aug 2021 12:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mG2QY-0003Ww-TH for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 12:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mG2QY-0004Ba-N7 for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 12:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mG2QY-0004Jw-CD for bug-gnu-emacs@gnu.org; Tue, 17 Aug 2021 12:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Aug 2021 16:59:02 +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.162921949116539 (code B ref 45260); Tue, 17 Aug 2021 16:59:02 +0000 Original-Received: (at 45260) by debbugs.gnu.org; 17 Aug 2021 16:58:11 +0000 Original-Received: from localhost ([127.0.0.1]:53969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2Pi-0004Ig-N0 for submit@debbugs.gnu.org; Tue, 17 Aug 2021 12:58:10 -0400 Original-Received: from mail-wr1-f54.google.com ([209.85.221.54]:36427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mG2Ph-0004IR-05 for 45260@debbugs.gnu.org; Tue, 17 Aug 2021 12:58:09 -0400 Original-Received: by mail-wr1-f54.google.com with SMTP id k8so10676130wrn.3 for <45260@debbugs.gnu.org>; Tue, 17 Aug 2021 09:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=xft/gUrHUyNdqf2WjLkGhhRCh/y0TknFaDC80mGsJRo=; b=L+mMGefCuVqndJ9axHqjWIRUydZPdgtkeXIuTcilyvNCGufD6nOGbbi5Z0VccUPecC 3eoAouchKfjJ+Xye3oYseJ5BV+OhPsPJP/f9JTHKZ0bcb0ysaoAEnq0+lMJ1SK6nLETY Pxe/RQ+NZKE2Ly04QGReJCdQKy/2n5XFeRvorHzi25oni1h/YlUnAOO6AJXRSPwPu/M/ g3k2mKUEG7IizBAg+zJG0Ya7Xr5jfESarq3VGLJyF0xLMTPK870tWpWx2r+aFK8zRaPv 8Jxd7f+tdm+DxDVfaLJlYp0f5IGKJpw17Ibm065MmSiyR3JSnqdTpnrcc2lnz8fj+LG6 LUNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=xft/gUrHUyNdqf2WjLkGhhRCh/y0TknFaDC80mGsJRo=; b=TYPWRlQqsIKFibIDZo8Tanz3CjZ0p8KIps8AGEbnGmmWksHeDRVgVVoSO+/CNrIIAa HWKhaJdoKxlXQxIzqUPX3k8PKKAIi2Eyj8Ks9GvNOKkJN8NhLOg9W6RJzOJdyc0EYowy +ID9prDYq3HHPiih7/P34lkMhGeOtoTlZT4wkHxCXSAhZU8JqTPI/XFG/zOLU+Ngiw1i aKSTgSEXjn9AloGf60r9M9ZaCHkN4O3yHe0e4JPoAm95YaKrVJxLmNGvrDv8wDacHnsS +Rn25mJF/NW0Mu78Yf/qVY+KIZOvM9gRD8enVLYnAxdzof+r3pAp8iGydHM2oMwfiUXJ O19w== X-Gm-Message-State: AOAM533QMoe8NpJyLKUADAY7qYP9Sux7awRzeqEnZmUjLrjBRd/VnNI6 kjl7TU/YryOVxU8wSSHElysKTO7INZ8= X-Google-Smtp-Source: ABdhPJxAHwZk5Yoj6cKoienYRo01Ri2L+b6VOAlTH9hKeRPqpTfZqawfgY75+A+4+IxRl5gKbs56Tg== X-Received: by 2002:adf:e7d1:: with SMTP id e17mr5427205wrn.151.1629219482574; Tue, 17 Aug 2021 09:58:02 -0700 (PDT) Original-Received: from krug (a94-133-27-132.cpe.netcabo.pt. [94.133.27.132]) by smtp.gmail.com with ESMTPSA id o125sm2811106wme.15.2021.08.17.09.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Aug 2021 09:58:02 -0700 (PDT) In-Reply-To: <8735r8852c.fsf@matem.unam.mx> ("Omar =?UTF-8?Q?Antol=C3=ADn?= Camarena"'s message of "Tue, 17 Aug 2021 10:27:23 -0500") 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:212096 Archived-At: Omar Antol=C3=ADn Camarena writes: >> I've not seen an example of a table where its original sorting >> mattered more _when_ there is some search pattern. > I'd argue the case I mentioned in the bug report is a good example. That > was the case of the consult-line command from Daniel Mendler's consult > package. I don't know consult. Is it a completion table? For what? > icomplete-mode (preferably icomplete-vertical-mode since these > candidates are full lines!), it is jarring that flex jumbles the line > order. I see. A table where the candidates are the lines of a file. Well, not jarring the way I look at flex, not the way _I_ use it. My personal expectation is to bubble up the tightest matches to the top. If you're interested where I picked up the idea, it's from many years of Common Lisp programming with lots (close to a million IIRC) of named symbols. Anyway, sounds like a job for a flex-sort-but-only-sometimes completion style. Or a flex sorting algorithm with another formula that produces more ties. Then, in a file with these 5 lines: 1: fabricate organic ornitopters 2: bar 3: and also using fooey 4: baz 5: using foo With the pattern "foo", my personal expectation, and the way flex works right now IINM, is to see 5, 3, 1. Do you prefer to see 3, 5, 1? Or keep 1, 3, 5 as presumably the table stipulates? Or something else? Probably your decision in a new 'omar style. Jo=C3=A3o