From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default Date: Tue, 14 Sep 2021 16:44:29 +0200 Message-ID: <874kanrzci.fsf@miha-pc> References: <1df50c0d035675f851387d689030d588@purelymail.com> <87k0nw1qaq.fsf@red-bean.com> <878s4cf74z.fsf@gnus.org> <871r5semh0.fsf@gnus.org> <87v934tgi0.fsf@gmail.com> <87lf3zwgpi.fsf@gnus.org> <87fsu71iis.fsf@miha-pc> <87wnnjv09g.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Matthias Meulien , "Paul W. Rankin" , Stefan Kangas , "Paul W. Rankin via Emacs development discussions." , Karl Fogel , Eli Zaretskii To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 14 22:22:15 2021 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 1mQEwY-0001WH-Rq for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Sep 2021 22:22:15 +0200 Original-Received: from localhost ([::1]:39268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQEwX-0002mJ-0e for ged-emacs-devel@m.gmane-mx.org; Tue, 14 Sep 2021 16:22:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ9cj-0008AQ-G4 for emacs-devel@gnu.org; Tue, 14 Sep 2021 10:41:25 -0400 Original-Received: from kamnitnik.top ([2001:19f0:5001:bf2:5400:2ff:fee0:2626]:37600 helo=mail.kamnitnik.top) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQ9ch-0001B7-5s; Tue, 14 Sep 2021 10:41:25 -0400 Original-Received: from localhost (unknown [IPv6:2a00:ee2:e04:9300:e18:5d33:4bd1:d3a4]) by mail.kamnitnik.top (Postfix) with ESMTPSA id 1230B9C6F5; Tue, 14 Sep 2021 14:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kamnitnik.top; s=mail; t=1631630480; bh=Gk+LmpR6tCWwDfpRI991hd0LeGZFcJ9aH3EE1OuMq9w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YOQOSeuZJlO20xXQYfwqNd0Ri9V5ljrHaPhdekiOCSRdT6tTsLYQAnQWC4YcNOqDI IrIAVuoGAqOyvduE7RX0gDqo9vL2ss951z27aEwkA6Vx1M7lc0k5HGIj+TsWBvh5Bv WhltM2Ff7HodRv5ZZRaXxpWGjl6GOR3l+dHV93R/s3Yg6nh9HccKawCP4JXVY48IwP 0u+0YIxA0wPxL9Q8kBif9daUMab8f+hewDRiC+ecN0LM+Wa5IWHnqZY+SloY00/prP pZbKUY9kmM3RhefTXoyn++9k/oX2JRK5XthehNyfQKKkQZCcO3YrM6leGY5EUquPC5 4N4WzMBt57PbQ== In-Reply-To: <87wnnjv09g.fsf@gnus.org> Received-SPF: pass client-ip=2001:19f0:5001:bf2:5400:2ff:fee0:2626; envelope-from=miha@kamnitnik.top; helo=mail.kamnitnik.top X-Spam_score_int: 4 X-Spam_score: 0.4 X-Spam_bar: / X-Spam_report: (0.4 / 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, FROM_SUSPICIOUS_NTLD=0.499, PDS_OTHER_BAD_TLD=1.999, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 14 Sep 2021 16:21:20 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:274720 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: > miha@kamnitnik.top writes: > >>> Do we have some machinery to handle overlays like this, or conventions >>> about what to do with overlays when doing a `revert-buffer' actions? >> >> IMO, the responsibility of code that creates overlays is to clean them >> up in change-major-mode-hook. > > I don't think `revert-buffer' calls that hook? I believe that revert-buffer--default does end up calling this hook (through `normal-mode'), but I see that the original post was about a vc-dir buffer, which has its own revert-buffer-function and it indeed seems like it doesn't call that hook. I guess my idea was the following: we want at most one bookmark overlay per buffer, so it's natural to put this overlay in a buffer local variable. We then call move-overlay instead of make-overlay if it already exists. However, kill-all-local-variables would kill this variable but not delete the overlay. We have to either make this variable permanent or delete this overlay in change-major-mode-hook. I tend to prefer the later solution. > > --=20 > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJHBAEBCAAxFiEEmxVnesoT5rQXvVXnswkaGpIVmT8FAmFAtU0THG1paGFAa2Ft bml0bmlrLnRvcAAKCRCzCRoakhWZPzaXD/9G4/GqwIA4QgcbuCBsIlioW8xvNH+0 O2oshgzoG2gQ0bG+wOT9SheEO3ABPcx9u9JJeL8CDf5JGqkFQBivYJDO/9asHm24 on947ON62A6wFfmw2MYI5zsUbT5Fu/+IB6jNw454njuuO8N7e0/WbXzF5U8vCUeK iHAKZcSzLa7oi+g7X31nzeRiPfjPLRVq+ZbHRy/Ml0hwodavM6AgTjN9XYXldYEd ldGaikw/ZnlCliOUSL23maifkw0RORJdcscyFW7j5AoQhlXxSx8G5Sr+i+Gs7jKo x/tyquOWWMgSiQfpiiINOWVm+cZH++Eus73umhzOK8g1G6sMLmKNsOYbSeB54Xej n/iRDDIChg3Ej6JwxEK7qkcclrdLRyOYGi6wR0h94ygE2oTwR5OijBLqlSTMuTZ/ YCMHUu1pT0Fs214QBDBbQjv8eUhs+Ki61Nn98x/u2UDyd09U3XzmyC8HGST2WPm4 zqd6kba3ZAh/04nzaMIvKAZ4E1Cn2wdy7PypmhAA3ZF/6JPVbQc3MZaDDFo6Lc3D sajKb1FH8pDbSsBbhfzkSTtOT/7UDqGFFp054OJ5xg2c0QVmVbVyKz3dMwEmfOdt odiMWGbSeN4uusnUaeTqJysrHUgHz01W5yNZ1+22sQRkuyH5B022nfd+ZtgPX+AL geqj70PCK6ZZwA== =7aKD -----END PGP SIGNATURE----- --=-=-=--