[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with revert-buffer and overlays
From: |
Kim F. Storm |
Subject: |
Re: Problem with revert-buffer and overlays |
Date: |
Mon, 28 Nov 2005 13:38:23 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
martin rudalics <address@hidden> writes:
> > This seems to be a generic problem with revert-buffer, as other modes
> > may also have overlays in the buffer which should be removed by
> > revert-buffer. It seems like it should unconditionally delete all
> > overlays in that buffer.
> >
> > Perhaps things which kills all local variables should also kill all
> > overlays in the buffer.
>
> > It should be done in revert-buffer, I think.
> > after-find-file is not the right place,
> > and normal-mode should NOT mess with overlays.
>
> Why not do this in kill-all-local-variables then?
>
> Although solving this problem is tricky in general. Consider two
> buffers A and B. A buffer-local variable in A may reference an overlay
> in buffer B. When A is reverted how remove the overlay in B?
This looks like a can of works best left alone for now.
>
> > BTW, I noticed that revert-buffer does not deactivate the mark.
> >
> > That seems like a bug, too.
>
> Deactivating the mark would have to be done by insert-file-contents if
> it finds out that the mark has been invalidated during reversion. I'd
> leave this alone until someone complains.
Ok with me. Still, I'll fix it for cua.
> In a similar way, I don't
> think it necessary to remove the CUA rectangle when a buffer is
> reverted.
It may not be necessary, but since most of the cua state is kept in
buffer local variables, that state is lost when you do revert-buffer,
so to keep the rectangle, cua must do "extra work" to ensure it is
still valid after revert-buffer. So it is simpler to remove it.
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Two minor problems with CUA rectangles, martin rudalics, 2005/11/25
- Problem with revert-buffer and overlays [was: Two minor problems with CUA rectangles], Kim F. Storm, 2005/11/26
- Re: Problem with revert-buffer and overlays [was: Two minor problems with CUA rectangles], Richard M. Stallman, 2005/11/26
- Re: Problem with revert-buffer and overlays, Kim F. Storm, 2005/11/27
- Re: Problem with revert-buffer and overlays, Richard M. Stallman, 2005/11/27
- Re: Problem with revert-buffer and overlays, martin rudalics, 2005/11/28
- Re: Problem with revert-buffer and overlays,
Kim F. Storm <=
- Re: Problem with revert-buffer and overlays, Richard M. Stallman, 2005/11/28
- Re: Problem with revert-buffer and overlays, martin rudalics, 2005/11/29
- Re: Problem with revert-buffer and overlays, Richard M. Stallman, 2005/11/29
- Re: Problem with revert-buffer and overlays, martin rudalics, 2005/11/30