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.devel Subject: Re: Add a function for building sort predicates Date: Sat, 03 Feb 2024 09:08:11 +0200 Message-ID: <86le823u04.fsf@gnu.org> References: <87msskw1u8.fsf@web.de> <87eddw9k5o.fsf@daniel-mendler.de> <86h6isyu2b.fsf@gnu.org> <87v878ukb1.fsf@web.de> <86bk90ypb4.fsf@gnu.org> <87il36zkwh.fsf@web.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23592"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Heerdegen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Feb 03 08:09:12 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rWA9I-0005tw-6a for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Feb 2024 08:09:12 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rWA8d-0008BS-5O; Sat, 03 Feb 2024 02:08:31 -0500 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 1rWA8N-0007lk-Dh for emacs-devel@gnu.org; Sat, 03 Feb 2024 02:08:19 -0500 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 1rWA8M-00031x-AH; Sat, 03 Feb 2024 02:08:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=RXcv8Jni4z5MK5bL/d6vIg5HBzJvav0UWopvARXdgjI=; b=lIkjdIT5DBPC mw79/V7onuND6gjf83q01+cWC/oQ1U2Z21dBPdkPSIA1EpEFBWBnSkDpECc6mrcKbFWWutBIujgQp 4QTV8h/U7MIIBbMupxAhBgDf1N6txx17T+uiT4sz4M79wuPwmbHXiox+x1vtaxou3SNe3KeEMFFF2 px6JDJnHAjVkUM5BqqkbZNnUJwc+7DXT3IXAuosSPRz/LIXjmWo0p1WfW7bTvVSTUvGj+fBVOGwHK LVexZIUhmuMeeUF038CT9XKTC15+ii0AUtDDoUaFvxLWfccYvY/tV/IwSLcASTyIGbnb4JiCpp5lw faqOueVOxCExZ1Uv+SrEBg==; In-Reply-To: <87il36zkwh.fsf@web.de> (message from Michael Heerdegen on Fri, 02 Feb 2024 21:11:26 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315791 Archived-At: > From: Michael Heerdegen > Cc: emacs-devel@gnu.org > Date: Fri, 02 Feb 2024 21:11:26 +0100 > > Eli Zaretskii writes: > > > > I consider this only as a start. With UI you mean customize? Anyway, > > > the answer is probably YES. > > > > Even a simple data structure should be easier than a full-fledged > > function. > > Not sure I understand what you are getting at. I mean something like a list data structure which determines the order of sorting keys. Users can define such data structures even if their Lisp programming capabilities are relatively low or even nonexistent. > In my code example, the data structure is the specification of the rules > in the call - a nested list, suitable for this task. We need something > that makes the structure being "applicable" by `sort' - this is the > function implementation. I'm probably misunderstanding. Or maybe I'm misunderstanding. AFAIU, you and Daniel had in mind adding a function which is the sort predicate, as the means for customization of sorting. My point is that users should preferably not be required to customize such features by writing Lisp code. Apologies if I misunderstood your suggestion, but in that case perhaps you should explain it in more detail, including what will users have to do to customize the sorting order.