From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69709: `sort` interface improvement and universal ordering predicate Date: Fri, 17 May 2024 14:29:38 +0200 Message-ID: <87le48d3kd.fsf@daniel-mendler.de> 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> <87edbtnu8i.fsf@daniel-mendler.de> <46794723-8324-41DD-8A1F-C1206A8EAFC2@gmail.com> Reply-To: Daniel Mendler Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27773"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 69709@debbugs.gnu.org, ~pkal/compat-devel@lists.sr.ht, Gerd =?UTF-8?Q?M=C3=B6llmann?= , Dmitry Gutov , Stefan Monnier , Eli Zaretskii 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 May 17 14:33:24 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 1s7wm4-0006vx-0M for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 May 2024 14:33:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7wlk-0003YG-Df; Fri, 17 May 2024 08:33:04 -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 1s7wlf-0003Xe-Ox for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 08:33: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 1s7wlf-0007ys-Fb for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 08:32:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s7wli-0000fd-0e for bug-gnu-emacs@gnu.org; Fri, 17 May 2024 08:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 May 2024 12:33:01 +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.17159491222558 (code B ref 69709); Fri, 17 May 2024 12:33:01 +0000 Original-Received: (at 69709) by debbugs.gnu.org; 17 May 2024 12:32:02 +0000 Original-Received: from localhost ([127.0.0.1]:54945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7wkj-0000f2-L8 for submit@debbugs.gnu.org; Fri, 17 May 2024 08:32:02 -0400 Original-Received: from server.qxqx.de ([49.12.34.165]:60665 helo=mail.qxqx.de) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s7wki-0000en-37 for 69709@debbugs.gnu.org; Fri, 17 May 2024 08:32:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WJx5/CtwXi/Yab9l9WM1A3HH7OE9lzzGdCWzvRXgw3k=; b=iY8Mzep+FrkDCYkegBYja7/RG9 5luho4WNm+m7T6LyosDgMxPVoPNXQPVymQPm5VxsVL0kn+RMYD5OOd9gqdTeqnqFAyEEY4QaaE9NA 0WLIBOTOyrtS+DKJSjAJK9qmT4jvAteMTZ+ATRk7qgpxPbMbueHwR3Q6uXJ850K7/k/I=; In-Reply-To: <46794723-8324-41DD-8A1F-C1206A8EAFC2@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Fri, 29 Mar 2024 12:52:37 +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:285236 Archived-At: Mattias Engdeg=C3=A5rd writes: > 29 mars 2024 kl. 12.38 skrev Daniel Mendler : > >> I would >> like to back-port the new feature in the Compat library, specifically in >> the emacs-30 branch of the Compat repository. I've seen you mentioned >> some pure Lisp code, implementing the new feature, in a slower, but >> backward compatible way, which we could perhaps use? > > Here is my proof-of-concept hack that maybe you could use as starting poi= nt. > It's incomplete but I think you can fill in the blanks. You could use the= tests > in fns-tests.el, perhaps adapted to fit. Let us know how it goes. Just letting you know that I've implemented value< and sort in the emacs-30 branch of Compat. It works well so far, but value< is not yet completely implemented. See the following commit: https://github.com/emacs-compat/compat/commit/8190769d9eb9258dd8361bd322d90= 228dc586770 There is one thing I'd like to ask about value<. Would it make sense to support comparing mixed types, e.g., numbers and markers or strings and symbols? In particular I often like to mix numbers and markers, in particular in cases where we can avoid creating a marker for performance reasons if the pure position is sufficient and the location doesn't change due to edits. Daniel