From: "Sebastián Monía" <sebastian@sebasmonia.com>
To: Adam Porter <adam@alphapapa.net>
Cc: Jim Porter <jporterbugs@gmail.com>,
emacs-devel <emacs-devel@gnu.org>, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH] Use vtable for eww-bookmarks
Date: Thu, 12 Dec 2024 14:37:23 -0500 [thread overview]
Message-ID: <thqnikro1ymk.fsf@sebasmonia.com> (raw)
In-Reply-To: <CAO_b3FV1qd5NRB1qsgPO+BU6Fd0O7R5vcMQanDEUppydr4wm5Q@mail.gmail.com> (Adam Porter's message of "Thu, 12 Dec 2024 12:08:05 -0600")
Adam Porter <adam@alphapapa.net> writes:
> About regenerating the elements and not being able to use EQ: is that
> because the original bookmark objects are not being used as-is?
Correct.
> If so, could we address that?
We could add the order in the file format. Or number the items when we
read them. Then use the object including the number to track it all.
But when change the "order" number associated with a row, then it won't
be eq/equal anymore, anyway.
Maybe better: vtable provides a mechanism to have a printer function
called on each row. Then the objects stay the same, in the `eq' sense,
and we can keep the counter for order outside the row, as part of the
printer/"formatter" (in vtable parlance).
To consider: then we would call a function for each printed row vs
calling it once to generate the list in one go. Plus the code to update
the items order number when removing and inserting each one.
Of course the real answer on which one is "faster" or "leaner" needs a
benchmark. For 90% of cases the amount of bookmarks won't be more than a
couple dozen, so I don't think it will matter.
I would leave it as-is on the grounds of (add less code + the
speed/memory difference is small)(1). But as usual, if there's
consensus that we rather do the outlined above instead, I'll do it.
(1) like I said, no benchmark, so "_I assume_ the difference is small"
> On Thu, Dec 12, 2024, 09:25 Sebastián Monía <sebastian@sebasmonia.com> wrote:
>
> Sebastián Monía <sebastian@sebasmonia.com> writes:
>
> > Sebastián Monía <sebastian@sebasmonia.com> writes:
> > Hi all,
> > Attached a patch with "Order" and validation for this sort before
> > kill/yank.
> > As always, open to feedback.
>
> Updated the patch to include the changelog :)
>
> --
> Sebastián Monía
> https://site.sebasmonia.com/
>
--
Sebastián Monía
https://site.sebasmonia.com/
prev parent reply other threads:[~2024-12-12 19:37 UTC|newest]
Thread overview: 25+ 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=thqnikro1ymk.fsf@sebasmonia.com \
--to=sebastian@sebasmonia.com \
--cc=adam@alphapapa.net \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jporterbugs@gmail.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).