unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: <miha@kamnitnik.top>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Matthias Meulien <orontee@gmail.com>,
	"Paul W. Rankin" <pwr@bydasein.com>,
	Stefan Kangas <stefan@marxist.se>,
	"Paul W. Rankin via Emacs development discussions."
	<emacs-devel@gnu.org>, Karl Fogel <kfogel@red-bean.com>,
	Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default
Date: Tue, 14 Sep 2021 16:44:29 +0200	[thread overview]
Message-ID: <874kanrzci.fsf@miha-pc> (raw)
In-Reply-To: <87wnnjv09g.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

Lars Ingebrigtsen <larsi@gnus.org> 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.

>
> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2021-09-14 14:44 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  6:20 [PATCH] lisp/bookmark.el: make bookmark-fontify nil by default Paul W. Rankin via Emacs development discussions.
2021-05-18  6:58 ` Karl Fogel
2021-05-18  8:17   ` Paul W. Rankin via Emacs development discussions.
2021-05-18  8:45     ` Eli Zaretskii
2021-05-18 10:06       ` Paul W. Rankin via Emacs development discussions.
2021-05-18 12:09         ` Eli Zaretskii
2021-05-18 12:04       ` Eli Zaretskii
2021-05-18 14:28       ` Lars Ingebrigtsen
2021-05-18 14:38         ` Eli Zaretskii
2021-05-18 14:40           ` Lars Ingebrigtsen
2021-05-19 11:59           ` Bastien
2021-05-19 13:55             ` Eli Zaretskii
2021-05-24 22:32             ` Lars Ingebrigtsen
2021-05-24 22:51               ` [External] : " Drew Adams
2021-05-18 14:43         ` Drew Adams
2021-05-18 15:07           ` Eli Zaretskii
2021-09-13  9:46         ` Stefan Kangas
2021-09-13  9:58           ` Manuel Uberti
2021-09-13 10:17             ` Stefan Kangas
2021-09-13 10:12           ` Colin Baxter
2021-09-13 15:29             ` [External] : " Drew Adams
2021-09-13 10:43           ` Adam Porter
2021-09-13 11:36           ` Lars Ingebrigtsen
2021-09-13 19:36             ` Matthias Meulien
2021-09-14  5:40               ` Colin Baxter
2021-09-14 11:15               ` Lars Ingebrigtsen
2021-09-14 11:46                 ` Eli Zaretskii
2021-09-14 11:54                   ` Lars Ingebrigtsen
2021-09-14 11:52                 ` miha
2021-09-14 11:56                   ` Lars Ingebrigtsen
2021-09-14 14:44                     ` miha [this message]
2021-09-15  7:59                       ` Lars Ingebrigtsen
2021-05-18 10:49     ` Basil L. Contovounesios
2021-05-18 11:08       ` Paul W. Rankin via Emacs development discussions.
2021-05-19 12:00       ` Bastien
2021-05-19 12:58         ` Gregor Zattler
2021-05-18 10:49 ` Basil L. Contovounesios
2021-05-19 12:00 ` Paul W. Rankin via Emacs development discussions.
2021-05-19 14:15   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kanrzci.fsf@miha-pc \
    --to=miha@kamnitnik.top \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=kfogel@red-bean.com \
    --cc=larsi@gnus.org \
    --cc=orontee@gmail.com \
    --cc=pwr@bydasein.com \
    --cc=stefan@marxist.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).