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: Eli Zaretskii
Subject: Re: [PATCH] Fix bookmark-bmenu-list sorting.
Date: Fri, 04 Mar 2022 21:37:14 +0200

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: kfogel@red-bean.com,  emacs-devel@gnu.org
> Date: Fri, 04 Mar 2022 18:41:23 +0100
> 
> 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.

Thanks.

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



reply via email to

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