bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18336: 24.4.50; When editing externally changed file, Emacs asks too


From: Eli Zaretskii
Subject: 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@gmail.com>
> Cc: Stefan Kangas <stefan@marxist.se>,  Eli Zaretskii <eliz@gnu.org>,  
> 18336@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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]