unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* tramp-handle-file-newer-than-file-p
@ 2002-08-15 15:42 Mario Lang
  2002-08-17 19:10 ` tramp-handle-file-newer-than-file-p Kai Großjohann
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Lang @ 2002-08-15 15:42 UTC (permalink / raw)


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/xxx@xxx.x.org]/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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-17 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-15 15:42 tramp-handle-file-newer-than-file-p Mario Lang
2002-08-17 19:10 ` tramp-handle-file-newer-than-file-p Kai Großjohann

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).