emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix bookmark-bmenu-list sorting.


From: Karl Fogel
Subject: Re: [PATCH] Fix bookmark-bmenu-list sorting.
Date: Sun, 20 Mar 2022 18:40:18 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

On 07 Mar 2022, Manuel Giraud wrote:
Karl Fogel <kfogel@red-bean.com> writes:

Thanks.

Let's install this on master. We can consider backporting to the
emacs-28 branch after Emacs 28.1 is released.

Installed in commit a6abd06c73.

Thanks. I've tested both of your patch and they are working as intended: the order is modified between two `bookmark-bmenu-list' call if I change
`bookmark-sort-flag'.

There is one minor thing left: the tabulated-list bar (I don't how it is called) keep the old information « sorted by bookmark name » when I have
revert to `bookmark-sort-flag' as nil.

Manuel, could you please give me a more verbose reproduction recipe for that last paragraph above? Maybe even include a screenshot?

I've attached an updated patch here (please use this version), and when I test it, I don't see anything that says "sorted by bookmark name". I don't know what the tabulated-list bar you're referring to is, but I don't see anything that would obviously be it.

(I have tried things like turning `menu-bar-mode' on and off. I've also tried looking in the code of "lisp/emacs-lisp/tabulated-list.el", but I don't see any place where a message "sorted by bookmark name" would be set up.)

Now, there is another related UI issue:

In the tabulated-list header line at the top of the buffer, we have the expected three columns: "Bookmark", "Type", and "File". The first column, "Bookmark", has a down-triangle / up-triangle toggle for switching between descending and ascending sort by bookmark name. But if `bookmark-sort-flag' is nil, then when the buffer is regenerated the bookmarks will be listed in creation-date order -- and the triangular toggle will just keep whichever value the triangle had already.

Maybe the right fix for that is for the buffer to somehow indicate *which* property the bookmarks are sorted by -- name or creation-date -- and make sure that the triangle always reflects the sorting direction of whichever thing is currently being sorted on. However, before I go down that road, I'd like to fully understand your initial "one minor thing" bug report above first.

Best regards,
-Karl

Attachment: 0001-Ensure-bookmark-bmenu-buffer-sorts-when-it-should.patch
Description: Text Data


reply via email to

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