GNU bug report logs - #18336
24.4.50; When editing externally changed file, Emacs asks too many questions

Previous Next

Package: emacs;

Reported by: David Kastrup <dak <at> gnu.org>

Date: Wed, 27 Aug 2014 08:19:01 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.4.50

Fixed in version 28.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #68 received at 18336 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: dak <at> gnu.org, stefan <at> marxist.se, 18336 <at> debbugs.gnu.org
Subject: Re: bug#18336: 24.4.50;
 When editing externally changed file, Emacs asks too many questions
Date: Mon, 02 Mar 2020 18:33:05 +0200
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: Stefan Kangas <stefan <at> marxist.se>,  Eli Zaretskii <eliz <at> gnu.org>,  18336 <at> debbugs.gnu.org
> Date: Mon, 02 Mar 2020 07:20:04 -0500
> 
> > and my /tmp file system where I also saw this is
> >
> > /dev/sda5 on / type ext4 (rw,noatime,discard)
> 
> Aha, this seems to be the key.  I ran my initial experiment in ~/tmp,
> which is mounted with relatime
> 
>     /dev/sda9 on /home type ext4 (rw,relatime,data=ordered)
> 
> When I do the same on /tmp, which is mounted noatime I see the extra
> "<file> changed on disk; really edit the buffer?" question on C-x C-s.
> 
>     /dev/sda8 on /tmp type ext4 (rw,noatime,data=ordered)

This seems to point to the call to lock_file we make in write_region
(which is called to save the buffer).  lock_file calls
verify-visited-file-modtime, which might be affected by the noatime
option.  But I don't understand how noatime could affect
verify-visited-file-modtime since the latter looks at mtime, not
atime.

Or maybe the time is not the issue here, and the problem is with the
check of the file's size that verify-visited-file-modtime performs?

Can someone who sees this step with GDB through lock_file and its
callees, and see what goes wrong there and why?




This bug report was last modified 5 years and 120 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.