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: Sun, 5 Jun 2022 17:33:50 +0000 Message-ID: References: <875ylhvu4k.fsf@red-bean.com> <87a6ar84rn.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="7619"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , Stefan Monnier , emacs-devel To: Manuel Giraud , Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 05 19:35:30 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 1nxu9y-0001kM-49 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jun 2022 19:35:30 +0200 Original-Received: from localhost ([::1]:42212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxu9w-0002go-E1 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jun 2022 13:35:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxu8Y-0001pl-4q for emacs-devel@gnu.org; Sun, 05 Jun 2022 13:34:02 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:25524) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxu8U-0002vA-Kx for emacs-devel@gnu.org; Sun, 05 Jun 2022 13:34:01 -0400 Original-Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 255HFima023862; Sun, 5 Jun 2022 17:33:54 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=LfChBI5AXOnjQWx2EvFe0asd5wMG/KjeDwJriIHViXA=; b=AKJoerItNH+nIN8Qmly/uPcf14z38I3RrgSF8yVkuUZL/eatzJ16+wi0WTSbSFBUc4oe Q+VKfVd7pXsbilb4I1B/T00FpKG7qbu6Sc663+nY4Od/79MZi2TBQDEA04YKAZ20/1O2 99J86Mgli3uOEt07PZSP6x7RU5AvsAwQkJHcemEE3MmA5BgySIF99oi7gv00bxYdGx8h l8EMcXenJ3jYOtC40uBhjKk3jE0G6vcmbiAvRoW1/VoTbzGARnuXGbz6BlxUD/D6tx6P UgYZyYwBRcq/h3Yal3pEvWEBXNnhCl8rHs0UUfyLJIafAIwlxZwyMX40bjkpaAGWM18r MQ== Original-Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3ggvxmr5a2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 05 Jun 2022 17:33:54 +0000 Original-Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 255HURSH036344; Sun, 5 Jun 2022 17:33:53 GMT Original-Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2040.outbound.protection.outlook.com [104.47.56.40]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gfwu0kk4e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 05 Jun 2022 17:33:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ShQFpb3yN1IIamqddyumBqj7H0BLtfLul83aYuTj98D7lBWMHX+hu212EoPA29wrnBjve9l7rfbSUU7qSCv/C02prdio8ZtbqQv9goUTIosXG7iv6sdZ2ZV/7QfK/ks5iRIN+lvuDgYbIIjYIl+/0bRbKg1/ynvfXlan4A4XMzZ0NcgJD/TsAXdiQctDKR7eqE5xBb1XL9hpxmnJ6ywMSdnZSnVGpa+pF5Jsc1kTiE7+rIdnl17d5jMgi40XOD+PTXLhR9sdxXMe43uHrQ5xMd2fkBFrfm+fFVkAMKfP5Yntf5Br64lkiTXdBj2p8/nXQN+1jc+Jp7PLkeL7mBfY9Q== 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=LfChBI5AXOnjQWx2EvFe0asd5wMG/KjeDwJriIHViXA=; b=ZY6DEfFKUmmOyZecK7rMIjLYySyEhLML+90zkpu0NZJZmx/zzOP8SqZA8a9JYZmG5cugYBrhImgXlQHx2B9gRH0SzPDA9zvH+7k12s6moAEnoesuPNBwBYogOuwFocgswu2Z6rnFcJYQidkWv9E1zP3rMPnBwieuqtWz08jnOf4QPNM4zK8n3q89NlHJTqXR1EeP1H9ekUdxgG7bB6a/YX2++n6vIizG/7bfiw01Mz7ZJILXuWu32MQWvnrQNKKfDgDf7+681DfGyU2c0HAT/rpWMwp7HVRFJkzlqwkQvDOm71k1pwQKlXSrjUU5AA3EfohsQhg2RKatFr86Du/YLw== 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=LfChBI5AXOnjQWx2EvFe0asd5wMG/KjeDwJriIHViXA=; b=owXb+u0nf97HFBxdYFigY5agTsnDVKFKEzAyP/RirKvXiiU7Zy0QadXIfIEISZqEtVUQNbfC7rigA/cFd88M4HSOnrLD9bOiO9pnEhT6r+yXk2tLwPPanWUwWMsxJjsp4K608wLjH27xHTNa2zqTWkv/aihjMhHyPqjwNoNKwDY= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BL0PR10MB2866.namprd10.prod.outlook.com (2603:10b6:208:30::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Sun, 5 Jun 2022 17:33:51 +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; Sun, 5 Jun 2022 17:33:51 +0000 Thread-Topic: [External] : [emacs bookmark.el] Sorting by last set Thread-Index: AQHYePercW+LIHZRVU2D0lI8BVl7ka1BB45A In-Reply-To: <87a6ar84rn.fsf@elite.giraud> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 33b1b63d-13b8-470c-4f5c-08da47198e13 x-ms-traffictypediagnostic: BL0PR10MB2866: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: OGjmDhCLx8O262qiJ58QhOzhdSYy9SJC/DvRWZNda52GdlO1ld+JbvOf42EleGgAAZFo4hOEaK1NwB1zFP+6Gt7p93hAuBTPsB5zT3WkIkjJ5nXyoGhrUT+RN10Q9hDd0Tz/RaQ0Xno6QooPtRnJgI++xAbm6Y8vII9E8scET12cQLcZbZFvhpA336QMwoBPJ/CZpCN5tB5gr3Pezku2lv8gIXcP42zQjfYcslycyNz/ICxFnjBRppLm41wDE53aRQhSz6fgjXKD/uRMH1o8tdL1C4trmSGzqf6rWqv0u2ibu9zxSMbwlhW4KRVvmtKS12PUfAebWuEh9O+ypa5kZog4xnh/9HXwjAJP6c/If+d/Wns+Yj0jt8X4IypChmDQJEv8oRCDALy8PBzg183ZbB9143UNU/pFW4oWYFMcSC++bV224Ly4pdx0QTltg75ko2aTPbGOCyTX/IWjWy2VtJgb4SpUG8T3Zz9OXBcpCe1JlRUtHdadGTwpg5dDoqBtlKBtFwVKTFYeLUnCTI6A73fpFyPfvQpdynEL8I+mtBc38MWtlFjOBnC835zVUQuIhLdLfXBvZHnQOQ//FkraEQUws58mKOOM87BcY6wP49BXgtZamg/fo8RQlZoYTtdpV9DWcsFQAZWneMRW84uKs3NvWdIfGRD0HrbRFX5vOzSirsOwngBA5jhJEozy283NfImSI1Li0/7F99ExRRgcwA== 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)(316002)(6506007)(86362001)(4326008)(76116006)(8936002)(186003)(66946007)(54906003)(66476007)(71200400001)(66446008)(64756008)(66556008)(5660300002)(508600001)(83380400001)(2906002)(110136005)(55016003)(7696005)(38100700002)(8676002)(9686003)(26005)(33656002)(38070700005)(52536014)(122000001)(44832011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?RdxEX/hFXJnUOUNv6IHatGr/jK6Atz75P5OmZVt4l9AGXDTv+QBzbDPTZUU8?= =?us-ascii?Q?F3rCziOJlga4i7n7JusGzLyza9I6UIKzUapL9yv1mjIiPDChk3jkeYIzwQU6?= =?us-ascii?Q?lVdbqgA0lQgHxoxwctAAO3vPkjrf8jk8XWD7DDpk86e9AwdllqEcOXko/mk4?= =?us-ascii?Q?myoBRpbQ1gTFgXbSsVCBlXc/MsHIXa5I/jMi/lzoXOQ2sMsppQoSQvzOeL88?= =?us-ascii?Q?nXumnQk9OQAXskbhqgW7DMRfGNhOQwSK74A3+0X20A6OmxgjblOTkiB4xW3S?= =?us-ascii?Q?JzlkU7rzsNLPSCXRUvLLVJ9H4VT/DifUeQt3Xt59drp78cdDJqXStV6E5Kj2?= =?us-ascii?Q?KfriOi66MRXt4Wgv+QmCzk1uzCRiPD8dB5B7kEy69QVPgxXz+XcyoJd7f/3C?= =?us-ascii?Q?76Fuw0utJL8kkd4NPmOan3UQ0WqSyy24w9yoTp8+gHLdQqn2Nu/QEcklGmd5?= =?us-ascii?Q?CCG9e6lz4rlVEJF6JY6zaQwuQ+60S/XauKoyn3EzjU8JMzT+32OAJi77UsfB?= =?us-ascii?Q?fuj9P3XiXJdhXw+b/Oe15cn8uOX6+AvCMFMxOavac9v9DZp/22+sghVdQcGq?= =?us-ascii?Q?mN+rg/OVHGxnKyi3qXVWLsgwCE4VmFACbXLjDvMTbj+IHBgkiZqC95FVVzti?= =?us-ascii?Q?s8 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: 33b1b63d-13b8-470c-4f5c-08da47198e13 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2022 17:33:50.9419 (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: 48hoH1hcSot1hgwis2OnqI7MDkP9gebDWZ71r9dF9qcccxl0tJsTV0XM8Iw2msk+COEcW6AwDfZyCWTKHc6R0g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR10MB2866 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.874 definitions=2022-06-05_09:2022-06-02, 2022-06-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 adultscore=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206050086 X-Proofpoint-GUID: GmrbZWYU4MDgzTX-0jYri47IgsgPRKdx X-Proofpoint-ORIG-GUID: GmrbZWYU4MDgzTX-0jYri47IgsgPRKdx 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:290737 Archived-At: > > But there are other ways to "modify" bookmarks: for example,=20 > > you could edit a bookmark's annotation without updating its=20 > > target. One could make a reasonably good argument as to why an=20 > > annotation change should count as a "modification" for the=20 > > purposes of sorting... and, one could make a reasonably good=20 > > argument why it shouldn't. > > > > My purpose here is just to ask: is the name "last-modified"=20 > > really the most appropriate one for the behavior currently=20 > > implemented? I can't speak to whatever behavior you've currently implemented. But why would _setting_ a bookmark be the only modification that you want reflected in such a property? And does this "setting" include RE-setting or just initial setting (which I guess is about the same as creating)? If resetting's included then which kinds of resetting? Does relocating count? Just repositioning (manually or automatically)? Renaming? Changing properties manually (e.g. editing), or by code? Just what is "setting" for your "behavior currently implemented? And why is that the most useful/appropriate behavior for such a time/date bookmark field? You're not implementing something offhand. You're changing the basic bookmark data structure. It's worth thinking about. Other ways to modify (beyond "setting") are not at all limited to adding, removing, or modifying an annotation. That seems like a straw man, to make it seem like all that's important wrt modifying is setting. But even just an annotation edit is a change, and it might well be significant for a user. Let's not belittle modification other than setting. If you're going to introduce a last-modified time property of some sort, I'd suggest that, by default at least, it be updated for any change to the bookmark - maybe even automatic repositioning. But including automatic repositioning could be a user decision (e.g., a user option, off by default. Better is to have a (list value) option that can cover all predefined kinds of modification. > > The simple solution would be to just change the symbol to > > `last-set-date'. I think that would be my choice. It would > > reduce the potential for confusion and misunderstanding. >=20 > Yes, I forgot about annotations so I think `last-set-date' would be > better. I could prepare this simple patch. See above. What does "set" mean, and why is it (whatever it means) important to the exclusion of all other kinds of modification? > > * Now that we're using a symbol for *one* possible value of > > `bookmark-sort-flag', should we use symbols for *all* possible > > values? (And leave the treatments of `t' and nil as legacy > > compatibility behaviors, documented as such but deprecated in > > favor of using the corresponding new symbols instead when writing > > new configurations.) >=20 > Why not... but we have to settle for good symbol names. I propose > 'last-created (as nil) and 'alphabetical (as t). 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. And time is about all that a `created' field could usefully record - it's understood. > I prefer `bookmark-sort'. Please see what I wrote in my previous message, if for no reason other than it provides useful food for thought. You (plural) are just starting to see the value (usefulness) of different ways to sort bookmarks. There are as many ways of usefully sorting as there are kinds of bookmarks. No, - as there are _combinations_ of kinds. No - there are many more useful ways to sort than even that. You've already noticed at least two kinds of time (created, modified) and one kind of syntax (alphabetical). You cannot know what ways to sort will be useful for this or that user in this or that context. Users should be given an easy way to define their own sort orders (sorting commands).=20 As experience grows you'll see that a general and flexible approach to sorting is called for. Again, I invite you to look at what Bookmark+ offers here - and again, at least as food for thought.