From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Use vtable for eww-bookmarks Date: Sun, 1 Dec 2024 11:31:37 -0800 Message-ID: <8fde5a67-f778-f0c8-bcdd-ece08c95d369@gmail.com> References: <87ldx0vufd.fsf@sebasmonia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39656"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Adam Porter , sebastian@sebasmonia.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 01 20:32:44 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 1tHpgP-000AB6-Ne for ged-emacs-devel@m.gmane-mx.org; Sun, 01 Dec 2024 20:32:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tHpfj-0007Tr-Aa; Sun, 01 Dec 2024 14:31:59 -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 1tHpfb-0007TU-Nn for emacs-devel@gnu.org; Sun, 01 Dec 2024 14:31:51 -0500 Original-Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tHpfV-0004SL-JO for emacs-devel@gnu.org; Sun, 01 Dec 2024 14:31:48 -0500 Original-Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7fc22a88bcbso2294801a12.2 for ; Sun, 01 Dec 2024 11:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733081499; x=1733686299; darn=gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=xhUhmbdx60lquaIT9ZiDNRQeXwVC4Od2Meb93xyA3FQ=; b=YDeJ+zCSiy12muVitGpVk2MCF3OpJEsjGNar00jHyBES8Aoaf/jv8S3Zpe3qZYLskT 5v5QydOEIrjPVnIZIVDlxXmftrnM+q6xvFd0EvnV+tW15gLjqPs3MXivsWnXclPvuKpg UpVE9FhVR7neLREP4pKaOP3jTQub/xGJPA8pAohnt72WiTkRoCwrebQVKeSapo/ClR45 1CrsNVJwQkdt7Sge4P9iuCtCRqcmPgQZCLJfzNoDmC86g5ZyQj6KrwYgJnufszVBHQj3 j0zdr98EVPNCsvMA/ez4El5LhZQGTxhRdchH6DUjDRdVMFXCn6HOXCHUjHr3PoIQwFVz bP1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733081499; x=1733686299; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xhUhmbdx60lquaIT9ZiDNRQeXwVC4Od2Meb93xyA3FQ=; b=b88svmlc07MMlQ7u1w3dqZdF5XM+/ZCQ3+Aph3iy05Zb7LTrmfAp/fgxtLzm3/QFRq KtLo5fS1unCXuccDmj1uUGzclLmveK96cb0PNHWx5aofpFkHuIiVl9nzcgAn81Zht+M+ 5WYsFN9+8EzJ7qaY2848eZ8vR+eV0it1ZH3FPsj2/PpFOFdM9JLpMeMybMMDATC9gE6V W02LLOoc6gM/gd4Z6nlJOoSkUYo9bnHPF8oUeA1AvuQHvZArGy2nMxVdXJD0UqLJXZzP aGsXoUS0qzpllNoaF3ZXxYGQDcdafo8vJYDYrA3TRUpl8qdFFd66q6QMafqCWOUfTHdT i25A== X-Gm-Message-State: AOJu0YxKhHxznnmbtAgx71U85AjMLL/YJgIuYZHT3sxwOyU5A9E+ZpfR Z2yf48Kl7Zd+MGqnLFXBSUw0hCb3KjBnfht/SP+PssCHgNuBOnRS X-Gm-Gg: ASbGncvhF7EdvHmNgQdbaJR6UD3vHlqvL7R+cfZOk/O8eNdLaP9oaOCg7sfUNBNXfSI KiF1jCPp8p7fojE15w9M4qoglAfL+I8eY1fdoe3BUU8bVGQIPxO+TsqGFWZIyBQcZMf+bzQ2s8O aAhcQQ5rjpGqCbs1scXSxTV1GUSIqfhv+7eKx1k7SC8VS3n78ZzQ+WFTzNQOERjfZvp+dPELuPi l7cesiQ8JyON6Jwv4vxjHo2MBR6z6eAybmFiaIGJ0/I7nhDKKft+j9nKJU8M9NBNlSDi914lFWQ SlmwYQLXu2l7uZxhquHfHIKTqTU= X-Google-Smtp-Source: AGHT+IGFLSEoRqaDoPKp1pAJoo49LIGLabUGp9ILUzEZ/JSfK/MA0xDdk0P2rhmmustvC/g44FsOow== X-Received: by 2002:a05:6a21:6da1:b0:1db:e10b:8a9a with SMTP id adf61e73a8af0-1e0e0ab03e7mr29968434637.6.1733081499256; Sun, 01 Dec 2024 11:31:39 -0800 (PST) Original-Received: from [192.168.1.2] (syn-023-240-098-037.res.spectrum.com. [23.240.98.37]) by smtp.googlemail.com with ESMTPSA id 41be03b00d2f7-7fc9c3034c8sm6364204a12.31.2024.12.01.11.31.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 Dec 2024 11:31:38 -0800 (PST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=jporterbugs@gmail.com; helo=mail-pg1-x536.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:325929 Archived-At: On 11/30/2024 10:39 PM, Adam Porter wrote: > So I'd suggest a reconsideration of the concept of sorting: There is no > such thing as "clearing" the sorting, because the entries are always > sorted by something, even if that's just the order in which the > bookmarks are present in the list (which is probably the order in which > they were created, or the inverse). This is probably just a difference of semantics, but I see the default ordering as a non-sorted *ordering*; non-sorted because none of the cells' data contributes to the ordering. The sorted views then apply a sort function to *produce* an ordering. So in my mind you can clear the sorting to reveal the "natural ordering" of the list. > In this case, the vtable-map already binds > vtable-sort-by-current-column.  So it seems like what we need is a > column by which to sort entries by default.  That would seem to leave us > with two options: > >   a) Sort by bookmark name by default > >   b) Add a column for the bookmarks' place in the list, and sort by > that by default. I agree that it makes sense to have some common way of handling this so that we don't proliferate many different implementations across Emacs. If we want to let users arbitrarily reorder the entries, then (a) won't work. However, I'm not sure I like (b). Except for providing a command to restore the natural ordering, the list-position column just seems like visual noise. Maybe vtable would benefit from some special handling here? We could even go a step further and make a 'reorderable-vtable' (feel free to suggest a better name/interface) that includes the kill/yank commands from the EWW bookmarks code. Then we can also avoid proliferating many variations on how a user might reorder the data in a table. That said, if everyone else prefers adding a list-position column, I won't fight too hard. I'm not the maintainer for EWW, just someone who's pushed a few commits to it recently. > Then the user could simply sort by one column or the other, without > needing to add the additional concept of "clearing" the sorting (a > concept that's not generally present in such views in other GUIs, > anyway--usually a table view is always sorted by one column or another). For what it's worth, the columns in the bookmarks Library in Firefox are tri-state buttons: sort ascending, sort descending, and no sort. You can only reorder the bookmarks if all the columns have the "no sort" state. Columns in Emacs table modes *can* have any of these three states, but it's not easy to restore the initial ordering.