bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69709: `sort` interface improvement and universal ordering predicate


From: Eli Zaretskii
Subject: bug#69709: `sort` interface improvement and universal ordering predicate
Date: Fri, 29 Mar 2024 18:35:10 +0300

> From: Mattias Engdegård <mattias.engdegard@gmail.com>
> Date: Fri, 29 Mar 2024 16:02:01 +0100
> Cc: monnier@iro.umontreal.ca,
>  dmitry@gutov.dev,
>  69709@debbugs.gnu.org,
>  gerd.moellmann@gmail.com
> 
> 29 mars 2024 kl. 13.06 skrev Eli Zaretskii <eliz@gnu.org>:
> 
> > . The description of value< says "lexicographic order" about some
> >   types, but I think that is not clear enough, and we should tell
> >   explicitly how the comparison works in those cases.
> 
> That's a good point. Since it is standard terminology I will explain it in 
> the manual but leave the doc string as it is -- this is our usual practice, 
> right?

That'd be fine, thanks.

> > . AFAICT, no ordering is defined for overlays, and I wonder why.  I
> >   think this could be very useful; we certainly sort overlays in C in
> >   several places.
> 
> Yes, the plan was to add ordering for more types as we figure out which ones 
> are missing. Basically, if a type has a useful ordering that is well-defined, 
> we should probably add it.
> 
> That's one reason why I didn't include overlays from the beginning: I 
> couldn't easily find one obvious ordering that would make intuitive sense, 
> and I'd rather leave them unordered than define something useless. Code that 
> sorts overlays uses a variety of criteria: priority, starting position, 
> application-specific properties, and so on.

The canonical sorting order for overlays is in compare_overlays,
AFAIK.

> Thank you for the markup fixes, by the way. One question:
> 
> > -@table @asis
> > +@table @code
> 
> I used @asis because that is what the entries for some other functions using 
> key-value arguments used, like `make-process`. Clearly the keyword should be 
> marked up as @code, but should it encompass the @var{argument} part as well? 
> Or should we use @asis and then explicit @code in each @item?

Makeinfo can handle @code{@var{..}} just fine, we have that in many
other places, so that's not a concern.  It is indeed possible to use
@asis in @table, and then mark each @item with @code, but that's just
too much trouble; "@table @code" exists to save us that...

I think the places where keywords don't have the @code markup are
simply wrong.  This should be most evident in the printed format of
the manual, where @code produces a distinct typeface, but doesn't have
the quotes around it.  Maybe you could produce the PDF manual and see
the difference by yourself.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]