From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69709: `sort` interface improvement and universal ordering predicate Date: Fri, 29 Mar 2024 18:35:10 +0300 Message-ID: <86o7axdpap.fsf@gnu.org> References: <86zfv6uqjn.fsf@gnu.org> <4391448A-C7AF-4D7F-8866-C0313956D52D@gmail.com> <8366111E-97C4-4839-AA1E-A577C81A6035@gmail.com> <4B7ACA81-DEB9-4878-BE0B-88A302AF7081@gmail.com> <2BB79019-C075-445C-A9E0-9D29929EA02A@gmail.com> <7219B5AB-4EA7-4050-92AE-7FB949D6D415@gmail.com> <86y1a1dyz6.fsf@gnu.org> <51D040A5-AC7C-485C-A0C9-DFCFF3DDA510@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18990"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69709@debbugs.gnu.org, dmitry@gutov.dev, gerd.moellmann@gmail.com, monnier@iro.umontreal.ca To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 29 16:36:30 2024 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 1rqEHN-0004hr-Tx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Mar 2024 16:36:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqEGx-0001Qz-RM; Fri, 29 Mar 2024 11:36:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqEGv-0001QN-RI for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 11:36:01 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rqEGv-0001ZY-IS for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 11:36:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqEGw-00087j-DE for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 11:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Mar 2024 15:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69709 X-GNU-PR-Package: emacs Original-Received: via spool by 69709-submit@debbugs.gnu.org id=B69709.171172652331105 (code B ref 69709); Fri, 29 Mar 2024 15:36:02 +0000 Original-Received: (at 69709) by debbugs.gnu.org; 29 Mar 2024 15:35:23 +0000 Original-Received: from localhost ([127.0.0.1]:43216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqEGJ-00085d-BX for submit@debbugs.gnu.org; Fri, 29 Mar 2024 11:35:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqEGH-00085P-0s for 69709@debbugs.gnu.org; Fri, 29 Mar 2024 11:35:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rqEG9-0001Il-6A; Fri, 29 Mar 2024 11:35:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=oRh88GykZ8U9SD5DDgoVJin+GyW7BlECggry5Q078U0=; b=Ht2VcZxhIwx2jsv8ww1I EtyBrc8vfRoBRyjhMICk9Y5r6z3lZ8oC9T42NY1C2fvRYdOSACpoaX67zXztwWTnbidbpqdK2Sz6e 6TOOr73HvZvq9KykBPvXUJMBjQZeJBZXhKtm1OgnXfqrGPAjyHtT7niACLeDu7QjA7IZp9bDvjH44 F3YqVrq3wCWh0mvskCKPiYFSXrsPbPHdLZm4FfAqMErcXSrEbic8+u8CtNGrzpHkGVLjZRMXKNSPq BWDAJEz8eQbjr7FWHMP5Bz00XzC5mPQKtNMHhTw1bZOZyJFsIIBPTGSH8ifyusVlT3OJwurdrgqnn XHa7hTuT5VP99A==; In-Reply-To: <51D040A5-AC7C-485C-A0C9-DFCFF3DDA510@gmail.com> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Fri, 29 Mar 2024 16:02:01 +0100) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282299 Archived-At: > From: Mattias EngdegÄrd > 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 : > > > . 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.