From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Kristoffer Balintona Newsgroups: gmane.emacs.devel Subject: Re: Custom vtable.el sorters Date: Fri, 4 Oct 2024 19:44:20 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37422"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Adam Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 05 02:45:11 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 1swsuz-0009VT-Po for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Oct 2024 02:45:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swsuJ-0007ZF-Jv; Fri, 04 Oct 2024 20:44:27 -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 1swsuH-0007Ys-I9 for emacs-devel@gnu.org; Fri, 04 Oct 2024 20:44:25 -0400 Original-Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swsuF-00019E-TA for emacs-devel@gnu.org; Fri, 04 Oct 2024 20:44:25 -0400 Original-Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-53993c115cfso3501741e87.2 for ; Fri, 04 Oct 2024 17:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728089061; x=1728693861; darn=gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=6okxh/IRnsAk4XvawEUKIt2IiaOWreOfLjE7WDaibCs=; b=PyNbS3KDDAOZInZBWU1xar/qmsb1J0ftxIZEK2+LbffnXZylyLqzP3GQjFkrZxr2zO F3qFfg+FVAMTtUN7a1K02MzC2HIHpxRoG45ughFoDqzg5bYbIT0CKDMPhacTTC74uZSk CR5lxRKO0iUrdtLeIlJWjszQw2XG39gVEMBOUz+aAe9kgmOdfrtxXLs91gHpISbJbkuL +d9kijqZel+kaJ040RGRYNKJZprkqTOQjm+rnzuERUr0mwpGty+XVU4O9L14UwB8A/4l dCUc9HkqanIhvErL+ktBF0d52aWziBjHKYFGAuIQxcWZnMFd5xd4esMLTpYqkmkixBx8 n99Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728089061; x=1728693861; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6okxh/IRnsAk4XvawEUKIt2IiaOWreOfLjE7WDaibCs=; b=aCMBKA0sRcSu74aahuhKkzxGSZqXCYosqTZuuxe6P6Pi0VOfuyjt3Xj+uc8uwIufHc +1iUU5ndwfLKCZVQqOCvZG9ja8p+M65jlSFaDWDPphwGU4vaZPD3mRwQEIO2R8XWKa5a SmzCgnwqJ+FaSGyjtPxPRcmz6sE86zyhelwkc/OpIu5qX377CMjJQL+7st0wYEF4buTO LnKPtPwM84WGaRbJyVtDCKJUEYCrRN4Scj+CYD9ghTteyTZPW5iPuTYx/xfTQKaanBol 7u/PUxQUYkWqO4mFGzQXrWgwhXCxfVj/nrJknD0h5CwxU94//hqcVvSPhUpwbWFAZrv0 +23g== X-Gm-Message-State: AOJu0Yxqer9VT9d/+qKaXMMqBI3xlibz77kFYT29597Vzr9RVd2nO4Kw X/vTx6++VgJMhfG/QMJj/tkLx4ZTk3wMsykcdKvCQA/dqBbL0dLtxA/9OXl/l/YPLfYMEgC1bbg s5kYTVhByq8TCWioEZ4jB2BNIeWXTGrvKBr4= X-Google-Smtp-Source: AGHT+IFp34n2Y3rHhvc6E9XTgM49POzEOILG/M8ZGJyC6avn4z13UqeHbfeVeCRq4tOyH4MpWOz35Jle1sGD9sLk6uE= X-Received: by 2002:a05:6512:b94:b0:539:8f4d:a7c9 with SMTP id 2adb3069b0e04-539ab9de2fcmr2881884e87.41.1728089060932; Fri, 04 Oct 2024 17:44:20 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Fri, 4 Oct 2024 19:44:20 -0500 In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=krisbalintona@gmail.com; helo=mail-lf1-x134.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:324326 Archived-At: On Thu, Oct 03 2024, Adam Porter wrote: > Hi Kristoffer, > >> I recently discovered the wonderful vtable.el built-in package. As far >> as I can tell, vtable is meant to eventually be a drop-in replacement >> for tabulated-list-mode (despite (elisp) Tabulated List Mode mentioning >> that vtable is geared toward variable pitch fonts, whereas >> tabulated-list mode is for monospace fonts) -- please correct me if I am >> wrong. >> >> In any case, I noticed that in vtable.el, vtable--sort (which appears to >> be where column sorting is implemented) has hard-coded behavior for >> sorting, namely, simple numerical and string sorters. I would like to >> ask about whether there any plans to add the ability for users to set >> custom sorters for their columns. Tabulated-list-mode has a version of >> this by setting tabulated-list-format: every column can use its own >> sorter. > > I can't find any bug reports mentioning "vtable sort", so I guess there > are no such plans yet. The Vtable manual indeed says that only > numerical and string sorting is done, depending on the type of value > returned by the getter function. But it seems like a reasonable idea to > me, to allow custom sort functions. So, patches welcome, I guess. :) I see. I could definitely try my hand at implementing such a feature. However, I'm very new to the Emacs development process and have never contributed to Emacs before. (I am aware of the FSF copyright assignment process though.) Would I just attach a patch to an email sent to emacs-devel@gnu.org and wait for some input? Although I haven't tried yet, another concern of mine is that whatever implementation I think up wouldn't be that great--I can't help but feel like someone more qualified should do the job of writing the code for what could be a widely used feature in the future. I apologize if these questions are naive. I thought it'd be better to ask anyway. -- With appreciation, Kristoffer