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.bugs Subject: bug#59580: 29.0.50; [PATCH] Add new choices to bookmark-sort-flag Date: Thu, 01 Dec 2022 10:23:41 +0200 Message-ID: <83bkonilbm.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20396"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59580@debbugs.gnu.org To: Gabriel , Karl Fogel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 01 09:25:29 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1p0esq-00055r-I8 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Dec 2022 09:25:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p0esR-0007Ns-NW; Thu, 01 Dec 2022 03:25:03 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0esQ-0007Nb-G3 for bug-gnu-emacs@gnu.org; Thu, 01 Dec 2022 03:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p0esQ-0005Sd-75 for bug-gnu-emacs@gnu.org; Thu, 01 Dec 2022 03:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p0esP-0006KQ-Pj for bug-gnu-emacs@gnu.org; Thu, 01 Dec 2022 03:25:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Dec 2022 08:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59580 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59580-submit@debbugs.gnu.org id=B59580.166988306024285 (code B ref 59580); Thu, 01 Dec 2022 08:25:01 +0000 Original-Received: (at 59580) by debbugs.gnu.org; 1 Dec 2022 08:24:20 +0000 Original-Received: from localhost ([127.0.0.1]:38239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0erj-0006Jd-VD for submit@debbugs.gnu.org; Thu, 01 Dec 2022 03:24:20 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p0erh-0006JW-33 for 59580@debbugs.gnu.org; Thu, 01 Dec 2022 03:24:18 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0era-0005OE-Sd; Thu, 01 Dec 2022 03:24:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=mGrtEXMdJYKOv4uTt6e1ldSAX3mANqeo3w5vQPdGfDg=; b=Dyu5ruKW9tXv 1kSHALoSKi6IrUB69PEpq9NDJdDinbWKC/YJQnpGMbVTAxQ3CxIzFMD7Lx0TUepkuzTkllxYJchxS q7ciw11W8O4FHrUXlPJOVo3vl0UDMk7FQv9MOEkUdnDouU9QJCHw9W7j38Nbd4RXWWpGLT7H0lw9E 9Cv5tYdzxX6wnZnIAlacnBtAD9tbGhvURzhhOSgPXsxUGn5HEjFvBgSzpk7htlPVHbFuFtb1DJ9Md C1Gis9p0zbCj37eAKkTQWjXYrR+kRmbLAlpOpIOIBqiA6ewPtk7+thq625PxoL43EG+M3KBx+TFZY BmYlXefEQsjOuJDKHxWokw==; Original-Received: from [87.69.77.57] (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 1p0era-0006ad-AM; Thu, 01 Dec 2022 03:24:10 -0500 In-Reply-To: (message from Gabriel on Fri, 25 Nov 2022 15:26:49 -0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249611 Archived-At: > From: Gabriel > Date: Fri, 25 Nov 2022 15:26:49 -0300 > > Add new choices 'type and 'file to `bookmark-sort-flag'. See [1]. > > Notes: > > 1) It feels strange to have value t meaning 'name and value nil meaning > 'creation-time, but it's better to not change how things have been > working for many years. A more flexible approach could offer a custom > function as a choice of `bookmark-sort-flag'. > > 2) I took the liberty to update some comments and docstrings, please > review. > > 3) I took the liberty to remove some code in `bookmark-bmenu-mode' that > seems to be unnecessary, please review. Everything seems to be working > as expected according to my tests. I can also write some tests. > > 4) Used `string-collate-lessp' in `bookmark-maybe-sort-alist' to match > `bookmark-bmenu--*-predicate' functions. Is it really a good idea to use string-collate-lessp here? Its effect depends on the underlying OS and the user's locale, so it could produce different and sometimes surprising results. Why isn't string-lessp sufficient? IMO, at the very least, the fact that the sorting is locale-dependent should be prominently stated in the doc string. Also, see the notes in the string-collate-lessp's doc string about MS-Windows, and maybe do what it suggests (if we decide to keep string-collate-lessp here). Karl, any comments? Thanks.