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: Sat, 4 Jun 2022 16:25:45 +0000 Message-ID: References: <875ylhvu4k.fsf@red-bean.com> 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="31299"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Manuel Giraud , Stefan Monnier , emacs-devel To: Karl Fogel , Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 04 18:26:54 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 1nxWc1-0007vM-QD for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jun 2022 18:26:54 +0200 Original-Received: from localhost ([::1]:38938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxWc0-0003vi-3m for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jun 2022 12:26:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxWb8-0003Ei-9y for emacs-devel@gnu.org; Sat, 04 Jun 2022 12:25:58 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:5000) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxWb3-0002tF-Sd for emacs-devel@gnu.org; Sat, 04 Jun 2022 12:25:58 -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 254Fmd8I017428; Sat, 4 Jun 2022 16:25:49 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=ZY8pjhG6RmyRQhcRGngu7MTY6sL8o67QyNbPJ4A3SCE=; b=x0iKsFXD+ZcpxwXk7sRRyF553rXmkN42360xcqBBTQP4dFINJGCAkWzhNVnKQRMvxCv0 X6fWVsFH1B3AiLD+rYCEt2Z0aUVKubs79mBFyzddMCnRGlZtpenTyIYjBV9ef9SR/a6s Vm8U1IWRYEfPRF3bAgz+cCShPp4FbIhCXYpxQuHHmj4BnR9PvLfkTM0hDQ/TYQy0rcIF wGdllTJgkCZuJmoT2nsbJcMEMeat8HH5Dn8Xv7meoQJcK/L01ilV5a7u8zlavMhaXDZ7 O9+R9xh6Z7/2hkYdf8lwUeH4dplmUAg/T4JeCHo2dF2sfwT4dzqptW5MVBNCiJfJEup0 0Q== Original-Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gfyd6gjda-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 04 Jun 2022 16:25:48 +0000 Original-Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 254GPmvK020564; Sat, 4 Jun 2022 16:25:48 GMT Original-Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2046.outbound.protection.outlook.com [104.47.66.46]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3gfwu09qvh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 04 Jun 2022 16:25:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=htFcLw+FJePP1adyH1bJ0k1d6tazZDfYZiSjeDvEJFJ88nr8yxaBnbWUkdO0lCMhPCgTFmyE97RMHIg2ZdcpA8o+TvufLuVb0pDtp+oXKP5FrxlYUGCuwj6lV8U/L3uSzY0d10hZnD27nj/+6DMFgbaKQ26Vqb8JQrbFHJcDN1W230iiMA8o/ZMSrfb77Hz3N0c8WaTYFFnX/Xr5HXxrhwHGmSldup7UuLQThXF73xXHxU+9fh/rUrwwSyFEX3EWpRWu6Z7yFvrU/7xFFDsmkoKVkGeWRxOgtX6q/j60v7aNqpakRJxG41UPNRpXfT2Xi5U5xMaTJJoBgw94QZQjiA== 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=ZY8pjhG6RmyRQhcRGngu7MTY6sL8o67QyNbPJ4A3SCE=; b=bg6n48vWeISkWdifxiKDs152/q8Eh+l1O3Az80ErLgU6F34J7B1bNur8e/2NVZpCpU3HMlUO0ru+y7iXUXAJd0g8Qe7M1kShgO2PqERi6xvv4RkzjIfO4l3Nd6iGvbe0A7tMb3fq/0AFTfTYyLoTxupZHA79RAWy9sDVMSCCfh9O4d7+FiVK3oEg/yimH06nfn32u1IDegArb3nS3Ysyy4bE+STzE+WRXs41oTC3g8TjgF7jsdsOkgH1nydTBnBpo82sGDQg7drzaHuRd8uEtzoifUYAIp6dwkWKA5712FPToq5V1mByt01X2RGMVGGx54wBoFTT6GHP5ezszJ2SiQ== 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=ZY8pjhG6RmyRQhcRGngu7MTY6sL8o67QyNbPJ4A3SCE=; b=BMCVZsQe0xwPtMsqyTlWLvD49NBx3BBusJlCc1u1hufSXOidTvnhJPvNAOJHKbSnM1ZlWfCI+CFFn+v9xP6EOTGfOIhkSznkBTtFZ6RdTzq/iNcp6G1EOi+1U9IpFG4azjiBsQUk2xgrR0zfi3RDKjZz9LIxSRDhas0tf4MWbP8= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by CH0PR10MB5001.namprd10.prod.outlook.com (2603:10b6:610:c2::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Sat, 4 Jun 2022 16:25:45 +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; Sat, 4 Jun 2022 16:25:45 +0000 Thread-Topic: [External] : [emacs bookmark.el] Sorting by last set Thread-Index: AQHYd9l0htZc+bsRLE68xA+hn1ACxK0/ZlhQ In-Reply-To: <875ylhvu4k.fsf@red-bean.com> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 74a04c41-f52e-49b5-f6aa-08da4646e0a8 x-ms-traffictypediagnostic: CH0PR10MB5001: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: NZWveFnGJdw5qj1lhAdpiXsAs3tBLdtgpvW2i3gNexWzkhg/GwjKppmYz92RfDox43CfP9qpy3Pv9Guj05okMetXX2NdZBzYewSKTleZ4L5/GUMrgU3BDugknSNcloTOMmTjhxM7HwMIgJdJscAGXJQFK8whJ3N767WiataaJKwwndQGsoRStyA00ygkNbUhcelwOUXOAMWA5Y/m2NmxDBaIganVD2GbTc+tmdbPRjaH7R2YURqxTiJj5bsLzOksZsojTPSyEMarCExGKb90ziYRuuiFNerGyNbXeLA0OFb4RsI2x+kBKSOveRWqCU3ZqWm/tqsGBKdmk1/rkiZsM1VcFuCyb3HgBsG4tdyZ2zSAFOSwv8mEioC6Rkh/7aF1olu5kiDKAlGtSqCTKEPqLjystvFAwPgyUnTBN/2PtalXtsdxE3M2Xj9JD1eJPkg7mIOogbmRHzJXR+XK0uXIfngz4Nvtngo3AWNoRLpWyg3mPF4L1CPk3rAF+WDi/V9MPYUvq4CfxsQjfsRjBI1oJaps2gEYgoZfZ5gLkJk3nxM11bPtDF/rD+bvCnv3XahYp5tomNFH+lkMA7PjrSH9yT1cmmcoQRgli4tGA7w8lWOI7GmYXvV/TOvtUU3EhYubn0BACqfKw2YrbxhliyyG16jh4JW3ERpB2XgEjI7lLUN/W2OWd8bzmtbxs6Kec2dXQgGQHDGAi/Cj9uSZbPBvWisXonZK2zk4jXQfoSkeO6iibMJ9BBMmJ/ttKPotD paoMzz6XgxrPyXNk8GlUi7WAeSC5FPNrbqB+nSLnvzoK2A= 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)(966005)(5660300002)(122000001)(66946007)(186003)(38100700002)(38070700005)(7696005)(8936002)(508600001)(71200400001)(33656002)(55016003)(64756008)(66446008)(76116006)(8676002)(66476007)(52536014)(66556008)(2906002)(54906003)(110136005)(9686003)(83380400001)(44832011)(26005)(316002)(6506007)(4326008)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?mxMe+n3/YFJ8B3V7oURF+KnZ6vC0L5SBOoF8nVmKljG1800LZTdG2gHVZHFW?= =?us-ascii?Q?XmG1bXOrUH001R9YEl3KOOJGBqKpUWJUJcdSyw8Z+BXHwUqaWbydB8yIX0IQ?= =?us-ascii?Q?Emvupm3E747DnvN1bTfMPlZRgqwh8ior7p1wsW79DGtwu7DCNSSskIaTYzUG?= =?us-ascii?Q?EXZs0gR/IYWeW3y/R/cK0g9hGvQF1/JR7l9X+8UBXz4c8CvVTb7V3ctt4SI7?= =?us-ascii?Q?f18Axr7XqRGeoMawm7iYR0Tt0FCUBOW7IQm9wBEWIz2+7z/nWUCX3MUr/4zN?= =?us-ascii?Q?HTRq93Y1POpSPMuqfUrvgi/qU16ZCowTM+iYpqrqfMpUu4W6h5N2DEYzq8zX?= =?us-ascii?Q?sr28eTHcNyVBcGbw1Fp+ybEBoQg9uQFaEaCc1LKgW37eejnqTztWQOXb3ACk?= =?us-ascii?Q?VL+GohzuzZTZxN5ieILCcyNnSH+se85ztWOeL6y9N8WW7W7uNzxNVxNdhJQH?= =?us-ascii?Q?7kvYgGDU/U7Thlbyvf+PC/e2D5FFlvsIZPKSUaY++j/j6pCYrph/dFXmDBN6?= =?us-ascii?Q?p0TDJflCiJSd+4PCZyeQIU53U0auYMOeG3FNj/RsB8EPemJWdgfnrwkmneAs?= =?us-ascii?Q?2WxbcZAb4TkqvQALsE+pgJmx/oZxUOH/r0KnPvYkto4gi5k1hD3M6Oy2mSf0?= =?us-ascii?Q?N/ 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: 74a04c41-f52e-49b5-f6aa-08da4646e0a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2022 16:25:45.6859 (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: rWxye/0WYJQHJhole7Y5yAQZp4wtsAVp6my92cWE8szu1KU/JriwJoyo0joycxCOt588EPTGE7mA2VFJshmYUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5001 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.874 definitions=2022-06-04_05:2022-06-02, 2022-06-04 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxscore=0 adultscore=0 spamscore=0 suspectscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206040077 X-Proofpoint-ORIG-GUID: RbWMt0DxeAzGs9BBl5kQDcEv1syCcuri X-Proofpoint-GUID: RbWMt0DxeAzGs9BBl5kQDcEv1syCcuri 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:290662 Archived-At: If you decide to consider renaming and redesigning bookmark sorting to some extent, then I invite you to consider how Bookmark+ handles it, as food for thought. This doc section describes its approach to sorting: https://www.emacswiki.org/emacs/BookmarkPlus#SortingBookmarks (I've also put a plain-text version of that text at the end of this message.) I suggest you read that _first_, as it gives an overall view of sorting from a user point of view. But below are two doc strings that may also help. And finally, here is a page that describes the "apples & oranges" approach to combining sort predicates that Bookmark+ uses: https://www.emacswiki.org/emacs/ApplesAndOranges ______ Doc of macro `bmkp-define-sort-command'. It defines commands to sort the displayed bookmark list (buffer `*Bookmark List*'). bmkp-define-sort-command is a Lisp macro in 'bookmark+-mac.el'. (bmkp-define-sort-command SORT-ORDER COMPARER DOC-STRING) Define a command to sort bookmarks in the bookmark list by SORT-ORDER. SORT-ORDER is a short string or symbol describing the sorting method. Examples: "by last access time", "by bookmark name". The new command is named by replacing any spaces in SORT-ORDER with hyphens (`-') and then adding the prefix `bmkp-bmenu-sort-'. Example: `bmkp-bmenu-sort-by-bookmark-name', for SORT-ORDER `by bookmark name'. COMPARER compares two bookmarks, returning non-nil if and only if the first bookmark sorts before the second. It must be acceptable as a value of `bmkp-sort-comparer'. That is, it is either nil, a predicate, or a list ((PRED...) FINAL-PRED). See the doc for `bmkp-sort-comparer'. DOC-STRING is the doc string of the new command. ______ Doc of user option `bmkp-sort-comparer'. It holds the default value of the predicate(s) that do the sorting.=20 bmkp-sort-comparer is a variable defined in `bookmark+-bmu.el'. Its value is=20 ((bmkp-info-node-name-cp bmkp-gnus-cp bmkp-url-cp bmkp-local-file-type-cp) bmkp-alpha-p) Documentation: Predicate or predicates for sorting (comparing) bookmarks. This defines the default sort for bookmarks in the bookmark list. Various sorting commands, such as `s v', change the value of this option dynamically (but they do not save the changed value). The value must be one of the following: * nil, meaning do not sort * a predicate that takes two bookmarks as args * a list of the form ((PRED...) FINAL-PRED), where each PRED and FINAL-PRED are predicates that take two bookmarks as args If the value is a list of predicates, then each PRED is tried in turn until one returns a non-nil value. In that case, the result is the car of that value. If no non-nil value is returned by any PRED, then FINAL-PRED is used and its value is the result. Each PRED should return `(t)' for true, `(nil)' for false, or nil for undecided. A nil value means that the next PRED decides (or FINAL-PRED, if there is no next PRED). Thus, a PRED is a special kind of predicate that indicates either a boolean value (as a singleton list) or "I cannot decide - let the next guy else decide". (Essentially, each PRED is a hook function that is run using `run-hook-with-args-until-success'.) Examples: nil - No sorting. string-lessp - Single predicate that returns nil or non-nil. ((p1 p2)) - Two predicates `p1' and `p2', which each return (t) for true, (nil) for false, or nil for undecided. ((p1 p2) string-lessp) - Same as previous, except if both `p1' and `p2' return nil, then the return value of `string-lessp' is used. Note that these two values are generally equivalent, in terms of their effect (*): ((p1 p2)) ((p1) p2-plain) where p2-plain is (bmkp-make-plain-predicate p2) Likewise, these three values generally act equivalently (*): ((p1)) (() p1-plain) p1-plain where p1-plain is (bmkp-make-plain-predicate p1) The PRED form lets you easily combine predicates: use `p1' unless it cannot decide, in which case try `p2', and so on. The value ((p2 p1)) tries the predicates in the opposite order: first `p2', then `p1' if `p2' returns nil. Using a single predicate or FINAL-PRED makes it easy to reuse an existing predicate that returns nil or non-nil. 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. For example, this defines a plain predicate to compare by URL: (defalias 'bmkp-url-p (bmkp-make-plain-predicate 'bmkp-url-cp)) Note: As a convention, predefined Bookmark+ PRED-type predicate names have the suffix `-cp' (for "component predicate") instead of `-p'. -- * If you use `s C-r', then there is a difference in behavior between (a) using a plain predicate as FINAL-PRED and (b) using the analogous PRED-type predicate (and no FINAL-PRED). In the latter case, `s C-r' affects when the predicate is tried and its return value. See `bmkp-reverse-multi-sort-order'. ________________________________________________ Plain-text version of doc section about sorting: (@* "Sorting Bookmarks") *** Sorting Bookmarks *** Filtering hides certain kinds of bookmarks. Sometimes, you want to see bookmarks of various kinds, but you want them to be grouped or sorted in different ways, for easy recognition, comparison, and access. Bookmarks shown in the bookmark list are sorted using the current value of option `bmkp-sort-comparer'. (If that is `nil', they are unsorted, which means they appear in reverse chronological order of their creation.) You can use `s s'... (repeat hitting the `s' key) to cycle among the various sort orders possible, updating the display accordingly. By default, you cycle among all available sort orders, but you can shorten the cycling list by customizing option `bmkp-sort-orders-for-cycling-alist'. You can also change directly to one of the main sort orders (without cycling) using `s >', `s n', `s f n', etc. There are many such predefined sort orders bound to keys with the prefix `s' - use `C-h m' or `?' for more info. `s >' - Sort marked (`>') before unmarked `s *' - Sort modified (`*') before unmodified `s 0' - Sort by bookmark creation date/time `s b' - Sort by last buffer or file access `s a' - Sort annotated (`a') before unannotated `s d' - Sort by last bookmark access date/time `s D' - Sort flagged (`D') before unflagged `s f d' - Sort by last local file access date/time `s f k' - Sort by local file kind: file, symlink, dir `s f n' - Sort by file name `s f s' - Sort by local file size `s f u' - Sort by last local file update (edit) date/time `s g' - Sort by Gnus thread: group, article, message. `s i' - Sort by Info manual, node, position `s k' - Sort by bookmark type (kind) `s n' - Sort by bookmark name `s t' - Sort tagged (`t') before untagged `s v' - Sort by visit frequency You can reverse the current sort direction (ascending/descending) using `s r'. Also, repeating any of the main sort-order commands (e.g. `s n') cycles among that order, the reverse, and unsorted. For a complex sort, which involves composing several sorting conditions, you can also use `s C-r' to reverse the order of bookmark sorting groups or the order within each group (depending on whether `s r' is also used). Try it, for example, together with sorting by bookmark kind (`s k'). Be aware that `s C-r' can be a bit unintuitive. If it does not do what you expect or want, or if it confuses you, then don't use it ;-). (`s C-r' has no noticeable effect on simple sorting.) Remember that you can combine sorting with filtering different sets of bookmarks - bookmarks of different kinds (e.g. Info) or bookmarks that are marked or unmarked. Finally, you can easily define your own sorting commands and sort orders. See macro `bmkp-define-sort-command' and the documentation for option `bmkp-sort-comparer'. (Bookmark+ uses option `bmkp-sort-comparer'; it *ignores* vanilla Emacs option `bookmark-sort-flag'.) Of particular note is that you can interactively define commands that sort by a given list of tags - you use keys `T s' (command `bmkp-define-tags-sort-command') to do that. You are prompted for the tags to sort by. Bookmarks are sorted first according to whether they are tagged with the first tag, then the second tag, and so on. Otherwise, sorting is by bookmark name. The tags you specify are used, in order, in the name of the new command. For example, if you enter tags `alpha', `beta', and `gamma', in that order, then the sorting command created is `bmkp-bmenu-sort-alpha-beta-gamma'. The new command is saved in your bookmark commands file (`bmkp-bmenu-commands-file'). Note that because you can add a new tag to all bookmarks that have some given set of tags, you can use that single (new) tag to represent the entire tag set. Sorting by that tag is then the same as sorting by the tag set. You can of course use overlapping sets in the composite sort command. You can, for example, sort first according to tag `tag1', which represents the set of tags `alpha', `beta', `gamma', `delta', and then sort according to tag `tag2', which represents the set of tags `beta', `delta'.