From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: Don't complain about changed file when it hasn't changed Date: Wed, 07 Sep 2016 11:49:02 -0500 Message-ID: <8737lbslj5.fsf@red-bean.com> References: <87oa40k8oq.fsf@red-bean.com> <87fupck7s2.fsf@red-bean.com> <73a01198-e334-2424-7143-8882092ffb78@lanl.gov> <874m5sk6tr.fsf@red-bean.com> Reply-To: Karl Fogel NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473267024 27952 195.159.176.226 (7 Sep 2016 16:50:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 7 Sep 2016 16:50:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Paul Eggert , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 07 18:50:17 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 1bhg36-0005yX-Oc for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 18:50:08 +0200 Original-Received: from localhost ([::1]:42051 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhg34-0004R7-Kz for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 12:50:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhg28-0004Py-Js for emacs-devel@gnu.org; Wed, 07 Sep 2016 12:49:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhg25-0004ub-DI for emacs-devel@gnu.org; Wed, 07 Sep 2016 12:49:08 -0400 Original-Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]:38449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhg25-0004uV-8e for emacs-devel@gnu.org; Wed, 07 Sep 2016 12:49:05 -0400 Original-Received: by mail-it0-x232.google.com with SMTP id c198so32689535ith.1 for ; Wed, 07 Sep 2016 09:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:reply-to:date:in-reply-to :message-id:user-agent:mime-version; bh=sU3FzX/1WoJOi9bAI9oo/hwMHPMAcFM8b+vreF4kZvA=; b=B5FABdhSaYSjIa39BokmaEJkhQbSB6hvBn3np/biJZL/aT4mKKtq4CFRDKjaoyqmhz sMKwMVpVO2A9huZbmE2ggYqiUwQvYHfLM1pAQ1iyNF6/mKFBUcmqGT7HIqH6zkx5dWHz AcoUFonm80jbVusvoSn8UxDTrjqnix7mp2TkmWHPgGUQqWtOxtRCnvFYT/gQNqEmC7jR evv4TMgJ4q8x6aBudUjzhfYi5zp/VZQ5u4gFjGgSMMg6CbtLxE4atTIKX5wTTi3++pN3 oJMgM0BVjKliwsRioIoXIJFM2dZrSJeMIUu1HCDyLmMR9jRp9Ba0VZorca++X+zaWMv2 g+Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:reply-to :date:in-reply-to:message-id:user-agent:mime-version; bh=sU3FzX/1WoJOi9bAI9oo/hwMHPMAcFM8b+vreF4kZvA=; b=Kf2bfUAmjWYPb9KXeuyNOQk4CnmF78Hd1sMHS74pNrlrKyWx9P+CRw7hcTDUWJF/T1 Ug8h5sWSw4HBPSyghOStNp8b7Ep5RqzK2uie4H2gRUrSfQ1/UR7POaaDBQ2eJREqERFj HJFxJKu7u5tRXj/mbHDJS1t8LPcrmslSq3qWhxF3rmRIBGPrUgfjC3oXycS9/IDNAY6a kALqX3Rrj7DgnNy3ek15bx0ypD5YS+cB3TrqZDENoPoWpNYiWJTaeCUjcXBoYrNOMzB7 O2ym1fRl1PahOkP0q+BMRn+KNupuN5J6K70ax//+tNHxwVVI82Yg1T8HMO3zADgS24hF IaDQ== X-Gm-Message-State: AE9vXwNcrqQTIsnfjr8j6t0ClPd50JQsgtlh+D1I3r8CIiZJBqHyOWbJgq+wfdQ6eQMXEw== X-Received: by 10.36.20.9 with SMTP id 9mr7764806itg.24.1473266944633; Wed, 07 Sep 2016 09:49:04 -0700 (PDT) Original-Received: from kwork (74-92-190-114-Illinois.hfc.comcastbusiness.net. [74.92.190.114]) by smtp.gmail.com with ESMTPSA id i80sm3428123ita.5.2016.09.07.09.49.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 07 Sep 2016 09:49:03 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 06 Sep 2016 20:24:07 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4001:c0b::232 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:207254 Archived-At: Stefan Monnier writes: >> Oh -- remember the "true" size (that is, the >> unencrypted/uncompressed/unwhatevered) size of the file at the moment when >> it is first visited? > >Yes, that's what my FIXME comment was referring to. > >Comparing the buffer's size and the file's size would miss too many case >and would be too brittle for my taste (there are many different ways to >modify the data on the way between the file and the buffer). *nod* Makes sense. The risks here outweigh the potential win, I think. >> As long as we're doing that, why not just remember the md5sum of the >> original content too? > >Cause it'd slow down a common case, compared to this >ask-user-about-supersession-threat which is used very rarely? Oh, the extra expense of computing the md5sum at initial find-file time? Hmmm... Fair enough, yeah. I haven't profiled it, and don't think this is important enough to be worth making those measurements. Let's leave things as they are.