unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Geert Fannes" <Geert.Fannes@ikanconsulting.com>
Subject: RE: file changed on disk
Date: Mon, 7 Feb 2005 17:25:37 +0100	[thread overview]
Message-ID: <981622681D09194A89F3DEA9462B1BE7040181@everest> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1905 bytes --]

I just found a solution for my first question:
 ** Can I disable this timestamp checking behaviour of emacs?

By replacing in emacs-21.3/src/fileio.c

 if (st.st_mtime == b->modtime
      /* If both are positive, accept them if they are off by one second.  */
      || (st.st_mtime > 0 && b->modtime > 0
          && (st.st_mtime == b->modtime + 1
              || st.st_mtime == b->modtime - 1)))

to

  if (st.st_mtime == b->modtime
      /* If both are positive, accept them if they are off by one second.  */
      || (st.st_mtime > 0 && b->modtime > 0))
//          && (st.st_mtime == b->modtime + 1
//              || st.st_mtime == b->modtime - 1)))

the timecheck is effectively removed.

First, I tried to replace it with something like

  if (st.st_mtime == b->modtime
      /* If both are positive, accept them if they are off by one second.  */
      || (st.st_mtime > 0 && b->modtime > 0))
          && (st.st_mtime - b->modtime <= 5)
              && (b->modtime - st.st_mtime <= 5)))

which would allow any modification date that is off by a maximum of 5 seconds from the initial date, but that did not work. Does anyone know why this does not work? Does anyone know what happens if you substract two timestamps (I found somewhere that stat.st_mtime contains two members, one for the seconds and stuff and one for the nanosecond. Maybe my substraction procedure from above only allows timestamps that are off by 5 nanoseconds...)

I found something else that is strange: the original version of emacs on my Slackware box is 21.3.2. To get access to the source code, I downloaded the latest version from the emacs site. To my surprise,t his was version 21.3.1. Next to this, I had to close my shell and start a new one before the newly installed emacs version would run, Linux kept on starting 21.3.2 for some reason I am not aware off.

Greetings,
Geert.

[-- Attachment #1.2: Type: text/html, Size: 3036 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

             reply	other threads:[~2005-02-07 16:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-07 16:25 Geert Fannes [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-02-07 14:10 file changed on disk Geert Fannes

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=981622681D09194A89F3DEA9462B1BE7040181@everest \
    --to=geert.fannes@ikanconsulting.com \
    /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.
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).