[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Use vtable for eww-bookmarks
From: |
Sebastián Monía |
Subject: |
Re: [PATCH] Use vtable for eww-bookmarks |
Date: |
Sun, 01 Dec 2024 11:17:27 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Adam Porter <adam@alphapapa.net> writes:
>> Jim Porter <jporterbugs@gmail.com> writes:
>>> I'm not sure what a better key would be though. Maybe "C" for "clear sort"?
>> Attached a patch that uses "c" ("c", not "C") and renames the
>> function
>> to match.
>> Let me know what you think!
> Given how many similar modes and buffers that are in Emacs (i.e. where
> some kind of objects are displayed in a list with metadata), I think
> it would be best if any new such feature followed existing paradigms
> as closely as possible. To have each vtable-like view (whether
> implemented with vtable or tabulated-list or anything else) have
> slightly different concepts and bindings is not helpful to the user.
There is already some slight differences here and there and it is
sometimes jarring, so, great point.
For example Gnus uses # for marking, instead of m like vc-dir/dired,
sometimes it trips me.
> 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.
The reason the bookmarks order matters, and this killing and yanking
feature exists, is that EWW binds M-n and M-p to navigate to the
next/prev bookmark. I doubt it is a popular feature (only found out
about it when writing this patch...) but I wouldn't remove it. So
defaulting to sort by name would be off the table, as it breaks the
whole thing.
Adding a column "Navigation order", or "rank" (both terrible names, open
to suggestions) seems like a great idea.
> BTW, instead of doing:
>
> + (while (not (equal (vtable-current-object)
> + bookmark-at-point))
> + (forward-line 1))))
>
> Could you use vtable-goto-object? I realize that it currently uses EQ
> for comparison, but 1) we've talked about changing that, and 2) ISTM
> that EQ should work for this case anyway, because entries in the
> bookmark list are being compared, and they shouldn't be getting
> copied. Am I missing something?
You are not, that code is a 1:1 conversion of the previous code. Next
patch, which may include the new column, will make better use of
vtable-goto-object when applicable. Thank you!
Regards,
Seb
--
Sebastián Monía
https://site.sebasmonia.com/
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Adam Porter, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks,
Sebastián Monía <=
- Re: [PATCH] Use vtable for eww-bookmarks, Jim Porter, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/01
- Re: [PATCH] Use vtable for eww-bookmarks, Jim Porter, 2024/12/08
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/10
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/11
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/12
- Re: [PATCH] Use vtable for eww-bookmarks, Adam Porter, 2024/12/12
- Re: [PATCH] Use vtable for eww-bookmarks, Sebastián Monía, 2024/12/12
- Re: [PATCH] Use vtable for eww-bookmarks, Eli Zaretskii, 2024/12/28
- Re: [PATCH] Use vtable for eww-bookmarks, Jim Porter, 2024/12/30