From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: master d0c77a1: Remove some assumptions about timestamp format Date: Fri, 28 Sep 2018 12:26:54 +0200 Message-ID: <87bm8hape9.fsf@gmx.de> References: <20180925021527.10418.61555@vcs0.savannah.gnu.org> <20180925021528.9A119204E8@vcs0.savannah.gnu.org> <87bm8lanwu.fsf@gmx.de> <87o9ck6270.fsf@gmx.de> <83h8ia6sj6.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1538130360 14443 195.159.176.226 (28 Sep 2018 10:26:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2018 10:26:00 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 28 12:25:56 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g5py5-0003di-4U for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2018 12:25:53 +0200 Original-Received: from localhost ([::1]:42543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5q0B-0001mi-MG for ged-emacs-devel@m.gmane.org; Fri, 28 Sep 2018 06:28:03 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5pzY-0001mZ-Nn for emacs-devel@gnu.org; Fri, 28 Sep 2018 06:27:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5pzS-0003iG-7T for emacs-devel@gnu.org; Fri, 28 Sep 2018 06:27:22 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:58455) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5pzO-0003aR-Ps; Fri, 28 Sep 2018 06:27:16 -0400 Original-Received: from detlef.gmx.de ([178.20.94.84]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LoVja-1fYSEt0IHq-00gcNI; Fri, 28 Sep 2018 12:26:57 +0200 Original-Received: from detlef.gmx.de ([178.20.94.84]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LoVja-1fYSEt0IHq-00gcNI; Fri, 28 Sep 2018 12:26:57 +0200 In-Reply-To: <83h8ia6sj6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 28 Sep 2018 09:32:45 +0300") X-Provags-ID: V03:K1:/hJ3FSHOhDy79GeBiasa8J6BWOQZZzPNlg4Fh7Y2Rcnp7JdCSQ1 t05W1mH27BW0krgnj8jyW2+PEvnERti4ccg2fcTmMI9jueIC6lP6sXuuI6GW+gyUwuY4XCY LHqUQUaedRXAADCmsL0Uu71Wc9q2DK8pJ7HHvpyvAky1h3Bth0rc775aGgeeiIlw4wufz2t gGlR75YyP5S41AtfXo2DA== X-UI-Out-Filterresults: notjunk:1;V01:K0:lzBfXdSZ6b8=:nOZQ4rp2wb5IZbN/bug8/t DC/TGMO3QVWyvARiHQ0hUzBgzR94vEDU1Pf1LS0gF3qGcgw5bElc07XKbnWVJyvaWKIjUalEO m5QdQT5ZSLbXHaZso5EZQ4AoZbwV4NDZ4Y9gQtmm/Wj0J6hcoFLBLJUXd92fd/QkO0dzozHpO N5LMZUznGNYhisDWGstJxCAlpFop+vfNh8fxnu1W86GLUWo1qWE1CLCIM59g7inD7EG0FwS5X /i/l/kSo3YY43JMhzj+JDJ/MDtrdZwOQVYidaO9oKt64BTMxqwkSm6hQNc3N4Kg7C5TBVjeds OX0g/gZnCUtVlZcBdp8oISuCUlMUwfXdmqJsi+XDdvYpl3mIEo4UBTP/cjTQ++LFDEbiTnwMD 0iVp8jYPW4qCYN/kn+E94HkhzbwTwP8F+cC7uGwd5SNW1/KoLJWnJA4W35GSz8/my06Obo7UH 3m7tjF0YOLNMo6L3CBZ9WkTimiRg5R/vx9JSs1tGEgbb0syfpnzfh38unpa/Iv1nc8ttDnWxk +Oh5tnwUmfn+MInGk9F6BhYMFL6RFHDrmZwkqdl1JuPiGjL6tO7tYR2vwlqCLaNwhTCZrDbVr UUfddoXKzOwDQBqVppLMCSUKDPFBuujIMoury/ulG7sBlUbG36N4VTa+s944JWKrWgTBR0azs OulJm7rMuYDcrjPkGyNcnzghih/dZ4BBtudm+UcmE0vlB9vil9HuEE8G6RsUvBTbTtUHutx6r b5BosviZdqKqaxyVN+X8IGjumfh7C0Tp7XNbxXfiXzFlrysOQbsXrxGdH98HVxLTJfQIrBC2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:230102 Archived-At: Eli Zaretskii writes: >> I'm afraid we need something better than that, as it mishandles NaNs. >> Also, there's no need for a special "invalid_time" value; you can just >> use a NaN. > > It's OK to support NaNs in time values, but I'm uneasy with the > recommendation to use NaN as an invalid time. IMO, NaNs should only > come out of calculations, never from initial literal values of a > program (except when the program wants to test NaN handling). Indeed. A NaN is not a time value all time functions do understand. For example, (current-time-string 0.0e+NaN) => (error "Specified time is not representable") I believe, a special string shall be returned here, like "Unspecified time" or so. > What is the problem with having a special invalid time value? Tramp will use such a constant anyway, it has taken '(0 0) until now. It will be returned by Tramp implementations of functions like `file-attributes' or `visited-file-modtime', and must be understood by the calling functions. `set-file-times', for example, does not understand this, and so do the functions in ls-lisp.el, and likely in Lisp packages in the wild. (write-region "foo" nil "/tmp/foo") (set-file-times "/tmp/foo" 0.0e+NaN) => (error "Specified time is not representable") `set-file-times' shall simply return nil in this case, as said in the docstring. Therefore it would be better to a have an agreed constant, which is understood by both Tramp and its callers. What's wrong with the result of invalid_timespec() of systime.h, as proposed earlier? Best regards, Michael.