From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix bookmark-bmenu-list sorting. Date: Fri, 04 Mar 2022 17:26:30 +0200 Message-ID: <834k4divrt.fsf@gnu.org> References: <875yovm1m6.fsf@elite.giraud> <87v8wvkk64.fsf@red-bean.com> <83v8wuj3v0.fsf@gnu.org> <87tucewgu7.fsf@red-bean.com> <83lexqi3z9.fsf@gnu.org> <87tuceuo4b.fsf@red-bean.com> <83czj2hrdv.fsf@gnu.org> <87a6e5lui6.fsf@elite.giraud> <837d99j10x.fsf@gnu.org> <874k4dlpeg.fsf@elite.giraud> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29958"; mail-complaints-to="usenet@ciao.gmane.io" Cc: kfogel@red-bean.com, emacs-devel@gnu.org To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Mar 04 16:35:03 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nQ9xP-0007Vy-K6 for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Mar 2022 16:35:03 +0100 Original-Received: from localhost ([::1]:43892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQ9xO-0000ST-8g for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Mar 2022 10:35:02 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ9pG-0008FD-Lh for emacs-devel@gnu.org; Fri, 04 Mar 2022 10:26:39 -0500 Original-Received: from [2001:470:142:3::e] (port=48602 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ9pD-0004kA-Qx; Fri, 04 Mar 2022 10:26:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=h1mU53YmhxLnhMQ/d7QQQ7+K6DLqwvzPQrHvocH+QFE=; b=oaRU3iM+7d3WaboFO/uC MPJiN6CkoICpMyFMb0C4P8+E53tXoIUBb62WPzHFwTm47IQdOLc9Zzvveiu1cCkWbA1+hB+OA4gUU yBtEoVUSdwVzIS1ApTjTcuOWI8i3o/t2FGKw8Vx7YVnb/dhv42bocuRFwH87jKauh+MVD8GD6UCY6 5RQbkeUzHANScAdd/FxXEdRWt1ntRc/2yZqDmuEXkML0xRd3qIQMYkR+hkGmF3jVoPXOLTEdICVtv UTWy7/oZQsAaNvmhERuTTy+bjiVRRupdObg2CoXOoeoBH9o2k1PE3MB52zuOI6pqGGR//komh6bJR 81tryyNH51BzRw==; Original-Received: from [87.69.77.57] (port=4368 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ9pC-00012T-NA; Fri, 04 Mar 2022 10:26:35 -0500 In-Reply-To: <874k4dlpeg.fsf@elite.giraud> (message from Manuel Giraud on Fri, 04 Mar 2022 16:15:51 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:286822 Archived-At: > From: Manuel Giraud > Cc: kfogel@red-bean.com, emacs-devel@gnu.org > Date: Fri, 04 Mar 2022 16:15:51 +0100 > > > 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). OK, thanks. 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?