From: Paul Eggert Date: Sun, 18 Nov 2012 17:10:35 +0000 (-0800) Subject: More minor time fixes. X-Git-Tag: emacs-24.2.90~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=535efd4a430b6595a30efaa2919e565ad21209b9;p=emacs.git More minor time fixes. * calendar/time-date.el: Commentary fix. * net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change; too much other code depends on (0 0) time stamps. * net/tramp.el (tramp-time-less-p, tramp-time-subtract): Add a couple of FIXME comments. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 920f893bb7d..a6fdf7ebc4b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,12 @@ 2012-11-18 Paul Eggert + More minor time fixes. + * calendar/time-date.el: Commentary fix. + * net/tramp-sh.el (tramp-do-file-attributes-with-ls): Undo last change; + too much other code depends on (0 0) time stamps. + * net/tramp.el (tramp-time-less-p, tramp-time-subtract): + Add a couple of FIXME comments. + Minor cleanup for times as lists of four integers. * files.el (dir-locals-directory-cache): * ps-bdf.el (bdf-file-mod-time, bdf-read-font-info): diff --git a/lisp/calendar/time-date.el b/lisp/calendar/time-date.el index 38b766084c9..6e967bd8c79 100644 --- a/lisp/calendar/time-date.el +++ b/lisp/calendar/time-date.el @@ -30,11 +30,10 @@ ;; value equal to HIGH * 2^16 + LOW + USEC * 10^-6 + PSEC * 10^-12 ;; seconds, where missing components are treated as zero. HIGH can be ;; negative, either because the value is a time difference, or because -;; the machine supports negative time stamps that fall before the -;; epoch. The macro `with-decoded-time-value' and the -;; function `encode-time-value' make it easier to deal with these -;; three formats. See `time-subtract' for an example of how to use -;; them. +;; the machine supports negative time stamps that fall before the epoch. +;; The macro `with-decoded-time-value' and the function +;; `encode-time-value' make it easier to deal with these formats. +;; See `time-subtract' for an example of how to use them. ;;; Code: diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5b090047f8d..059e1e63c77 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1270,11 +1270,12 @@ target of the symlink differ." res-uid ;; 3. File gid. res-gid - ;; 4. Last access time, as a list of integers in the same format - ;; as `current-time'. + ;; 4. Last access time, as a list of integers. Normally this would be + ;; in the same format as `current-time', but the subseconds part is not + ;; currently implemented, and (0 0) denotes an unknown time. ;; 5. Last modification time, likewise. ;; 6. Last status change time, likewise. - '(0 0 0 0) '(0 0 0 0) '(0 0 0 0) ;CCC how to find out? + '(0 0) '(0 0) '(0 0) ;CCC how to find out? ;; 7. Size in bytes (-1, if number is out of range). res-size ;; 8. File modes, as a string of ten letters or dashes as in ls -l. diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 874c0aa7fef..6157da20db7 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -3761,6 +3761,7 @@ Invokes `password-read' if available, `read-passwd' else." ("oct" . 10) ("nov" . 11) ("dec" . 12)) "Alist mapping month names to integers.") +;; FIXME: Shouldn't this also look at any subseconds parts of T1 and T2? ;;;###tramp-autoload (defun tramp-time-less-p (t1 t2) "Say whether time value T1 is less than time value T2." @@ -3770,6 +3771,7 @@ Invokes `password-read' if available, `read-passwd' else." (and (= (car t1) (car t2)) (< (nth 1 t1) (nth 1 t2))))) +;; FIXME: Shouldn't this also look at any subseconds parts of T1 and T2? (defun tramp-time-subtract (t1 t2) "Subtract two time values. Return the difference in the format of a time value."