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: Manuel Giraud
Subject: Re: [PATCH] Fix bookmark-bmenu-list sorting.
Date: Fri, 04 Mar 2022 18:41:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)

Eli Zaretskii <eliz@gnu.org> writes:

[...]

> One more question: your patch included this part:
>
>> diff --git a/lisp/bookmark.el b/lisp/bookmark.el
>> index 2751731817..80fb1cdfc7 100644
>> --- a/lisp/bookmark.el
>> +++ b/lisp/bookmark.el
>> @@ -1819,7 +1819,7 @@ bookmark-bmenu--revert
>>                         (list location))])
>>                entries)))
>>      (tabulated-list-init-header)
>> -    (setq tabulated-list-entries entries))
>> +    (setq tabulated-list-entries (reverse entries)))
>>    (tabulated-list-print t))
>
> Why is that needed?

It is needed because the 'entries' list is constructed by iterating over
'bookmark-alist' and pushing new element to it. So in the end, 'entries'
is in the exact reverse order of 'bookmark-alist'.

As it seems intended that 'bookmark-alist' is ordered with most recent
bookmark at the beginning, I tried to keep this order in the "Bookmark
List" buffer.
-- 
Manuel Giraud



reply via email to

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