From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: "file has changed" on network drive Date: Tue, 29 Jan 2013 13:06:28 +0200 Message-ID: <83fw1ki6yz.fsf@gnu.org> References: <8738xkuwzt.fsf@wivenhoe.ul.ie> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1359457611 26812 80.91.229.3 (29 Jan 2013 11:06:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2013 11:06:51 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 29 12:07:11 2013 Return-path: Envelope-to: geh-help-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 1U091u-0002PM-UJ for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jan 2013 12:07:07 +0100 Original-Received: from localhost ([::1]:55707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U091c-00052Z-MZ for geh-help-gnu-emacs@m.gmane.org; Tue, 29 Jan 2013 06:06:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U091R-00052I-1H for help-gnu-emacs@gnu.org; Tue, 29 Jan 2013 06:06:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U091P-0007Wb-M1 for help-gnu-emacs@gnu.org; Tue, 29 Jan 2013 06:06:36 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:42003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U091P-0007WP-Do for help-gnu-emacs@gnu.org; Tue, 29 Jan 2013 06:06:35 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MHD00200W35MG00@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Tue, 29 Jan 2013 13:06:10 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MHD000M9W69QRV0@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Tue, 29 Jan 2013 13:06:10 +0200 (IST) In-reply-to: <8738xkuwzt.fsf@wivenhoe.ul.ie> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88863 Archived-At: > From: Brendan Halpin > Date: Tue, 29 Jan 2013 10:03:34 +0000 > > I have a CIFS-mounted network drive, whose clock seems to be very > slightly different from my computer's clock (despite NTP on both > devices). Consequently when I edit a file on the drive, there is a small > discrepancy between (visited-file-modtime) and the file-system > timestamp, and Emacs complains that the file has changed on disc. The > difference is small, and only in the third and fourth elements of the > time as Emacs represents it (interestingly, on other file systems these > two elements are 0). > > Is there a known work-around for this problem? A function at writing > that uses set-visited-file-modtime to set the time stamp to the > filesystem value? If so, where to hook it in? You don't say which Emacs version you use. A very similar problem was lately fixed in the development sources, see http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13149