emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: time values


From: Luc Teirlinck
Subject: Re: time values
Date: Sun, 11 Jul 2004 10:57:00 -0500 (CDT)

I do not see why `visited-file-modtime could not be 0 at that point.
What about the following:

===File ~/tramp-diff-3======================================
*** tramp.el    26 Jun 2004 16:46:18 -0500      1.46
--- tramp.el    11 Jul 2004 10:43:12 -0500      
***************
*** 2337,2349 ****
        (with-parsed-tramp-file-name f nil
        (let* ((attr (file-attributes f))
               (modtime (nth 5 attr)))
!         (cond ((and attr (not (equal modtime '(0 0))))
!                ;; Why does `file-attributes' return a list (HIGH
!                ;; LOW), but `visited-file-modtime' returns a cons
!                ;; (HIGH . LOW)?
                 (let ((mt (visited-file-modtime)))
                   (< (abs (tramp-time-diff
!                           modtime (list (car mt) (cdr mt)))) 2)))
                (attr
                 (save-excursion
                   (tramp-send-command
--- 2337,2354 ----
        (with-parsed-tramp-file-name f nil
        (let* ((attr (file-attributes f))
               (modtime (nth 5 attr)))
!         (cond ((eq (visited-file-modtime) 0))
!               ((and attr (not (equal modtime '(0 0))))
                 (let ((mt (visited-file-modtime)))
                   (< (abs (tramp-time-diff
!                           modtime
!                           ;; For compatibility, deal with both the old
!                           ;; (HIGH . LOW) and the new (HIGH LOW)
!                           ;; return values of `visited-file-modtime'.
!                           (if (and (consp mt) (atom (cdr mt)))
!                               (list (car mt) (cdr mt))
!                             mt)))
!                          2)))
                (attr
                 (save-excursion
                   (tramp-send-command
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]