emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Use vtable for eww-bookmarks


From: Jim Porter
Subject: Re: [PATCH] Use vtable for eww-bookmarks
Date: Sat, 23 Nov 2024 11:12:22 -0800

On 11/5/2024 2:53 PM, Sebastián Monía wrote:
Hi all,

The attached patch is a first attempt at bringing eww-bookmarks in line
with the previous switch of eww-buffer-list to vtable.

There are features of eww-bookmarks I had no idea about, like the
ability to re-arrange them by killing and yaking. Or navigating to the
next bookmark from an eww buffer or invoking the command via M-x.

I think this looks good overall. Just one thought: instead of requiring users to manually undo sorting when killing/yanking, what if we had 'eww-bookmark-kill' and 'eww-yank-bookmark' prompt the user to ask if they want to undo the sorting first? Something like this (untested):

  (defun eww-bookmark-kill (&optional interactive)
    (interactive "p")
    (when (and interactive
               (vtable-current-table)
               (vtable-sort-by (vtable-current-table)))
      (if (y-or-n-p "Reset sorting of bookmarks?")
          (eww-bookmark-undo-sort)
        (user-error "Can't kill sorted bookmarks")))
    ;; ...
    )

Then we might not even need a keybinding for 'eww-bookmark-sort'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]