all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* "file has changed" on network drive
@ 2013-01-29 10:03 Brendan Halpin
  2013-01-29 10:22 ` Damien Wyart
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Brendan Halpin @ 2013-01-29 10:03 UTC (permalink / raw)
  To: help-gnu-emacs

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?


Regards,

Brendan
-- 
Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
mailto:brendan.halpin@ul.ie    ULSociology on Facebook: http://on.fb.me/fjIK9t
http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "file has changed" on network drive
  2013-01-29 10:03 "file has changed" on network drive Brendan Halpin
@ 2013-01-29 10:22 ` Damien Wyart
  2013-01-29 11:06 ` Eli Zaretskii
       [not found] ` <mailman.18538.1359457603.855.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Damien Wyart @ 2013-01-29 10:22 UTC (permalink / raw)
  To: help-gnu-emacs

* Brendan Halpin <brendan.halpin@ul.ie> in gnu.emacs.help:
> 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 might experience the problem described here in detail:
https://bugzilla.samba.org/show_bug.cgi?id=3775

cifs has been patched to avoid the problem (in 2010), so maybe your
system doesn't have this patch? Or your problem is close but
different...

-- 
DW


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "file has changed" on network drive
  2013-01-29 10:03 "file has changed" on network drive Brendan Halpin
  2013-01-29 10:22 ` Damien Wyart
@ 2013-01-29 11:06 ` Eli Zaretskii
       [not found] ` <mailman.18538.1359457603.855.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2013-01-29 11:06 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Brendan Halpin <brendan.halpin@ul.ie>
> 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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "file has changed" on network drive
       [not found] ` <mailman.18538.1359457603.855.help-gnu-emacs@gnu.org>
@ 2013-01-29 11:18   ` Brendan Halpin
  2013-01-29 22:20     ` Brendan Halpin
  0 siblings, 1 reply; 5+ messages in thread
From: Brendan Halpin @ 2013-01-29 11:18 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, Jan 29 2013, Eli Zaretskii wrote:

> 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
>

It's emacs-snapshot but probably two weeks old. I'll upgrade tonight and
test. 

Thanks Eli and Damien.

Brendan
-- 
Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
mailto:brendan.halpin@ul.ie    ULSociology on Facebook: http://on.fb.me/fjIK9t
http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: "file has changed" on network drive
  2013-01-29 11:18   ` Brendan Halpin
@ 2013-01-29 22:20     ` Brendan Halpin
  0 siblings, 0 replies; 5+ messages in thread
From: Brendan Halpin @ 2013-01-29 22:20 UTC (permalink / raw)
  To: help-gnu-emacs

Thanks Eli, the update worked.

I had emacs-snapshot of 2012-12-31; updating it to the current version
has solved the problem.

For what it's worth, this is on Debian unstable, and the network drive
is a WD MyBookLive, which runs Linux, and is mounted by "mount -t cifs". 

Brendan
-- 
Brendan Halpin,   Department of Sociology,   University of Limerick,   Ireland
Tel: w +353-61-213147  f +353-61-202569  h +353-61-338562;  Room F1-009 x 3147
mailto:brendan.halpin@ul.ie    ULSociology on Facebook: http://on.fb.me/fjIK9t
http://teaching.sociology.ul.ie/bhalpin/wordpress         twitter:@ULSociology


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-29 22:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-29 10:03 "file has changed" on network drive Brendan Halpin
2013-01-29 10:22 ` Damien Wyart
2013-01-29 11:06 ` Eli Zaretskii
     [not found] ` <mailman.18538.1359457603.855.help-gnu-emacs@gnu.org>
2013-01-29 11:18   ` Brendan Halpin
2013-01-29 22:20     ` Brendan Halpin

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.