From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#13149: 24.3.50; Emacs thinks file was changed outside Emacs, but it was not Date: Mon, 14 Jan 2013 18:57:43 +0400 Message-ID: <50F41CE7.60306@gmail.com> References: <6CDE13E3BCAA4AFAAB8BCE105C6ABF12@us.oracle.com> <874njs19zb.fsf@yandex.ru> <50F3935A.2090003@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358175541 8333 80.91.229.3 (14 Jan 2013 14:59:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 14 Jan 2013 14:59:01 +0000 (UTC) Cc: 13149@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 14 15:59:16 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TulVI-0002G6-8n for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Jan 2013 15:59:12 +0100 Original-Received: from localhost ([::1]:39524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TulV2-0002di-48 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Jan 2013 09:58:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55549) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TulUn-0002aF-V3 for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 09:58:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TulUl-0003g8-8r for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 09:58:41 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TulUl-0003g0-5g for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 09:58:39 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TulV8-0000vJ-Kg for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 09:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Jan 2013 14:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: unreproducible moreinfo Original-Received: via spool by 13149-submit@debbugs.gnu.org id=B13149.13581755013493 (code B ref 13149); Mon, 14 Jan 2013 14:59:02 +0000 Original-Received: (at 13149) by debbugs.gnu.org; 14 Jan 2013 14:58:21 +0000 Original-Received: from localhost ([127.0.0.1]:60042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TulUS-0000uG-BE for submit@debbugs.gnu.org; Mon, 14 Jan 2013 09:58:21 -0500 Original-Received: from mail-lb0-f171.google.com ([209.85.217.171]:56197) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TulUM-0000tz-Hl for 13149@debbugs.gnu.org; Mon, 14 Jan 2013 09:58:16 -0500 Original-Received: by mail-lb0-f171.google.com with SMTP id gf7so3019092lbb.16 for <13149@debbugs.gnu.org>; Mon, 14 Jan 2013 06:57:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ifELS64A7FHNv20oj2wVAjLbw8wSky9nCsXteEXZKPE=; b=dsmF/34RVAljuZMv7KOP3tzBHTjhesf45nhFw8PnXS6oEJw8s91hkVPvdxQzfyZPHQ Xiz5mgFxRbzeNCUTpR2mrhhivo+U6+XXvYh+nytZqEQpsgVwqVbUzEROKDBtn7Hlu41j qN0wGv6b3fCnfawZ1K+gsifft8hMfxMpxfMj69nBTLY8aT8lWmCLIW5HdLH7Cn/PKS0r bh8A8XD1kgB4v0w2YTlaa2QEE4Yly2bEchENdTayq5KjWd7cxvZSSljJJoU/CJNuK+Kk pGHx3D9EE/yVkWjIF44s2VnZLJVELeUM+hcBVBQci76YgROtHx+w6vAXDTJ5+ekgRTAM lPzQ== X-Received: by 10.112.99.2 with SMTP id em2mr26520339lbb.11.1358175462857; Mon, 14 Jan 2013 06:57:42 -0800 (PST) Original-Received: from [192.168.1.5] ([178.252.98.87]) by mx.google.com with ESMTPS id iw6sm5432901lab.2.2013.01.14.06.57.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jan 2013 06:57:41 -0800 (PST) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: <50F3935A.2090003@yandex.ru> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69759 Archived-At: On 14.01.2013 9:10, Dmitry Gutov wrote: > On 12.12.2012 2:54, Drew Adams wrote: >>>> Anyway, hoping this helps in some way... >>> >>> I've been seeing the same kind of prompts lately when editing files in >>> Emacs in Ubuntu inside a virtual machine. >>> >>> IIRC all those files were were mounted from the host machine >>> (MS Windows 7) using the vboxsf file system type. >> >> Good to know that someone else is seeing something similar. >> >> In my case, I'm using Windows XP and am not using vboxsf or anything else >> special - just an ordinary laptop. > > So, I can now reproduce it 100% in the conditions I mentioned above. And > it's mighty annoying. > > 0. Open a file. > 1. Make some changes. Emacs complies. > 2. Press C-x C-s, saved successfully. > 3. Try to make a single modification. Emacs instantly prompts "... > changed on disk; really edit the buffer?". > > Answer yes -> goto 4, answer no -> goto 3. > Answer "revert", buffer reverts, goto -> 1. > > 4. Make modifications, try to save: "... has changed since visited or > save. Save anyway?" Answer yes -> goto 2. > > If auto-revert-mode is enabled, and you wait the required interval of > time after 2. without making modifications, the buffer is "reverted", > also goto -> 1. > > All this on the latest trunk. A build from the latest emacs-24 doesn't > exhibit the problem. Same with not-exactly-latest builds from these > branches I had a few hours ago, with the possible exception of > auto-revert-mode, IIRC it was less reliably helpful. Not sure. Bisect points to revision 110875 (eggert@cs.ucla.edu-20121113013514-5dej3lndyeb2dwq3): Fix a race with verify-visited-file-modtime. Since at least 1991 Emacs has ignored an mtime difference of no more than one second, but my guess is that this was to work around file system bugs that were fixed long ago. Since the race is causing problems now, let's remove that code. * fileio.c (Fverify_visited_file_modtime): Do not accept a file whose time stamp is off by no more than a second. Insist that the file time stamps match exactly. Paul, any suggestions?