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: Re: Problem with revert-buffer and overlays Date: Sun, 27 Nov 2005 22:02:39 +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 1133125495 2001 80.91.229.2 (27 Nov 2005 21:04:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2005 21:04:55 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 27 22:04:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgTgT-0007ru-Qp for ged-emacs-devel@m.gmane.org; Sun, 27 Nov 2005 22:03:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgTgT-0005Mv-5q for ged-emacs-devel@m.gmane.org; Sun, 27 Nov 2005 16:03:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EgTgG-0005Mh-Sq for emacs-devel@gnu.org; Sun, 27 Nov 2005 16:03:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EgTgF-0005MS-EU for emacs-devel@gnu.org; Sun, 27 Nov 2005 16:03:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgTgF-0005MO-Aj for emacs-devel@gnu.org; Sun, 27 Nov 2005 16:03:27 -0500 Original-Received: from [195.41.46.237] (helo=pfepc.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EgTgD-0002E1-LG; Sun, 27 Nov 2005 16:03:25 -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 24B34262861; Sun, 27 Nov 2005 22:03:22 +0100 (CET) Original-To: rms@gnu.org In-Reply-To: (Richard M. Stallman's message of "Sat, 26 Nov 2005 22:28:29 -0500") 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:46666 Archived-At: "Richard M. Stallman" 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. > > This seems plausible to me. In general, one must expect those > overlays to be relocated to garbage, so preserving them cannot work > reliably. > > Would you like to do that? I looked at the code, and it is not obvious to me where this should be done. It could be done in one of: revert-buffer, after-find-file, normal-mode. I think someone more familiar with revert-buffer should work on this. BTW, I noticed that revert-buffer does not deactivate the mark. In any case, I realized that I _can_ fix this in cua-mode by making the local variable holding the overlays permanent-local. Perhaps that would be safer this close to the release. -- Kim F. Storm http://www.cua.dk