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: Tue, 06 Sep 2016 17:21:36 -0500 Message-ID: <874m5sk6tr.fsf@red-bean.com> References: <87oa40k8oq.fsf@red-bean.com> <87fupck7s2.fsf@red-bean.com> <73a01198-e334-2424-7143-8882092ffb78@lanl.gov> Reply-To: Karl Fogel NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1473200522 15732 195.159.176.226 (6 Sep 2016 22:22:02 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Sep 2016 22:22:02 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: Paul Eggert , Stefan Monnier , emacs-devel@gnu.org To: Davis Herring Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 07 00:21:57 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 1bhOkb-00037Q-I9 for ged-emacs-devel@m.gmane.org; Wed, 07 Sep 2016 00:21:53 +0200 Original-Received: from localhost ([::1]:36447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOkZ-0003zK-Br for ged-emacs-devel@m.gmane.org; Tue, 06 Sep 2016 18:21:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOkT-0003z3-9m for emacs-devel@gnu.org; Tue, 06 Sep 2016 18:21:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhOkO-0002KT-2s for emacs-devel@gnu.org; Tue, 06 Sep 2016 18:21:44 -0400 Original-Received: from mail-yb0-x230.google.com ([2607:f8b0:4002:c09::230]:33682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhOkN-0002KP-VA for emacs-devel@gnu.org; Tue, 06 Sep 2016 18:21:40 -0400 Original-Received: by mail-yb0-x230.google.com with SMTP id d205so81143882ybh.0 for ; Tue, 06 Sep 2016 15:21:39 -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=XjKTpGmkRcbNeCZIDvO4OOsv/jYkKPl/GPMcwhcaPK8=; b=xENX5tVfeCYOpb/UywsoxnWUntGstB2HkevDQeWb7sNvbtrGHJPMuL8ptQgi7nbDrt zbyVvrzWjxOUp1h6gUrmTbH+W4I+Xo5PtEZv/Tcjp0Gci4QhYksjVHWvtMLIiV5mroMB zjfuXY2SEjyjdkicV7JYkX51GGbKS2L0PHmc0KxaXr+MBV0gK10cQY3bKjRQ64CMGCtB QMQ3mnTX457ljsg6QXT4wEI/NqJOsYlle6IgcAlWBYHyh+QIbLBcTp2JUZ6IyzFTEPa5 kf+G2O9iWIodWRryyWaq927Ph1PiXFm368p8bxoIi5th3FRiUaimla2aPYWhkM28tolW 9Vkg== 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=XjKTpGmkRcbNeCZIDvO4OOsv/jYkKPl/GPMcwhcaPK8=; b=YN2PAsI1XqZgpXxE4gBWEDgqksOJMntgvDK7eGzzJ8HeT5a3UQIotAKsw2WCQDKqiw tHJA9hJajKLLFAmAHCLW98BU3S0CX/Ot5C1bN5YfAN2SwZCSdebyN/A4mpB5e8g1mcwj y06swdeHzPTcGYxzOunwQUwUgBdRlXVgqY7+Hgl6ECFx4GaCQexoOgHhblqRSld1dOBr ZE65J9DFDvopq8kxqMFL0P8iwG6CV/bj+Q3PuqqxB+VGc3EglEUWlH7YTTxoe+LHlvyv QZQzMAVhKj1urS50FdQGYxzsp8TmjnbGC0n78I2x7M5H1yk276yQYGZor+7HlsGus0Iz qOCA== X-Gm-Message-State: AE9vXwM/+uAj6McrsE+mY5tQsCF4RXih/92SMzwFcMV6kMRDkEUKlrmTL42lgH8pfaBJ2A== X-Received: by 10.36.129.193 with SMTP id q184mr1584320itd.35.1473200499309; Tue, 06 Sep 2016 15:21:39 -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 f14sm691484ita.10.2016.09.06.15.21.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Sep 2016 15:21:37 -0700 (PDT) In-Reply-To: <73a01198-e334-2424-7143-8882092ffb78@lanl.gov> (Davis Herring's message of "Tue, 6 Sep 2016 16:07:08 -0600") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c09::230 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:207230 Archived-At: Davis Herring writes: >You just remember the file's size as well as its modtime when visiting >it -- don't compare to the buffer's size at all. (I thought I had >mentioned this earlier in the thread...) Oh -- remember the "true" size (that is, the unencrypted/uncompressed/unwhatevered) size of the file at the moment when it is first visited? As long as we're doing that, why not just remember the md5sum of the original content too? Then if the file size is the same, we can just compute the md5sum of current buffer contents and compare against the saved md5sum.