From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#69709: `sort` interface improvement and universal ordering predicate Date: Fri, 29 Mar 2024 16:02:01 +0100 Message-ID: <51D040A5-AC7C-485C-A0C9-DFCFF3DDA510@gmail.com> 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> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38993"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69709@debbugs.gnu.org, dmitry@gutov.dev, gerd.moellmann@gmail.com, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 29 16:03:31 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 1rqDlS-0009qN-NM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 29 Mar 2024 16:03:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqDl4-0000Mx-PY; Fri, 29 Mar 2024 11:03:06 -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 1rqDkz-0000FC-Lj for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 11:03:05 -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 1rqDkz-0002lD-6c for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 11:03:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqDl0-0006PN-53 for bug-gnu-emacs@gnu.org; Fri, 29 Mar 2024 11:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 29 Mar 2024 15:03: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.171172454224536 (code B ref 69709); Fri, 29 Mar 2024 15:03:02 +0000 Original-Received: (at 69709) by debbugs.gnu.org; 29 Mar 2024 15:02:22 +0000 Original-Received: from localhost ([127.0.0.1]:43155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqDkJ-0006NK-Cq for submit@debbugs.gnu.org; Fri, 29 Mar 2024 11:02:22 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:51209) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqDkE-0006Mv-1s for 69709@debbugs.gnu.org; Fri, 29 Mar 2024 11:02:18 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-513e25afabaso2227578e87.2 for <69709@debbugs.gnu.org>; Fri, 29 Mar 2024 08:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711724526; x=1712329326; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=XNqovXLTTE4b/Dvm4dkiVTdtxmEha8Tm7IiVFa2dKeA=; b=hHnKKiuXJpFdOUsvNz6Wtj8opPRBY370WPtWseoZ3TBmtt/sO3ughhLxYcF3roxcoP CbYRRnGGY29sEnPVXY0Qn4viPqZvfPKKlVO612VpAeqAine3Eja09ErTQ7SVSZonL4mC rz4TkaVKnlPvNMnXSHHiPyr+soZrrsojjrfbrpT1ldEvDYXKYOqTroQ37O1/+vmu2Uxm jnz7U3Ml1jl06pt5ahn4XyxM4f20pzBV2O9B77fK1q5jSFm6yoR37UyXLet27ZW116Cc 9YTlQAoSD0fR69TkGdpsOxIopk2Pyc8jEjBC7Q6I/oUNSl4SpQYNHN5t2ZTIwT3B6HEO xgYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711724526; x=1712329326; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=XNqovXLTTE4b/Dvm4dkiVTdtxmEha8Tm7IiVFa2dKeA=; b=sXY5E9Y+pC2W+JSsHsWw5Ec9jfhCe7ryHMfuJxxuuioLBjLDQRTThCohwFI0W0m/Nn 9pa44aAm/KxKJoc7+FK3UxwTB4adpVsDj15luUf4kMsZS8ILbmsecfjPiO1tbdPcutpC 7XdD+1bQM8nYJv0TeEIc56yE8gd5I128BuQHNMPljJMzYJOBdIh5Qyp8gKNRSA/8D+bd rzXWEjqJ/Vdy5hR3Gmzlg/yAfCdrElxLsjbiLSvGNxIpyJyA4Bf5oiqwKVQnr/TrpHvP qI6X4xtPBbwiMt+cyr7g9bE7viHtzhFBMOeMoSeSZKZ0CYHeAz7U+khkIyvz0MpzA9K+ sgnQ== X-Forwarded-Encrypted: i=1; AJvYcCXwQrIMKwcN9HO7bVPKm3C5xywwCR9hdyjUE5SQl+u7bW8Uldrjv5WV8RFRgNpqKNEpYZodldB3gT2608JhV4JIrUM3Gjo= X-Gm-Message-State: AOJu0YzAAtIhXlT4BcsD00XmOelQIsLxJopk9ciuRPW1z6I2sPL70mhf bvEQt1hJJumrIn+0RUTWTqycrIX5PS+oWk/47cSKmIs/PJwO2fcV X-Google-Smtp-Source: AGHT+IEEC8t3zAq+oGP4T4JosY+YFUY/sOJIsYziQ7KmxnZrgyiMGMEhsMvB6TwvZSPqT8uj7befng== X-Received: by 2002:a05:6512:311b:b0:515:c059:bac3 with SMTP id n27-20020a056512311b00b00515c059bac3mr1509932lfb.31.1711724525949; Fri, 29 Mar 2024 08:02:05 -0700 (PDT) Original-Received: from smtpclient.apple (c80-217-1-132.bredband.tele2.se. [80.217.1.132]) by smtp.gmail.com with ESMTPSA id g1-20020a0565123b8100b00515bb3c93desm647968lfv.211.2024.03.29.08.02.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Mar 2024 08:02:04 -0700 (PDT) In-Reply-To: <86y1a1dyz6.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.120.0.1.15) 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:282298 Archived-At: 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? > . 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. > . 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. Right -- the depth limit is very much like that of `equal` which is = documented in the manual but not the doc string; I'll probably do the = same for `value<`. `nil` deserves a note about its dual nature (symbol = and list) as well. 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?