From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: [External] : [emacs bookmark.el] Sorting by last set Date: Mon, 6 Jun 2022 00:39:02 +0000 Message-ID: References: <875ylhvu4k.fsf@red-bean.com> <87a6ar84rn.fsf@elite.giraud> <875yle7ryg.fsf@elite.giraud> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36760"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Karl Fogel , Lars Ingebrigtsen , Stefan Monnier , emacs-devel To: Manuel Giraud Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jun 06 02:41:58 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 1ny0of-0009MP-8D for ged-emacs-devel@m.gmane-mx.org; Mon, 06 Jun 2022 02:41:57 +0200 Original-Received: from localhost ([::1]:39534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ny0od-0000ta-HN for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jun 2022 20:41:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42092) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ny0mH-0007kV-Tm for emacs-devel@gnu.org; Sun, 05 Jun 2022 20:39:29 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:26134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ny0m3-0007R7-Ls for emacs-devel@gnu.org; Sun, 05 Jun 2022 20:39:29 -0400 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 255BLSi9028698; Mon, 6 Jun 2022 00:39:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=oTPxWuZl/F/b8ftyDR4SFLPcEPt8bEDUMLiumwCQOWs=; b=obhXu66lUHzD3lvIV9i5/ewN/74fb2ccK03evCbHMJAPx9X7ct+TDOSboFPg1we62o0I sjCiXcIst5Fd7zA/3ezjjp9SAZ8m+QLNDroISPD3ArTW3uvOfZN7ndO+JQ5jEM31mE37 YU+fqEPd9ikeduC9jG+36jSjE0Kpd5eVbJuW0lc6/waTCArSUQhLDbOTPvRbWrNYAEh5 sXtmRX+eeqnAE9woO/pS8thG9hrjhCqk04lYBk+a0q2JiJ0UMp550Lz2qwJw2nAIJyX9 IJVa/gF2cQt7D2YdzhgmRZE/cp6/xRM9bpK5zP0cNas7MDK5jEcSK1dv+ojLYwATXX9C NA== Original-Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gfyek9u0c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 00:39:05 +0000 Original-Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 2560TpKq018078; Mon, 6 Jun 2022 00:39:04 GMT Original-Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2171.outbound.protection.outlook.com [104.47.57.171]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3gfwu74p1u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Jun 2022 00:39:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GSHKBYri4ErsxJqxj1quPD2HDboWIRzVd4RMntpsBFBKO0LXwrLhVIYaqswqIV7S2K1IFerGBAbj7UWUN25qRtvloFqJI6T54fT4a3AaTe+Qz28I8fnT3UZq7Io8wUd4yUaBOkL82T6w6A07fyqQdODnfd1MIjdwVfEViW7DEBbso7xYDW8QoDrrCyJXHWkI+eDm+ry/Y9Q5LfHGJw2qU/z8TegBsLAS/SzXDkD+rFHl6HA++DJbzf5O3isFy5lbWn016gCLBseY+D9AbVVsa7nHuwNWHoogzvzduG1N3M2EnL/BIPQT4XOgiSDjMYM11v4ZVj7LGCChsstUfrOoEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oTPxWuZl/F/b8ftyDR4SFLPcEPt8bEDUMLiumwCQOWs=; b=NzWP5Ar5+TyBsAqOOub77E0JNwCmq9cCFqPCFCAKb1ZZ2WRAb8YbBRpInt/GWO3J35YO4fmxKua1RRfJH3K27v9MVae0jWobQVuEhfCtA4PXWyGWL34d5HbKe0KqBztOxR0+koqze8PiZWnPt9Khw7wdPg80fdZChUTv/5FfQZEH6hmubROguhv2eJ7IoRxxxXClFJnHjObbMYo1k3tFoqyp4mlIfS1/hUyRg621WMtUDry/F22mgiuLAk5T0CGK1GZVwqjGlKe3hkrikxJeoRWX8OTq96vW73BOm9y++z+K8wdU1Svvpl7k1dzwbjeckPnuUCqMqYhCy9JbyQHSyw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oTPxWuZl/F/b8ftyDR4SFLPcEPt8bEDUMLiumwCQOWs=; b=Ni0pUQtfes+dTbAxUEc1xRrAvOa4SJ9ruti+wi5+vO3JU7Kk6PJyhvUKaV8Vz9wGw3Nd0g60NO2FQmLEl4OXkxU7H8nEAz9DjK5cDfRzILPxOfewx7h7X6zqGePtOvm++Z+EW5kDEuh06lTXIaeKEL3YTglInI2ge7KmAVMSRes= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by MN0PR10MB5934.namprd10.prod.outlook.com (2603:10b6:208:3ce::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.19; Mon, 6 Jun 2022 00:39:02 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::818c:10bf:c1b5:e224]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::818c:10bf:c1b5:e224%3]) with mapi id 15.20.5314.018; Mon, 6 Jun 2022 00:39:02 +0000 Thread-Topic: [External] : [emacs bookmark.el] Sorting by last set Thread-Index: AQHYeT3RyB4YjelGOESG59MIUe0A2g== In-Reply-To: <875yle7ryg.fsf@elite.giraud> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 75c58881-1fe9-4f06-ea64-08da4754f43a x-ms-traffictypediagnostic: MN0PR10MB5934:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ch4Is8J+kloqu1YDkiQiZ2dB1Wx1Q/TXiEYrJfZGIeWSEivuIkaabMWouU2/byOuigsMRgO1u6WBP/BniGaydKw90TQctucwd3OIhEZ3LL2SNHFcrTBon0vV5AGVBDHS9E5S8iLq8aGRCE5+o7s8A2ROz2y7nKDdcqsZ2xXkT3YW6AXyhDwrHD1BmEvyCYxMcAsKEBcPz2fY+S4dzteDGQQoGvUwdnv6iMxRBpZwwxFd2zaq6vqlYgnQVfJFW5bmHJ9ioixqbbJjgOAWebjfTQx8Mvd0TUKAbYTCe778d7FCd07jOiLgWcVlagQpvS7f5auDlNDjOKamk2hAVxHOpVW74PRCgPmxsq00WZWGjbhg5SPdZIWgYngEKgvGQbU4bGHVSzDfrO0Q362LVKAWrPjOQY2treFlv7OqZU4UGsvwwUaFy48pv8+6yGvAzX7CJ2evJiDPzoRC7U+PF6wFlAYtA3Xe0iqhyu6q+h9hAwJ4yR8HWGY05K5duC9JtwoHcdKkYd1X3jZ6lq2zJyZ+Y14y8GudTEWvga6XzxB1kKPSJBn/sMqCWxhymPAz9f+iT3hg1c+4G5GBOrT7kfR/Sxk1e6SyfN5QvUCGIIA5jCSOQ8JjSF6i1ICz04W98XjPWKXPbBlARFhKQRHcVdGRRiA8aqOGk0uIagFAkFCY8rqvr6oIZIGF6yzBl/mPmQlu0nuAdgS4LPnRfxHsomEsyg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(38070700005)(83380400001)(2906002)(55016003)(71200400001)(26005)(9686003)(6916009)(54906003)(316002)(7696005)(6506007)(186003)(33656002)(66946007)(66556008)(66476007)(4326008)(66446008)(8676002)(64756008)(8936002)(508600001)(5660300002)(76116006)(38100700002)(52536014)(122000001)(44832011)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9PYEHdvQIShBuy+q65xccjptqo0nMB7IbgN5UDqmPD1ZdeR8pyRWwcP4B2o2?= =?us-ascii?Q?ItQntMzggmQieBZLSutmysNNl7eXoEQpDb7BcSFP4wAVTxbzBNUPF0K3p68W?= =?us-ascii?Q?7XYMZf2jL4Ej+dswf500Ruep3YyNoQGZ5bfQrFBbuC06p1IZTXaGn+hsman4?= =?us-ascii?Q?mqztquP7yNVhoT1gM4OfvHTELFkdqjmJIp6dAFxZv9uDaffnvWxH8eYa3Eoi?= =?us-ascii?Q?0GeWaZ51ps7tXx7fwfvD1JdvNMp6BlntFuG/oMuu6uInPe0BQ2fe7rClOE9h?= =?us-ascii?Q?LTn0i0ilnRU7tzFc8zbgKCOYVW1cEiFrs5leypCbp741P54nX8NNwq3iXt9Z?= =?us-ascii?Q?2tF2uMBEdKCIiQW5D0N8+aYKgPFTmHG+Htcb3Q0hAG+CM42wPnXO7yp93AQu?= =?us-ascii?Q?u+8c0mmo6CTxIepMe1hm5eYN+11DM/qsz4+zzAoIqymCVorn53g9EB6FLUqQ?= =?us-ascii?Q?knvhcNYW9D2va0mHv+QsfCD3m19e0uq7MK+V7GBgUMZSQu6nzFjG3rYtJKAk?= =?us-ascii?Q?kEcXS9YzhGTEuDYp9Lx+TgYNUekMK0GASLx7MxXZruNDl4LH/YeE1ZYoIBvM?= =?us-ascii?Q?j1yd28uFxGNVy5ohDSsFLhW06vVFUpCbFX1tyUcURiYuCEVMsF3jYG2BaXSu?= =?us-ascii?Q?Yz X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 75c58881-1fe9-4f06-ea64-08da4754f43a X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Jun 2022 00:39:02.6516 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SOtbS2xFixA4NwOwN/Xnbmmo31H7xFRaUgoMGxozWpZr1cDb9aBsnYMkJR+vCdIFb5c0uu6RDpMjTbrXfEtnOQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR10MB5934 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.874 definitions=2022-06-05_12:2022-06-02, 2022-06-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=801 adultscore=0 bulkscore=0 mlxscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206060000 X-Proofpoint-GUID: _fJLC04VeqXdqKEjDg3mldaKIh95fMld X-Proofpoint-ORIG-GUID: _fJLC04VeqXdqKEjDg3mldaKIh95fMld Received-SPF: pass client-ip=205.220.177.32; envelope-from=drew.adams@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:290756 Archived-At: > >> I propose 'last-created ... > > > > Would you please use `created', the same field > > name that Bookmark+ uses? Occam's razor says > > not to complicate things gratuitously. Why > > not use the same name, for the same thing? > > > > There's only one creation of a given bookmark. > > It makes no sense to talk of a "last" creation > > time. >=20 > Yes of course. But in what I proposed, 'created > would only be a possible symbol for > `bookmark-sort-flag' (or new name), nothing more. Sure. But what, besides sorting, are you thinking of? Are you thinking of sorting using a composition of predicates? Sure, you could skip that. With Bookmark+ you can compose predicates, but nothing obliges you to. > > Please see what I wrote in my previous message, > > if for no reason other than it provides useful > > food for thought. >=20 > I've read it. But I think that for the bundled > bookmark.el having a predefined set of sorting > functions could be enough. >=20 > As for composability of sorting, I think keeping > it to "one at a time" could also be enough. Each of the predefined sort orders in Bookmark+ in fact uses a single predicate, not a composition. You could incorporate some of the same, or similar, predicates in `bookmark.el'. The default value of `bmkp-sort-comparer' is, however, a composition: ((bmkp-info-node-name-cp bmkp-url-cp bmkp-gnus-cp bmkp-local-file-type-cp bmkp-handler-cp) bmkp-alpha-p)=09 That sorts by bookmark _type_, for some predefined types, and for other types it falls back to sorting alphabetically by bookmark name. It corresponds to command `bmkp-bmenu-sort-by-bookmark-type', which is bound to `s k' in the bookmark display list ("k" suggests bookmark "k"ind; `s t' is taken by sorting "t"agged bookmarks before untagged ones). But your option could support only a single pred. A comment even suggests this: ;; An alternative default value: `bmkp-alpha-p' And as the `bmkp-sort-comparer' doc I sent says, You can also convert a PRED-type predicate (which returns (t), (nil), or nil) into an ordinary predicate, by using function `bmkp-make-plain-predicate'. That lets you reuse elsewhere, as ordinary predicates, any PRED-type predicates you define. > And for users that need more there is Bookmark+ If bookmark.el provides something then Bookmark+ need not provide it. ;-) Bookmark+ exists because the features it provides weren't wanted by Emacs.