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.bugs Subject: bug#48179: [External] : bug#48179: bookmark-fontify [PATCH] Date: Fri, 7 May 2021 16:22:09 +0000 Message-ID: References: <20210503001358.mjafsjlumdamrlvh@E15-2016.optimum.net> <87zgxcdzh3.fsf@gnus.org> <20210503091204.qhc2tda76wh6345w@E15-2016.optimum.net> <87im40cgxz.fsf@gnus.org> <20210503095828.66mcqkxyznb2vdja@E15-2016.optimum.net> <87v97yan85.fsf@gnus.org> <87pmy5io91.fsf@bzg.fr> <87a6p8fdrq.fsf@yandex.com> <87o8do1bs2.fsf@gnus.org> <20210506102416.u2ykzjtwffbfveis@E15-2016.optimum.net> <87tungdtr2.fsf@yandex.com> <8735uyvldl.fsf@gnus.org> <87mtt6slam.fsf@yandex.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="33683"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Bastien , Boruch Baum , "48179@debbugs.gnu.org" <48179@debbugs.gnu.org> To: Colin Baxter , Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 07 18:25:23 2021 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 1lf3I2-0008cr-MR for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 18:25:22 +0200 Original-Received: from localhost ([::1]:38382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lf3I1-0005x6-OM for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 07 May 2021 12:25:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf3Fm-0003VX-R9 for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 12:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33222) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lf3Fm-00047D-FK for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 12:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lf3Fm-000072-B7 for bug-gnu-emacs@gnu.org; Fri, 07 May 2021 12:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 May 2021 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48179 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 48179-submit@debbugs.gnu.org id=B48179.1620404545372 (code B ref 48179); Fri, 07 May 2021 16:23:02 +0000 Original-Received: (at 48179) by debbugs.gnu.org; 7 May 2021 16:22:25 +0000 Original-Received: from localhost ([127.0.0.1]:44761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf3FA-00005v-Kn for submit@debbugs.gnu.org; Fri, 07 May 2021 12:22:25 -0400 Original-Received: from aserp2130.oracle.com ([141.146.126.79]:46736) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lf3F4-00005l-Vi for 48179@debbugs.gnu.org; Fri, 07 May 2021 12:22:22 -0400 Original-Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 147GJpqc135568; Fri, 7 May 2021 16:22:12 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-2020-01-29; bh=nfA2sNRaU8uVcqZ55EthhArEiiMNBmHrBkmgLYoJzMs=; b=RJwEkTUJWJN1k9vap7vkEhqCRR6qOXIc3Z3suDy1yT3kbj5EyMrZUlXVu8yHuJn/y8Yu dabop4Jj6wBLtOYnKDBd7Oz4wDw7tVRyEjMsK9oz07Rt6bjRnPtoyAEarr0yWIWM/A71 P5aSJMuK9+0Z1ngg2o2GeEgiluLTy8XQnFvP+4oztmTAJAP5Fu/5bcfmYj2Sz1UZ8y1o p0zn6Jq9nYEEFzAvpmmnz4lE5ZHFKUpksB2MOyjzuTfOaENISZyjLpXUAtQDiHhgF7e+ w6GDOjPi8wxs8y06nHsZ7aFV2mP9UPKlGeKNTRh4xx+91leim3TPPeBU0nKvFLrRhkHN jw== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 38csrda6e4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 May 2021 16:22:11 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 147GLoFM133179; Fri, 7 May 2021 16:22:11 GMT Original-Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2175.outbound.protection.outlook.com [104.47.59.175]) by aserp3030.oracle.com with ESMTP id 38csrf9115-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 May 2021 16:22:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nGWWDlqjkck7Sl20UDqLFemewEUqDKmxsTQRfZ8wl/2TJMo/ysSnZTLkwWjhLnnnAVWU2LEccdDkp1zPCG8HN3bYyMLMjdZ0eKtEru0A9ZzBZyehLoUqHfhHP/DCp9II9nCvVSyz/mFZLaMUARkwUAwWucqUuqsDWvEHnV74As7BfH/VP2hggybHjEAXxkl+IjopL2+FoGCaDFUFYztotb7Bd+Fqc42pBNRjEiZtrsdWTzU6rbduUDDOZochp44z+7qprZj92yZBDEvlJZ0SAJJavQKLS1JXNNI5nn+OxWRm7Ksb7DUSjsSp4RyI0AuXmLpgon+7n6oivSerlN9OEA== 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-SenderADCheck; bh=nfA2sNRaU8uVcqZ55EthhArEiiMNBmHrBkmgLYoJzMs=; b=D+PrI9cYb0qu1dSp1VxkZgfLmraOJugjUtJSvL7TUpByMAbkhLUorUCgDGP3t+Bvx/qf3pV5nPnGBb5vQmwUI7XTQSF03Xaxs+tkoJdrwrTRYqGw28qfRHqD/bw5cA6e4LxBNqR44h3QFYyNTPTQOqst27xrdhUYJwy3A7mYjpG5kdSsykGm18K/Bmfbw+kzFGoK/6v9zJW6P+Sf9Esz0N7AuvO/9pMROoHdWl+1zoZS0y/+mW9Hov3WRlGUMwcq7t5vFAnXGFlw0jr9pqPiU+h+0hq1b8kpTwK48wtl1DZde/JCvjn+mtabfmGFRh7a9gPFWT46pFPMt/i89lbOsQ== 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=nfA2sNRaU8uVcqZ55EthhArEiiMNBmHrBkmgLYoJzMs=; b=C8BGHEwjBW+/b1hHZvpjhuQLMB+BO47pFT7mmHkS5/7qgmui4K599mNgS1IqAaktdQfdgtv8klKJ2aLMDUZsVSiEGc/6+ZScnJs8FrqBY9Bp8mk8v8PStVKonXvL8+uLVn8dTSilz9cOcCv8NUmfD/wUS0yYfzGQYxU+kwrlQJg= Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com (2603:10b6:806:11b::15) by SN6PR10MB2992.namprd10.prod.outlook.com (2603:10b6:805:d7::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.35; Fri, 7 May 2021 16:22:09 +0000 Original-Received: from SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494]) by SA2PR10MB4474.namprd10.prod.outlook.com ([fe80::2109:9725:fd4a:6494%6]) with mapi id 15.20.4087.044; Fri, 7 May 2021 16:22:09 +0000 Thread-Topic: [External] : bug#48179: bookmark-fontify [PATCH] Thread-Index: AQHXQ0hEomYyqQOV2EqYXtYd30AHsKrYJTPw In-Reply-To: <87mtt6slam.fsf@yandex.com> Accept-Language: en-US Content-Language: en-US authentication-results: yandex.com; dkim=none (message not signed) header.d=none;yandex.com; dmarc=none action=none header.from=oracle.com; x-originating-ip: [73.170.83.28] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d8f5d752-5774-4c9f-6244-08d9117443ae x-ms-traffictypediagnostic: SN6PR10MB2992: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oyT4AInVyBLRiQeepfOhwSZbfpYa1QTsaDxBXjzkCmao2JEtTYj43Lh8CYZsqPNarcqyubklXVD2W8k5S7Sz7xkHNyNEgXAZeGrIoX15xM7Bq1nu0q7JnhKk57LYxYEUmQIb5yEJaP1rWT7tLGlT3XcoPpytmVOV7EGsqoPNzoF/d3jq7WKRy8J+p1IIQJm+WvuPHh1h0Eioj/nO1Pxrc2YlXxAKDqwE/e2EHfecfjA2OW+mHYju17cGO+dnnsIRYydV5CsQwh3W3E6xA7887wtkpD84hHwJtTvlfqKB/VVCLvmFW+anzXR0vVWdhVHw4Chr8NSWEryEuSuq8ezNE1I1vn7n3KtUvrrLoi+BfNARyOHjYh5UD/JRbJXdgjZFc5VQy55FDwxlu8n55WbeN2V224Fy8itaa26gQMTnHLNc2pjMFmLb4CVBUZWz6d6sbobfUi0rCwt8k7Eedms0Z+m3KFZoU1slHIeoHCrMo6l3WKX11vrQh9Uf7A4Z1n9qUDpqRAnubX+YZMO1yMfzsRFHjMHwzs2t21/J3b7VIncaYKr7AbJbB/rsVQ0O7bPgtZ88Bh+NzQ4xa3RX1hXUGO5HuQttJji5/X6h/FddvbE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR10MB4474.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(366004)(376002)(39860400002)(136003)(396003)(5660300002)(4326008)(55016002)(122000001)(38100700002)(6506007)(26005)(76116006)(52536014)(9686003)(66476007)(66946007)(66446008)(64756008)(8936002)(186003)(83380400001)(110136005)(316002)(33656002)(8676002)(478600001)(54906003)(7696005)(44832011)(66556008)(71200400001)(2906002)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: Ei0ZGj/Ju71Kaltlxl3CA+uf5pO9IQZlx3AbikuHF9YnhW/vZrcI36MLKni4XD0hwpMnO+uzmalmLfWnzfu1R+9yxOKH/rV0aNYtR7+G5er11SdeZ41uWwL6k5SpQZYnhm/H/0xcx4muztaS3kZUTypJYMDaZaB+pLDO1dcmPGxx1cQj0RMAYHGZsPA6zEhEojOQvQQ8+3gcUVub3lvDKGV5V4X3MfQdPm/SGsBJUnZZpZ92y4eYm5j9Mn48u68bpBO1q9uEJZHEnaG+eCMrA3J2i0wtXVzHzbH0btAJ0aBSUHmu/l91votcnDzNNgfoH0YmSxfMzWmbIZTcpZIR/yCVX5aPZ+cu6ZeCQnX26oGE57XL9z+Jq+l2LIdZC2yW20/gCeLWUcRVeF8RgGedBOZVIevi6HSqQnxhK/I1v5hzmR01emSFWgpV5eUN6bSCz51Q4VNLSuE+R89XE6fypYsthW0WrkHSweaPUvXePi6zhqYlDu7HEfeiF2Ph0uFO1hUUNQ36EjHIoF46T4gO2J9FKpWzxsLb55NN9fV3C4m7rAzKSREjp/EoWBIAULDr8fNZZ7vJa2lHBVB4DqTfvONOn8UQRCzXutAdErCH08CuLraXBaEsk6DAhjeaef7KuX7K8hG0js/Wem0mqD+Zde/GI+3kHw+F3lLB+yvd8nlGk1IlmicV6lJiEjc2P4h/Ep/keWt04iWeASvEZWQ8fBgEw+Hzk46V0auWbFKQqN2V2hGZtuhaiKj3//d1 QW9XOjBbykIYTo06YwJBzAkKcJKs65xHMNMb0BbEU61rqTyyb44+xdnBJVT8pYQt230JvkXWQVzZAI6uY8kAPG5SFi/+zzVd3+ x-ms-exchange-transport-forked: True X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SA2PR10MB4474.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8f5d752-5774-4c9f-6244-08d9117443ae X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2021 16:22:09.7821 (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: ZJoEeYJmRzo6GjzUJ2WtsL1VXG293MhrID+Of80QgquqFjzhGoHksDt5y/5X0bWMZxFmgbXHNRpZwvQ5pidOug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR10MB2992 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9977 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0 mlxscore=0 spamscore=0 phishscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105070110 X-Proofpoint-ORIG-GUID: 6rh7bs28Zgz_8c3dxvsYcNdl49QtkCmg X-Proofpoint-GUID: 6rh7bs28Zgz_8c3dxvsYcNdl49QtkCmg X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9977 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 clxscore=1011 malwarescore=0 adultscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105070110 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" Xref: news.gmane.io gmane.emacs.bugs:205954 Archived-At: >> setting multiple bookmarks in the same file works >> without problems with the built-in bookmark.el, >> as far as I can tell? (You just have to give the >> bookmarks different names.) First, a correction of that, assuming I understand what it wants to say. You can have any number of bookmarks in the same file, and even with the same location in the file. And they need _NOT_ have different names. [This is true for both vanilla bookmark.el and Bookmark+. But in vanilla all but the first bookmark with the same name are unused/unavailable. With Bookmark+ you can use all bookmarks that have the same name. For instance, you can have two bookmarks named `foo.el', each named for a file named `foo.el', where those files are in different directories. That's the case for autofile bookmarks, for example.] > That's true, but, as you wrote, the user has > to come up new names. See above - the names need NOT be different. Secondly, if your point is about a user always needing to come up with names whenever s?he _wants_ different names (underlining "wants", because that's not an Emacs requirement): Sometimes you _want_ to name a bookmark. Sometimes you might prefer not to have to do that, and instead just hit a key to set a bookmark - no prompting for a name, no need to even hit `RET' to accept a default name at a prompt. With Bookmark+, by default `C-x x RET' does that. No prompting - autonaming. (Bookmarking keys are on a keymap that's bound, by default, to `C-x x'. You can instead of course put that command on a shorter key.) That's `bmkp-toggle-autonamed-bookmark-set/delete': If there is an autonamed bookmark at point, delete it, else create one. The bookmark created has no region. Its name is formatted according to option `bmkp-autoname-bookmark-function'. With a prefix arg, delete *ALL* autonamed bookmarks for this buffer. Non-interactively, act at POSITION, not point. If nil, act at point. So one key to either create or delete an autonamed bookmark at point. And a prefix arg deletes all. > This is done automatically in bm-bookmarks, which > inserts the corresponding line as the name. Bookmark+ lets users customize the autonaming, using option `bmkp-autoname-bookmark-function': Function to automatically name a bookmark at point (cursor position). It should accept a buffer position as its (first) argument. The name returned should match the application of `bmkp-autoname-format' to the buffer name. The default value of the option does this: Return a bookmark name using POSITION and the current buffer name. The name is composed as follows: POSITION followed by a space and then the buffer name. The position value is prefixed with zeros to comprise 9 characters. For example, for POSITION value 31416 and current buffer `my-buffer', the name returned would be `000031416 my-buffer'. It's trivial to define a function that returns any kind of name you want, including using the text of the current line as the name. The name of an autonamed bookmark matches option `bmkp-autoname-format', which is a format string. By default, the format string accepts a buffer name. The default value is "^[0-9]\\{9\\} %B". So a default bookmark name is the position followed by the buffer name. > The disadvantage is that bm-bookmarks can't=20 > easily bookmark blank lines. That's a problem only for BM's particular way of naming. The default Bookmark+ naming doesn't have that problem, for example. What's important is that users themselves can easily define the automatic naming they want. And that they can create bookmarks both by autonaming and by providing names explicitly. > It seems to me that all the bookmarks, bm, built-in (including > emacs-28), bookmark+, have disadvantages. Personally, I would use > bookmark+ if were not for the fact that it writes unprompted to ~/.emacs. I don't know what you mean by that. Could you elaborate? 1. It never writes to ~/.emacs, unless you've defined that as the bookmark file you want to write to. 2. It never writes to your bookmark file unprompted unless you've configured it to do so. You do that in the same way as for vanilla bookmark.el: option `bookmark-save-flag'. Set that option to `nil' and bookmarks will never be saved except when you explicitly ask to save, e.g. when using command `bookmark-save'.