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 16:15:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> Cc: Karl Fogel <kfogel@red-bean.com>,  emacs-devel@gnu.org
>> Date: Fri, 04 Mar 2022 14:25:37 +0100
>> 
>> I cannot say if it is a regression but it seems that the patch
>> 61e51fee9ca3 of october 17, 2020 rewrote bookmark-bmenu-mode to use
>> tabulated-list-mode and set the tabulated-list-sort-key on the bookmark
>> name.
>
> Thanks.  So this did work correctly in Emacs 27.2?
>
> Or maybe you can show a simple recipe starting from "emacs -Q", then I
> could see for myself what happened in Emacs 27 vs Emacs 28.

This would do:
--8<---------------cut here---------------start------------->8---
(defun dobook (name)
  (with-current-buffer (get-buffer-create name)
    (set-visited-file-name (format "/tmp/%s" name))
    (bookmark-set (buffer-name))))

(progn
  (dobook "a")
  (dobook "b"))
--8<---------------cut here---------------end--------------->8---

And then "M-x bookmark-bmenu-list". As bookmark "b" was the last
defined, it should be at the top of the list… but I've just tested in
Emacs 27.2 and the bookmark list was already alphabetically sorted. So I
guess this is not a regression (and won't make it into 28 then).
-- 
Manuel Giraud



reply via email to

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