all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Set modtime of a local file?
@ 2004-03-13 19:39 Kai Grossjohann
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Grossjohann @ 2004-03-13 19:39 UTC (permalink / raw)


I'm trying to implement the KEEP-DATE flag for the copy-file operation
in Tramp.  Depending on circumstances, Tramp reads the source file
into a buffer, then uses write-region to write the target file.

If the source file is local and the target file is remote, then it
works to find out the last modtime of the source file and then invoke
"touch" on the target file.  Tramp assumes that the remote system is
Unix-like.

But if the source file is remote and the target file is local, then
I'm stuck.  After using write-region to write the buffer contents,
what can I do to make the file on disk match the (remote) source file?

tia,
Kai

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

* Re: Set modtime of a local file?
       [not found] <20040313234744.31A8860107@imf.math.ku.dk>
@ 2004-03-14  7:58 ` Lars Hansen
  2004-03-14 10:25   ` Kai Grossjohann
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Hansen @ 2004-03-14  7:58 UTC (permalink / raw)
  Cc: Kai Grossjohann

>
>
>After using write-region to write the buffer contents,
>what can I do to make the file on disk match the (remote) source file?
>  
>

Why not just make the existing function set_file_times (in sysdep.c) a 
lisp primitive?

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

* Re: Set modtime of a local file?
  2004-03-14  7:58 ` Lars Hansen
@ 2004-03-14 10:25   ` Kai Grossjohann
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Grossjohann @ 2004-03-14 10:25 UTC (permalink / raw)


Lars Hansen <larsh@math.ku.dk> writes:

>>After using write-region to write the buffer contents,
>>what can I do to make the file on disk match the (remote) source file?
>
> Why not just make the existing function set_file_times (in sysdep.c) a
> lisp primitive?

That's a good idea.  What do people think?

(I wasn't aware that there is a C function already, I just noticed the
lack of the Lisp function.)

Kai

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

end of thread, other threads:[~2004-03-14 10:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-13 19:39 Set modtime of a local file? Kai Grossjohann
     [not found] <20040313234744.31A8860107@imf.math.ku.dk>
2004-03-14  7:58 ` Lars Hansen
2004-03-14 10:25   ` Kai Grossjohann

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.