From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Don't complain about changed file when it hasn't changed Date: Sun, 28 Aug 2016 20:39:45 -0700 Message-ID: <8e93c13b-0202-a143-0f07-6480e30e472a@dancol.org> References: <031d3e59-eaa3-df7a-492d-2a2d3c726094@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1472442038 11573 195.159.176.226 (29 Aug 2016 03:40:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2016 03:40:38 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 To: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 29 05:40:34 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1beDR3-0002VT-2e for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2016 05:40:33 +0200 Original-Received: from localhost ([::1]:41668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beDR0-0002UK-EL for ged-emacs-devel@m.gmane.org; Sun, 28 Aug 2016 23:40:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beDQS-0002Tx-TF for emacs-devel@gnu.org; Sun, 28 Aug 2016 23:39:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beDQM-0002Mz-RK for emacs-devel@gnu.org; Sun, 28 Aug 2016 23:39:55 -0400 Original-Received: from dancol.org ([96.126.100.184]:54938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beDQM-0002Mk-IS for emacs-devel@gnu.org; Sun, 28 Aug 2016 23:39:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To:Subject; bh=UFuxId5r1NjafSoDdbp06MBi4Vh+lZgEH9pIaYfie2Q=; b=mFu2ToW7DgAU3DtVZ71hlrlTDP6hf9l2rOkX2UXxAfd7tcJeM3CqWm/6fZMRHloXErQaYVjLuvwGgad94stKXNMsu+I0bFszvsnY8Qopr3xqEvLpQRCKWff1r5wPnW95B0now5YWksMQSe+xbtVFUAm4E+TlZyaxsrsJVEhZW4hQvuRUWacmlX+ODhZIlx5lljtanQxkyRRqCs8r3tdG0cciZwcadUO3+VHguXal5m2SHaZRiPW3sFDtod+90EgnkyIrWK7xtRXKzWNjhPbAbRXh/ZaJjDcLuxp5FSV6qL/weX7y8mcsNIdh/f/LFt4OIpwtTZ7uTRV4SqVec629WQ==; Original-Received: from c-73-97-199-232.hsd1.wa.comcast.net ([73.97.199.232] helo=[192.168.1.173]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1beDQK-0000er-Ot; Sun, 28 Aug 2016 20:39:48 -0700 In-Reply-To: <031d3e59-eaa3-df7a-492d-2a2d3c726094@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 96.126.100.184 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206856 Archived-At: On 08/28/2016 08:36 PM, Clément Pit--Claudel wrote: > On 2016-08-28 20:29, Stefan Monnier wrote: >> The patch below is supposed to change Emacs such that if the file's >> timestamp has changed, but the contents is still the same, it doesn't >> prompt the user about a supersession-threat. >> >> Any objection? > > This sounds like a neat feature! Are you sure you want (point-min) > and (point-max) rather than 1 and (buffer-size), though? The code widens the buffer first. > Also, maybe this should be predicated on a test for small-enough files? For large-ish files, it could make things slow. Memory is very fast these days, and compare-buffer-substrings is efficient.