unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: "Omar Antolín Camarena" <omar@matem.unam.mx>
Cc: 45260@debbugs.gnu.org, Dmitry Gutov <dgutov@yandex.ru>
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	[thread overview]
Message-ID: <87pmucuhyf.fsf@gmail.com> (raw)
In-Reply-To: <8735r8852c.fsf@matem.unam.mx> ("Omar Antolín Camarena"'s message of "Tue, 17 Aug 2021 10:27:23 -0500")

Omar Antolín Camarena <omar@matem.unam.mx> 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ão





  reply	other threads:[~2021-08-17 16:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 18:47 bug#45260: 28.0.50; Maybe flex should only sort when there is no sorting metadata? Omar Antolín Camarena
2021-08-17 10:41 ` João Távora
2021-08-17 12:42   ` Dmitry Gutov
2021-08-17 14:05     ` João Távora
2021-08-17 14:49       ` Dmitry Gutov
2021-08-17 15:27         ` Omar Antolín Camarena
2021-08-17 16:58           ` João Távora [this message]
2021-08-17 16:38         ` João Távora
2021-09-27 23:11           ` Dmitry Gutov
2021-09-27 23:25             ` João Távora
2021-09-27 23:40               ` Dmitry Gutov
2021-09-28  0:36                 ` João Távora
2021-09-28  0:39                   ` João Távora
2021-09-28 12:38                   ` Dmitry Gutov
2021-09-28 16:09                     ` João Távora
2021-09-28 16:30                       ` Dmitry Gutov
2021-09-28 22:17                         ` João Távora

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pmucuhyf.fsf@gmail.com \
    --to=joaotavora@gmail.com \
    --cc=45260@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=omar@matem.unam.mx \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).