all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Adam Porter <adam@alphapapa.net>, sebastian@sebasmonia.com
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] Use vtable for eww-bookmarks
Date: Sun, 1 Dec 2024 11:31:37 -0800	[thread overview]
Message-ID: <8fde5a67-f778-f0c8-bcdd-ece08c95d369@gmail.com> (raw)
In-Reply-To: <cc34b418-a804-43be-be9f-952d61fd3d5d@alphapapa.net>

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.



  parent reply	other threads:[~2024-12-01 19:31 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 22:53 [PATCH] Use vtable for eww-bookmarks Sebastián Monía
2024-11-06 12:21 ` Eli Zaretskii
2024-11-06 13:36   ` Sebastián Monía
2024-11-06 14:33     ` Eli Zaretskii
2024-11-06 14:43     ` Visuwesh
2024-11-06 16:52       ` Sebastián Monía
2024-11-06 20:49         ` Sebastián Monía
2024-11-07  2:00           ` Visuwesh
2024-11-07  2:00           ` Visuwesh
2024-11-20 19:27         ` Sebastián Monía
2024-11-11  7:38       ` Jim Porter
2024-11-23 19:12 ` Jim Porter
2024-11-27 20:02   ` Sebastián Monía
2024-11-28 19:49     ` Jim Porter
2024-12-01  5:33       ` Sebastián Monía
2024-12-01  6:39         ` Adam Porter
2024-12-01 16:17           ` Sebastián Monía
2024-12-01 19:31           ` Jim Porter [this message]
2024-12-01 22:12             ` Sebastián Monía
2024-12-09  4:52               ` Jim Porter
2024-12-10 19:16                 ` Sebastián Monía
2024-12-12  4:15                   ` Sebastián Monía
2024-12-12 15:25                     ` Sebastián Monía
2024-12-12 18:08                       ` Adam Porter
2024-12-12 19:37                         ` Sebastián Monía
2024-12-28 11:04                           ` Eli Zaretskii
2024-12-31  0:07                             ` Jim Porter
2024-12-31  5:43                               ` Sebastián Monía
2024-12-31 18:29                                 ` Adam Porter
2024-12-31 20:10                                   ` [External] : " Drew Adams
2025-01-02  4:25                                   ` Sebastián Monía
2025-01-07 12:23                                     ` Sebastián Monía
2025-01-07 12:59                                       ` Adam Porter
2025-01-07 18:55                                         ` Sebastián Monía
2025-01-07 19:27                                           ` Stefan Kangas
2025-01-07 19:41                                             ` Sebastián Monía
2025-01-07 21:01                                               ` Stefan Kangas
2025-01-07 22:47                                                 ` Jim Porter
2025-01-08  6:02                                                 ` Thierry Volpiatto
2025-01-08 15:52                                                   ` Adam Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8fde5a67-f778-f0c8-bcdd-ece08c95d369@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=adam@alphapapa.net \
    --cc=emacs-devel@gnu.org \
    --cc=sebastian@sebasmonia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.