help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: eshell/cp not able to use Tramp syntax ?


From: Michael Albinus
Subject: Re: eshell/cp not able to use Tramp syntax ?
Date: Wed, 31 Oct 2007 21:30:21 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

"François Puitg" <address@hidden> writes:
> So I'll load the required library manually:
>
> ,----
> | [(meta x)] load-library esh-maint
> | [(meta x)] load-library em-unix
> | [(meta :)] (eshell/cp "/home/fran/Devel/Emacs/Org/test.c"
> |                       "/address@hidden/")
> `----
>
> Lisp backtrace below and debug info at the end of the mail.
>
> -- Frnçs
>
> Debugger entered--Lisp error: (wrong-type-argument number-char-or-marker-p (0 
> . 7498))
>   =((0 . 7498) 905219)
>   (and attr-target (or (not ...) (eq system-type ...)) (setq attr 
> (eshell-file-attributes ...)) (nth 10 attr-target) (nth 10 attr) (= (nth 10 
> attr-target) (nth 10 attr)) (nth 11 attr-target) (nth 11 attr) (= (nth 11 
> attr-target) (nth 11 attr)))
>   (cond ((string-match "\\`\\.\\.?\\'" ...) (if eshell-warn-dot-directories 
> ...)) ((and attr-target ... ... ... ... ... ... ... ...) (eshell-error ...)) 
> (t (let ... ...)))
>   (while files (setcar files (directory-file-name ...)) (cond (... ...) (... 
> ...) (t ...)) (setq files (cdr files)))
>   (let ((attr-target ...) (is-dir ...) attr) (if (and ... ... ...) (error 
> "%s: when %s multiple files, last argument must be a directory" command 
> action)) (while files (setcar files ...) (cond ... ... ...) (setq files ...)))
>   eshell-shuffle-files("cp" "copying" ("/home/fran/Devel/Emacs/Org/test.c") 
> "/address@hidden/" copy-file nil t nil)

I've debugged it down to an error in eshell-shuffle-files. With XEmacs 
21.4.20 and eshell from the XEmacs package repository, we have

       ((and attr-target
             (or (not (eshell-under-windows-p))
                 (eq system-type 'ms-dos))
             (setq attr (eshell-file-attributes (car files)))
             (nth 10 attr-target) (nth 10 attr)
             (= (nth 10 attr-target) (nth 10 attr))
             (nth 11 attr-target) (nth 11 attr)
             (= (nth 11 attr-target) (nth 11 attr)))

With GNU Emacs 23 and the builtin eshell from the CVS repository, where
it works, we have

       ((and attr-target
             (or (not (eshell-under-windows-p))
                 (eq system-type 'ms-dos))
             (setq attr (eshell-file-attributes (car files)))
             (nth 10 attr-target) (nth 10 attr)
             ;; Use equal, not -, since the inode and the device could
             ;; cons cells.
             (equal (nth 10 attr-target) (nth 10 attr))
             (nth 11 attr-target) (nth 11 attr)
             (equal (nth 11 attr-target) (nth 11 attr)))

So the error is already known (see the comment); XEmacs shall sync eshell.

Best regards, Michael.




reply via email to

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