From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Davis Herring Newsgroups: gmane.emacs.devel Subject: Re: Don't complain about changed file when it hasn't changed Date: Mon, 29 Aug 2016 13:10:29 -0600 Organization: XCP-1 Message-ID: <5f0d7794-45b0-657f-6751-181690586295@lanl.gov> References: <031d3e59-eaa3-df7a-492d-2a2d3c726094@gmail.com> <8e93c13b-0202-a143-0f07-6480e30e472a@dancol.org> <3b1ce0fb-1ca5-0614-5622-4222cf8c9470@gmail.com> <877fb0dqgj.fsf@gmx.de> <799f82b2-19d6-4bab-c1b9-e525ed5bb4b3@lanl.gov> <51818fcd-37e4-a8dd-4524-9100879cf341@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1472497870 24772 195.159.176.226 (29 Aug 2016 19:11:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 Aug 2016 19:11:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 Cc: Daniel Colascione , Michael Albinus , emacs-devel@gnu.org To: =?UTF-8?Q?Cl=c3=a9ment_Pit--Claudel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 29 21:11:06 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 1beRxY-00061N-Lu for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2016 21:11:04 +0200 Original-Received: from localhost ([::1]:45357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beRxV-0007oS-9L for ged-emacs-devel@m.gmane.org; Mon, 29 Aug 2016 15:11:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beRxM-0007oL-TM for emacs-devel@gnu.org; Mon, 29 Aug 2016 15:10:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beRxI-0006Or-NR for emacs-devel@gnu.org; Mon, 29 Aug 2016 15:10:51 -0400 Original-Received: from proofpoint5.lanl.gov ([204.121.3.53]:54217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beRxI-0006On-GT for emacs-devel@gnu.org; Mon, 29 Aug 2016 15:10:48 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailgate5.lanl.gov (8.15.0.59/8.15.0.59) with ESMTP id u7TJAUG8002683; Mon, 29 Aug 2016 13:10:30 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 95616141B69D; Mon, 29 Aug 2016 13:10:30 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from chinstrap.lanl.gov (chinstrap.lanl.gov [128.165.123.246]) by mailrelay1.lanl.gov (Postfix) with ESMTP id F1EA6141B678; Mon, 29 Aug 2016 13:10:29 -0600 (MDT) In-Reply-To: <51818fcd-37e4-a8dd-4524-9100879cf341@gmail.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.15.154, 1.0.3, 0.0.0000 definitions=2016-08-29_09:2016-08-29, 2016-08-29, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 204.121.3.53 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:206902 Archived-At: >> A very basic "checksum" would be to just use the file's size. We could easily implement that and catch most modifications without any real I/O. > > Does this work? Many changes don't affect file size, we we would still want to prompt the user, right? I merely meant If the file size doesn't match, immediately rule the file "changed on disk" without paying for `insert-file-contents'. as an optimization to prevent most of the I/O cost. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.