emacs-devel
[Top][All Lists]
Advanced

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

tramp-handle-file-newer-than-file-p


From: Mario Lang
Subject: tramp-handle-file-newer-than-file-p
Date: Thu, 15 Aug 2002 17:42:41 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu)

Hello.

I've just tried a very cool thing, and it actually worked, but only have way :/.

Well, emacs-wiki.el can publish a set of wikipages as html.  Now,
WIBNI this worked with a Tramp path as publishing-directory?

Actually, it does!  But only for the first time you publish.

emacs-wiki does the obvious thing, it checks if the wikifile is newer than
the published version, so it does:

file-newer-than-file-p("/home/mlang/debian/notes/BrlTty"
                       "/[su/address@hidden/home/xxx/public_html/BrlTty.html")

It tries to compare the dates of a local and a remote file.

But said function explicitly prevents that:

(defun tramp-handle-file-newer-than-file-p (file1 file2)
  "Like `file-newer-than-file-p' for tramp files."
  (cond ((not (file-exists-p file1))
         nil)
        ((not (file-exists-p file2))
         t)
        ;; We are sure both files exist at this point.  We assume that
        ;; both files are Tramp files, otherwise we issue an error
        ;; message.

Is it really necessary to do that?  Can't we just compare them here.  If
yes, that would be really great for emacs-wiki publishing :).

And for all other cases where file-newer-than-file-p may compare
a local and a remote file.

-- 
CYa,
  Mario





reply via email to

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