From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Geert Fannes" Newsgroups: gmane.emacs.help Subject: RE: file changed on disk Date: Mon, 7 Feb 2005 17:25:37 +0100 Message-ID: <981622681D09194A89F3DEA9462B1BE7040181@everest> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0146362556==" X-Trace: sea.gmane.org 1107793456 8824 80.91.229.2 (7 Feb 2005 16:24:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 7 Feb 2005 16:24:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 07 17:24:16 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CyBgG-0002kw-56 for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Feb 2005 17:24:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CyBuP-0005UQ-P6 for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Feb 2005 11:38:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CyBsG-0004b5-Gd for help-gnu-emacs@gnu.org; Mon, 07 Feb 2005 11:36:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CyBsD-0004ZO-7B for help-gnu-emacs@gnu.org; Mon, 07 Feb 2005 11:36:30 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CyBsD-0004ZD-2n for help-gnu-emacs@gnu.org; Mon, 07 Feb 2005 11:36:29 -0500 Original-Received: from [195.238.2.201] (helo=outmx020.isp.belgacom.be) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CyBfF-0007Nc-FH for help-gnu-emacs@gnu.org; Mon, 07 Feb 2005 11:23:06 -0500 Original-Received: from outmx020.isp.belgacom.be (localhost [127.0.0.1]) by outmx020.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j17GMxHL005409 for ; Mon, 7 Feb 2005 17:22:59 +0100 (envelope-from ) Original-Received: from EVEREST.NEXIM.COM (mail.mechelen.ikan.be [81.241.231.4]) by outmx020.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with ESMTP id j17GMrKD005356 for ; Mon, 7 Feb 2005 17:22:53 +0100 (envelope-from ) X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: file changed on disk Thread-Index: AcUNHsOWZruWJPGGQ82gmaFc5m6D8gAEX8vx Original-To: "Geert Fannes" , X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:23941 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23941 This is a multi-part message in MIME format. --===============0146362556== Content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C50D31.A84D50C8" This is a multi-part message in MIME format. ------_=_NextPart_001_01C50D31.A84D50C8 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 =3D=3D 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 =3D=3D b->modtime + 1 || st.st_mtime =3D=3D b->modtime - 1))) to if (st.st_mtime =3D=3D 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 =3D=3D b->modtime + 1 // || st.st_mtime =3D=3D b->modtime - 1))) the timecheck is effectively removed. First, I tried to replace it with something like if (st.st_mtime =3D=3D 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 <=3D 5) && (b->modtime - st.st_mtime <=3D 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. ------_=_NextPart_001_01C50D31.A84D50C8 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: file changed on disk

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 =3D=3D 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 =3D=3D b->modtime + 1
            &= nbsp; || st.st_mtime =3D=3D b->modtime - 1)))

to

  if (st.st_mtime =3D=3D 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 =3D=3D b->modtime + 1
//            = ;  || st.st_mtime =3D=3D b->modtime - 1)))

the timecheck is effectively removed.

First, I tried to replace it with something like

  if (st.st_mtime =3D=3D 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 <=3D 5)
            &= nbsp; && (b->modtime - st.st_mtime <=3D 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.

------_=_NextPart_001_01C50D31.A84D50C8-- --===============0146362556== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============0146362556==--