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 15:06:05 +0300 Message-ID: <86y1a1dyz6.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> 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="10539"; 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 13:07:14 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 1rqB0r-0002Sw-7k for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Mar 2024 13:07:13 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqB0k-0006Dr-Uj; Fri, 29 Mar 2024 08:07:07 -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 1rqB0f-0006DL-RJ for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 08:07:02 -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 1rqB0f-0001jB-Co for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 08:07:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqB0g-0005aU-Ch for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 08:07: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 12:07: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.171171397721370 (code B ref 69709); Fri, 29 Mar 2024 12:07:02 +0000 Original-Received: (at 69709) by debbugs.gnu.org; 29 Mar 2024 12:06:17 +0000 Original-Received: from localhost ([127.0.0.1]:41847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqAzx-0005Yb-B6 for submit@debbugs.gnu.org; Fri, 29 Mar 2024 08:06:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqAzv-0005YH-Ay for 69709@debbugs.gnu.org; Fri, 29 Mar 2024 08:06:16 -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 1rqAzo-0001dD-FP; Fri, 29 Mar 2024 08:06:08 -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=3KHYMnE7dnnhwAtfspszyPExojnVhRGxnK1ezBhRfzg=; b=WbXsL3ELZRDaYG/C/dc5 Ph7RL3VnLqvh23tlc24U/DFjoCKQtelMA05ETs64Xow6tz+1FBC49vhSB8c8ATqcbts3IumB+kD+P 6mABlSVaBKykFReiSijKNe4pPr8j+ntA7s8ezARPc/RS+jLrYhe92mYEs58TpPFxij39go4ZLXFPV cesw8FzfXdemTaGO0qH6xk7afWlHZftINstCPgTAV0cDAsvUU74pnoCT3ojFNgEwR1UMQlu+KbACn QCn7tswT6QBdD0vQ5pUc3D48NnmQgNFjj2ch0LbvxFD1ujaHL2CzAXJJGMjaLt2uLnWsd4pnejcu0 HQ9M1TGUITTGDQ==; In-Reply-To: <7219B5AB-4EA7-4050-92AE-7FB949D6D415@gmail.com> (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Fri, 29 Mar 2024 11:59:39 +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:282288 Archived-At: > From: Mattias Engdegård > Date: Fri, 29 Mar 2024 11:59:39 +0100 > Cc: Dmitry Gutov , > Eli Zaretskii , > 69709@debbugs.gnu.org, > Gerd Möllmann > > 25 mars 2024 kl. 12.11 skrev Mattias Engdegård : > > > The plan is to add scratch/sort-key to master in a few days if no serious issues turn up. > > Plan executed. Thanks. I have a few comments/questions about value<: . 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. AFAIU, the corresponding elements are compared by recursively calling value< for them? And what happens if one has more elements than the other? These are all questions that popped up when I read the new text, and I think they should be answered in the text. . 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. . Various fine details about value< are never mentioned: the fact that there's a limit to recursion, the special treatment of nil in some cases, etc. I think we should document them, at least in the doc string if not in the manual as well.