* tramp-touch on NTemacs
@ 2007-03-09 22:08 Peter
2007-03-09 22:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.741.1173480436.7795.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: Peter @ 2007-03-09 22:08 UTC (permalink / raw)
To: help-gnu-emacs
Hi.
I'm running GNU Emacs 22.0.50.2 (i386-mingw-nt5.1.2600) under Windows
XP. I need to transfer files back and forth with a Linux machine at
work that does not allow ftp access. The pre-installed tramp package
seems to work just fine except when I try to copy a file from the
Linux machine back to my local XP machine. The file is copied, but I
get an error message saying "tramp-touch: touch failed". I am using
the default method (plink?); there is nothing in my .emacs file to
modify this. When I first experimented with tramp, it complained that
there wasn't a touch program, so I tried several versions that I
downloaded from the web, finally settling on the one from the UnxUtils
package available on Sourceforge.net. It seems to have the same
command-line options as the Unix versions, including -t.
I've looked at the tramp.el file for this error message. It is
embedded in some code that looks like the following excerpt:
(defun tramp-touch (file time)
"Set the last-modified timestamp of the given file.
TIME is an Emacs internal time value as returned by `current-time'."
(let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time)))
(if (tramp-tramp-file-p file)
(with-parsed-tramp-file-name file nil
(let ((buf (tramp-get-buffer multi-method method user host)))
(unless (zerop (tramp-send-command-and-check
multi-method method user host
(format "touch -t %s %s"
touch-time
localname)))
(pop-to-buffer buf)
(error "tramp-touch: touch failed, see buffer `%s' for details"
buf))))
;; It's a local file
(with-temp-buffer
(unless (zerop (call-process
"touch" nil (current-buffer) nil "-t" touch-time file))
(pop-to-buffer (current-buffer))
(error "tramp-touch: touch failed"))))))
I'm assuming that the error message is generated by the final line of
code above. However, I don't know any List and don't know how to
debug this further. I can, however, follow directions and would
appreciate suggestions on how to proceed. This error occurs with
whatever version of touch.exe I install on my system.
Thanks,
Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tramp-touch on NTemacs
2007-03-09 22:08 tramp-touch on NTemacs Peter
@ 2007-03-09 22:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.741.1173480436.7795.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2007-03-09 22:46 UTC (permalink / raw)
To: help-gnu-emacs; +Cc: help-emacs-windows
Have you tried the touch.exe from gnuwin32? I do not know if it works,
but it is more recent and also currently maintained. I would be
interested in hearing the result.
Peter wrote:
> Hi.
> I'm running GNU Emacs 22.0.50.2 (i386-mingw-nt5.1.2600) under Windows
> XP. I need to transfer files back and forth with a Linux machine at
> work that does not allow ftp access. The pre-installed tramp package
> seems to work just fine except when I try to copy a file from the
> Linux machine back to my local XP machine. The file is copied, but I
> get an error message saying "tramp-touch: touch failed". I am using
> the default method (plink?); there is nothing in my .emacs file to
> modify this. When I first experimented with tramp, it complained that
> there wasn't a touch program, so I tried several versions that I
> downloaded from the web, finally settling on the one from the UnxUtils
> package available on Sourceforge.net. It seems to have the same
> command-line options as the Unix versions, including -t.
>
> I've looked at the tramp.el file for this error message. It is
> embedded in some code that looks like the following excerpt:
>
> (defun tramp-touch (file time)
> "Set the last-modified timestamp of the given file.
> TIME is an Emacs internal time value as returned by `current-time'."
> (let ((touch-time (format-time-string "%Y%m%d%H%M.%S" time)))
> (if (tramp-tramp-file-p file)
> (with-parsed-tramp-file-name file nil
> (let ((buf (tramp-get-buffer multi-method method user host)))
> (unless (zerop (tramp-send-command-and-check
> multi-method method user host
> (format "touch -t %s %s"
> touch-time
> localname)))
> (pop-to-buffer buf)
> (error "tramp-touch: touch failed, see buffer `%s' for details"
> buf))))
> ;; It's a local file
> (with-temp-buffer
> (unless (zerop (call-process
> "touch" nil (current-buffer) nil "-t" touch-time file))
> (pop-to-buffer (current-buffer))
> (error "tramp-touch: touch failed"))))))
>
> I'm assuming that the error message is generated by the final line of
> code above. However, I don't know any List and don't know how to
> debug this further. I can, however, follow directions and would
> appreciate suggestions on how to proceed. This error occurs with
> whatever version of touch.exe I install on my system.
>
> Thanks,
> Peter
>
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <mailman.741.1173480436.7795.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2007-03-10 0:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-09 22:08 tramp-touch on NTemacs Peter
2007-03-09 22:46 ` Lennart Borgman (gmail)
[not found] ` <mailman.741.1173480436.7795.help-gnu-emacs@gnu.org>
2007-03-10 0:28 ` Peter
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.