From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Problem with revert-buffer and overlays [was: Two minor problems with CUA rectangles] Date: Sun, 27 Nov 2005 00:37:05 +0100 Message-ID: References: <43871059.9090705@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1133048358 30330 80.91.229.2 (26 Nov 2005 23:39:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 26 Nov 2005 23:39:18 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 27 00:39:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eg9cL-0001Db-QY for ged-emacs-devel@m.gmane.org; Sun, 27 Nov 2005 00:38:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eg9cL-0006kN-87 for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2005 18:38:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Eg9c7-0006kH-P5 for emacs-devel@gnu.org; Sat, 26 Nov 2005 18:37:51 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Eg9c5-0006k5-VY for emacs-devel@gnu.org; Sat, 26 Nov 2005 18:37:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eg9c5-0006k2-QB for emacs-devel@gnu.org; Sat, 26 Nov 2005 18:37:49 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Eg9c5-0002Fm-QL for emacs-devel@gnu.org; Sat, 26 Nov 2005 18:37:50 -0500 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepc.post.tele.dk (Postfix) with SMTP id C7028262832; Sun, 27 Nov 2005 00:37:48 +0100 (CET) Original-To: martin rudalics In-Reply-To: <43871059.9090705@gmx.at> (martin rudalics's message of "Fri, 25 Nov 2005 14:23:37 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:46629 Archived-At: martin rudalics writes: > Suppose I have a TAB with a text-property that specifies a background > color. [...] I have installed a fix for this. Thanks for noticing... > M-x revert-buffer with an active rectangle in that buffer apparently > deactivates the rectangle but overlays used for the rectangle are not > removed. C-l does not remove them either. The problem for cua is that revert-buffer kills all local variables in the buffer, so the list of overlays (which cua keeps in a local variable) is no longer available to cua's post-command hook which would otherwise have cleaned this up. I don't really see how cua work around this, or force revert-buffer to do that, as there are no hooks which a guaranteed to be called by revert ... 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. -- Kim F. Storm http://www.cua.dk