emacs-devel
[Top][All Lists]
Advanced

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

Re: master daea9b3 1/2: Read mailcaps again only when necessary


From: Eli Zaretskii
Subject: Re: master daea9b3 1/2: Read mailcaps again only when necessary
Date: Mon, 01 Nov 2021 20:56:18 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Lars Ingebrigtsen <larsi@gnus.org>,  gregory@heytings.org,
>   emacs-devel@gnu.org
> Date: Mon, 01 Nov 2021 14:35:00 -0400
> 
> > Once again, the key for recording the time stamp is the file name you
> > pass, so that key must be unique, and that means file-truename.
> 
> I'm not sure `file-truename` is indispensable or even desirable.
> E.g.:
> 
> - read file ~/fileA which is a symlink to /foo/A,
>   with `file-truename` when `file-changed-p` is called it records that
>   /foo/A has timestamp T1.
> - read ~/fileB which is a normal file.  When `file-changed-p` is called it
>   records that ~/fileB has timestamp T2.
> - user changes ~/fileB into a symlink to /foo/A
> - we go and check whether ~/fileB has changed: when `file-changed-p` is
>   called it passes it to `file-truename` before it looks up the
>   hash-table; it then sees that it's still T1 and will say "everything
>   good, ~/fileB hasn't changed".

That's why I think we should also record the size and the inode, and
we probably should do that before taking file-truename.  The latter is
just for recording.

Of course, the situation you described is also highly improbable: why
should the same program care about two files in exactly that sequence
as to make your point for you?  What are the chances of that?



reply via email to

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