From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: Problem with revert-buffer and overlays Date: Mon, 28 Nov 2005 11:17:59 +0100 Message-ID: <438AD957.4010005@gmx.at> References: <43871059.9090705@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1133182133 10599 80.91.229.2 (28 Nov 2005 12:48:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 28 Nov 2005 12:48:53 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 28 13:48:51 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgiQG-00019j-07 for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 13:47:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgiQF-0006P1-1p for ged-emacs-devel@m.gmane.org; Mon, 28 Nov 2005 07:47:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EggMg-00008p-Dw for emacs-devel@gnu.org; Mon, 28 Nov 2005 05:36:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EggDw-00088I-Hj for emacs-devel@gnu.org; Mon, 28 Nov 2005 05:27:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EggBb-0007mq-CD for emacs-devel@gnu.org; Mon, 28 Nov 2005 05:24:40 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1EggBa-00026p-VH for emacs-devel@gnu.org; Mon, 28 Nov 2005 05:24:39 -0500 Original-Received: (qmail invoked by alias); 28 Nov 2005 10:24:36 -0000 Original-Received: from N839P003.adsl.highway.telekom.at (EHLO [62.47.48.195]) [62.47.48.195] by mail.gmx.net (mp028) with SMTP; 28 Nov 2005 11:24:36 +0100 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: rms@gnu.org In-Reply-To: X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46697 Archived-At: > 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? > 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. In a similar way, I don't think it necessary to remove the CUA rectangle when a buffer is reverted.