From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 73709@debbugs.gnu.org, drew.adams@oracle.com
Subject: bug#73709: 29.4; Doc of `file-newer-than-file-p'
Date: Wed, 16 Oct 2024 08:54:07 +0300 [thread overview]
Message-ID: <867ca8r3sw.fsf@gnu.org> (raw)
In-Reply-To: <87o73kbsaq.fsf@web.de> (message from Michael Heerdegen on Wed, 16 Oct 2024 06:11:41 +0200)
> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: drew.adams@oracle.com, 73709@debbugs.gnu.org
> Date: Wed, 16 Oct 2024 06:11:41 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > "Last saved" assumes the file is edited, but this function doesn't
> > care whether a file has been edited. "Last written to" might be
> > better.
>
> Ok - "last written" then.
>
> > But the problem for which I find no good solution is that there are
> > ways to make the filesystem lie to us about when was file last written
> > to: use set-file-times in Emacs or the 'touch' shell command or
> > anything similar.
>
> Sure. But I thought we want to explain the abstraction? So, if you
> don't want to lie, why not say "in general this means the times when the
> files were last written" or so? As you said we _don't_ want to go to
> the level of implementation and file system specific details - so why
> discuss them at all? There are always details a short description
> doesn't cover ("newer" also didn't cover them).
>
> Of course you can add that "details depend on capabilities and features
> of the used file system and the chosen implementation (Tramp)". We do
> say similar things in other docstrings, too.
Two issues:
. "last written to" is incorrect if that time stamp was modified by
set-file-times and similar methods
. the interpretation of mtime to mean "newer" (per the function's
name) is problematic/incorrect when a file is copied with the
KEEP-TIME argument of copy-file (and similar facilities of other
commands, like 'cp')
I'm asking whether we care about these subtleties. E.g., someone
might claim that the second issue above means that
file-newer-than-file-p has a bug.
The current doc string says simply that last-modification times are
compared, and I wonder if that is not better left alone.
next prev parent reply other threads:[~2024-10-16 5:54 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 17:56 bug#73709: 29.4; Doc of `file-newer-than-file-p' Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-08 18:20 ` Eli Zaretskii
2024-10-08 18:40 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-09 0:45 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-09 13:31 ` Eli Zaretskii
2024-10-09 16:32 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-09 23:21 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-10 8:09 ` Eli Zaretskii
2024-10-10 11:08 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-11 0:23 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-11 5:56 ` Eli Zaretskii
2024-10-12 0:31 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-12 8:40 ` Eli Zaretskii
2024-10-12 22:48 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-13 5:13 ` Eli Zaretskii
2024-10-13 14:51 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-13 15:31 ` Eli Zaretskii
2024-10-13 17:01 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-13 18:30 ` Eli Zaretskii
2024-10-13 22:23 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-14 2:28 ` Eli Zaretskii
2024-10-15 1:10 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-15 13:46 ` Eli Zaretskii
2024-10-15 14:20 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-15 14:51 ` Eli Zaretskii
2024-10-15 15:01 ` Ship Mints
2024-10-15 16:21 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-15 16:23 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-15 16:24 ` Ship Mints
2024-10-16 4:11 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-16 5:54 ` Eli Zaretskii [this message]
2024-10-18 1:32 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-09 23:42 ` Stefan Kangas
2024-10-10 1:47 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-10 8:26 ` Eli Zaretskii
2024-10-11 0:41 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-11 6:03 ` Eli Zaretskii
2024-10-12 0:38 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-12 1:13 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=867ca8r3sw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=73709@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).