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 16:22:01 +0200 Message-ID: <8763z4t2ly.fsf@actcom.com> References: <475EF93E.3060203@ig.com.br> <475F0992.2030307@gmx.at> <475F45EB.2070704@ig.com.br> <87mysg1l17.fsf@actcom.com> <475FA723.9030607@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1197469585 1534 80.91.229.12 (12 Dec 2007 14:26:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Dec 2007 14:26:25 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 12 15:26:34 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 1J2SXb-0007DY-0E for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2007 15:26:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2SXJ-0005Ry-28 for ged-emacs-devel@m.gmane.org; Wed, 12 Dec 2007 09:26:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2SXE-0005PW-2X for emacs-devel@gnu.org; Wed, 12 Dec 2007 09:26:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2SXB-0005M8-DK for emacs-devel@gnu.org; Wed, 12 Dec 2007 09:26:03 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2SXB-0005Ly-9A for emacs-devel@gnu.org; Wed, 12 Dec 2007 09:26:01 -0500 Original-Received: from sa5.bezeqint.net ([192.115.104.19]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J2SXA-0001gI-RT for emacs-devel@gnu.org; Wed, 12 Dec 2007 09:26:01 -0500 Original-Received: from localhost (sa5 [127.0.0.1]) by sa5.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP id 967AC30084 for ; Wed, 12 Dec 2007 16:25:43 +0200 (IST) X-Virus-Scanned: amavisd-new at bezeqint.net Original-Received: from sa5.bezeqint.net ([127.0.0.1]) by localhost (sa5.bezeqint.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aW2rOsvn20vy for ; Wed, 12 Dec 2007 16:25:32 +0200 (IST) Original-Received: from ardbeg.actcom.com (unknown [212.179.253.14]) by sa5.bezeqint.net (Bezeq International SMTP out Mail Server) with ESMTP for ; Wed, 12 Dec 2007 16:25:32 +0200 (IST) X-Ethics: Use GNU In-Reply-To: <475FA723.9030607@gmx.at> (martin rudalics's message of "Wed, 12 Dec 2007 10:17:23 +0100") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:85093 Archived-At: martin rudalics writes: >> After reading that thread (which I neglected to do beforehand, sorry) > > Not your fault. The TODO item should have included a link to that > thread. > >> I still think that revert-buffer should remove all overlays and the mark. > > I think your patch is correct but am not sure about a number of related > issues. For example, is auto-reverting affected by your change and > how? Good point, nothing comes to mind but I'd have to check that carefully to answer. > Is `remove-overlays' the right function to remove all overlays in a > buffer or should we provide a simpler function that doesn't check > overlay boundaries? > Is `overlay-recenter' needed in this context? Doing something like: (save-excursion (overlay-recenter (point-max)) (dolist (o (overlays-in (point-min) (point-max))) (delete-overlay o))) ... might be enough to efficiently and unconditionally nuke all the overlays in a buffer. I have no idea if the difference between that and the `remove-overlays' code actually matters. As for the rest of the questions, they are so far removed from my simple patch that I should definitely not attempt to answer unless I intend to do some homework beforehand. They require a breadth of Emacs knowledge I don't have at the moment. Maybe I'll prepare a better patch after looking all that stuff up (if nobody beats me to it). -- "Cut your own wood and it will warm you twice"