From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yoni Rabkin Katzenell Newsgroups: gmane.emacs.devel Subject: Re: Uninformative comment in files.el Date: Wed, 12 Dec 2007 08:31:32 +0200 Message-ID: <87mysg1l17.fsf@actcom.com> References: <475EF93E.3060203@ig.com.br> <475F0992.2030307@gmx.at> <475F45EB.2070704@ig.com.br> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197441332 10956 80.91.229.12 (12 Dec 2007 06:35:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2007 06:35:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 12 07:35:44 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J2LC1-0006s7-3o for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2007 07:35:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2LBj-00064c-4v for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2007 01:35:23 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2LBc-00063X-Ot for emacs-devel@gnu.org; Wed, 12 Dec 2007 01:35:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2LBa-00061X-RA for emacs-devel@gnu.org; Wed, 12 Dec 2007 01:35:15 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2LBa-00061E-KM for emacs-devel@gnu.org; Wed, 12 Dec 2007 01:35:14 -0500 Original-Received: from sa10.bezeqint.net ([192.115.104.24]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J2LBZ-0007Bj-SB for emacs-devel@gnu.org; Wed, 12 Dec 2007 01:35:14 -0500 Original-Received: from localhost (unknown [127.0.0.1]) by sa10.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP id 7CD9D106FCC for ; Wed, 12 Dec 2007 08:33:16 +0200 (IST) Original-Received: from sa10.bezeqint.net ([127.0.0.1]) by localhost (sa10.bezeqint.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25120-06 for ; Wed, 12 Dec 2007 08:33:10 +0200 (IST) Original-Received: from ardbeg.actcom.com (unknown [212.179.253.14]) by sa10.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP for ; Wed, 12 Dec 2007 08:33:10 +0200 (IST) X-Ethics: Use GNU In-Reply-To: <475F45EB.2070704@ig.com.br> (Vinicius Jose Latorre's message of "Tue, 11 Dec 2007 23:22:35 -0300") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-Virus-Scanned: amavisd-new at bezeqint.net X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:85083 Archived-At: Vinicius Jose Latorre writes: > martin rudalics wrote: >>>> Could whoever installed the following change: >>>> >>>> 2007-12-10 Yoni Rabkin Katzenell (tiny >>>> change) >>>> * file.el (revert-buffer): Eliminate overlays and the mark. >>>> >>>> replace the comment "Reset the mark and remove all overlays" which just >>>> paraphrases the code, with a comment that actually explains why we >>>> want/need to do that? >>>> >>> >>> >>> This is not explained in etc/TODO file. >>> >>> The patch refers to this line in etc/TODO file: >>> >>> ** revert-buffer should eliminate overlays and the mark. >>> >>> >>> Does anyone know why this is necessary? >> >> I'm afraid the patch installed is overly simplistic. You can find out >> more by looking at the thread starting with >> >> http://lists.gnu.org/archive/html/emacs-devel/2005-11/msg01346.html >> >> For the moment I'd strongly propose to revert the change and study the >> problem in more depth. > > Ok, I've read the thread. Indeed, the problem is not so simple. > > I've just undone the patch in CVS trunk. After reading that thread (which I neglected to do beforehand, sorry) I still think that revert-buffer should remove all overlays and the mark. My reasoning is based on the way revert-buffer is implemented, which is to work for a simple default scenario, and to hand off any more complex reverting to other modes via `revert-buffer-function', which replaces revert-buffer's actions entirely if defined. For this reason, I don't see any one fix which would solve the problem for all modes. In any case, could you please install the docstring portion of the patch? It is a better description of what `revert-buffer-function' does. If needed, I can send in a patch which does only that. -- "Cut your own wood and it will warm you twice"