Gilles Pion | 3 Sep 2007 19:01

chmod, chgrp, etc... inside dired over tramp


Using GNU Emacs 22.1.1 (sparc-sun-solaris2.9, X toolkit) 
Using tramp version 2.1.10

I'm pretty sure this worked with older versions:

Inside a dired buffer of a remote directory over tramp, using any function
on a file (like chmod (M), chgrp (G), etc) gives:

apply: Symbol's function definition is void: tramp-handle-call-process

Backtrace:

Debugger entered--Lisp error: (void-function tramp-handle-call-process)
  tramp-handle-call-process("chgrp" nil t nil "aa" "sysadm")
  apply(tramp-handle-call-process ("chgrp" nil t nil "aa" "sysadm"))
  (setq ad-return-value (apply (quote tramp-handle-call-process) (nconc ...
args)))
  (cond ((eq fnh ...) (setq ad-return-value ...)) ((eq fnh ...) (setq
ad-return-value ...)) (t (setq ad-return-value ...)))
  (let ((fnh ...)) (cond (... ...) (... ...) (t ...)))
  (let (ad-return-value) (let (...) (cond ... ... ...)) ad-return-value)
  call-process("chgrp" nil t nil "aa" "sysadm")
  apply(call-process "chgrp" nil t nil ("aa" "sysadm"))
  dired-call-process("chgrp" nil "aa" "sysadm")
  apply(dired-call-process ("chgrp" nil "aa" "sysadm"))
  tramp-run-real-handler(dired-call-process ("chgrp" nil "aa" "sysadm"))
  tramp-sh-file-name-handler(dired-call-process "chgrp" nil "aa" "sysadm")
  apply(tramp-sh-file-name-handler dired-call-process ("chgrp" nil "aa"
"sysadm"))
(Continue reading)

Michael Albinus | 4 Sep 2007 14:27
Picon
Picon
Gravatar

Re: chmod, chgrp, etc... inside dired over tramp

Gilles Pion <gpion <at> lfdj.com> writes:

> Using GNU Emacs 22.1.1 (sparc-sun-solaris2.9, X toolkit) 
> Using tramp version 2.1.10
>
> I'm pretty sure this worked with older versions:
>
> Inside a dired buffer of a remote directory over tramp, using any function
> on a file (like chmod (M), chgrp (G), etc) gives:
>
> apply: Symbol's function definition is void:
> tramp-handle-call-process

tramp-handle-call-process does exist in Tramp 2.1.10. It has been
renamed to tramp-handle-process-file in Tramp 2.1.11-pre. Maybe you
have mixed Tramp versions installed/visible? Note that Tramp
2.1.11-pre is also integrated in Emacs' trunk, it could be loaded
from there ...

Could you, please, check this with "M-x list-load-path-shadows"?

> Gilles

Best regards, Michael.
Gilles Pion | 4 Sep 2007 17:26

Re: chmod, chgrp, etc... inside dired over tramp


Very strange things happening with my tramp/emacs combo...

1st thing: "list-load-path-shadows" seem ok (tramp 1.10, installed in
site-lisp hiding tramp bundled with emacs):

/opt/emacs-22.1/share/emacs/site-lisp/trampver hides
/opt/emacs-22.1/share/emacs/22.1/lisp/net/trampver

/opt/emacs-22.1/share/emacs/site-lisp/tramp hides 
/opt/emacs-22.1/share/emacs/22.1/lisp/net/tramp

/opt/emacs-22.1/share/emacs/site-lisp/tramp-vc hides
/opt/emacs-22.1/share/emacs/22.1/lisp/net/tramp-vc

/opt/emacs-22.1/share/emacs/site-lisp/tramp-uu hides
/opt/emacs-22.1/share/emacs/22.1/lisp/net/tramp-uu

/opt/emacs-22.1/share/emacs/site-lisp/tramp-util hides
/opt/emacs-22.1/share/emacs/22.1/lisp/net/tramp-util

/opt/emacs-22.1/share/emacs/site-lisp/tramp-smb hides
/opt/emacs-22.1/share/emacs/22.1/lisp/net/tramp-smb

/opt/emacs-22.1/share/emacs/site-lisp/tramp-ftp hides
/opt/emacs-22.1/share/emacs/22.1/lisp/net/tramp-ftp

But, I just noticed that (require 'tramp) in my .emacs gives in *Messages*
buffer:
    Loading regexp-opt...done
(Continue reading)

Michael Albinus | 4 Sep 2007 17:40
Picon
Picon
Gravatar

Re: chmod, chgrp, etc... inside dired over tramp

Gilles Pion <gpion <at> lfdj.com> writes:

> But, I just noticed that (require 'tramp) in my .emacs gives in *Messages*
> buffer:
>     Loading regexp-opt...done
>     Wrong type argument: listp, ê

Sounds like a problem with a byte-compiled file. Did you compile
Tramp's *.el files with another Emacs flavor?

Could you, please, remove all tramp*.elc files in all locations? Does
it still happen?

> If I start emacs without init files (emacs -Q), read tramp.el inside a
> buffer and do "eval-buffer" this error does not happen... but... if I
> execute "eval-buffer" a second time the error re-appears

Which Tramp relevant settings do you have in your .emacs?

> Strange...

Indeed.

Best regards, Michael.
Gilles Pion | 4 Sep 2007 18:02

Re: chmod, chgrp, etc... inside dired over tramp


Please forget the  "Wrong type argument: listp, ê" thing, I've just fixed it
(FYI, tramp-persistency-file-name had been replaced inadvertently by a
directory)

Unfortunately,  the "Symbol's function definition is void:
tramp-handle-call-process" error is still here....

--

-- 
View this message in context: http://www.nabble.com/chmod%2C-chgrp%2C-etc...-inside-dired-over-tramp-tf4373216.html#a12481131
Sent from the Gnu - Tramp - Dev mailing list archive at Nabble.com.
Gilles Pion | 4 Sep 2007 18:14

Re: chmod, chgrp, etc... inside dired over tramp


> tramp-handle-call-process does exist in Tramp 2.1.10. 

This next piece of code is from tramp-util.el extracted my local
tramp-2.1.10.tar.gz archive , there is a reference to
tramp-handle-call-process, is this normal?

  (defadvice call-process
    (around tramp-advice-call-process activate)
    "Invoke `tramp-handle-call-process' for Tramp files."
    (let ((fnh (tramp-find-foreign-file-name-handler default-directory)))
      (cond ((eq fnh 'tramp-sh-file-name-handler)
	     (setq ad-return-value
		   (apply 'tramp-handle-call-process (ad-get-args 0))))
	    ((eq fnh 'tramp-fish-file-name-handler)
	     (setq ad-return-value
		   (apply 'tramp-fish-handle-call-process (ad-get-args 0))))
	    (t ad-do-it))))
  (add-hook 'tramp-util-unload-hook
	    '(lambda () (ad-unadvise 'call-process)))

--
Gilles

--

-- 
View this message in context: http://www.nabble.com/chmod%2C-chgrp%2C-etc...-inside-dired-over-tramp-tf4373216.html#a12481344
Sent from the Gnu - Tramp - Dev mailing list archive at Nabble.com.
Ted Zlatanov | 4 Sep 2007 18:17
X-Face
Favicon
Gravatar

emacs-rails over Tramp

rails.el does a lot of calls that engage Tramp, even for syntax
highlighting.  The effect is that as you type, the cursor will jump to
the end of the buffer a lot, and input will be lost.  This makes the
rails mode unusable over a Tramp connection.  I tested with the latest
rails.el from SVN (svn co svn://rubyforge/var/svn/emacs-rails/trunk
emacs-rails).

I'm not sure if this is a emacs-rails problem or a Tramp problem, but it
seems to me that Tramp should just work or fail gracefully.  Has anyone
else seen this?  I'll file the bug with the emacs-rails bug tracker if
it's not a Tramp issue.

Ted
Michael Albinus | 4 Sep 2007 21:08
Picon
Picon
Gravatar

Re: chmod, chgrp, etc... inside dired over tramp

Gilles Pion <gpion <at> lfdj.com> writes:

>> tramp-handle-call-process does exist in Tramp 2.1.10. 
>
> This next piece of code is from tramp-util.el extracted my local
> tramp-2.1.10.tar.gz archive , there is a reference to
> tramp-handle-call-process, is this normal?

I stay corrected. The renaming happened in tramp.el before the release
of 2.1.10, and in tramp-util.el after the release. My memories are like
a sieve ...

The following patch might solve it for you until Tramp 2.1.11 is shipped:

albinus <at> arthur:~/src/tramp/lisp$ cvs diff -c -r V-2-1-10 tramp-util.el 
Index: tramp-util.el
===================================================================
RCS file: /cvsroot/tramp/tramp/lisp/tramp-util.el,v
retrieving revision 2.46
retrieving revision 2.49
diff -c -r2.46 -r2.49
*** tramp-util.el       17 Jul 2007 20:49:43 -0000      2.46
--- tramp-util.el       28 Aug 2007 20:05:52 -0000      2.49
***************
*** 150,164 ****
            '(lambda () (ad-unadvise 'start-process-shell-command)))

    (defadvice call-process
!     (around tramp-advice-call-process activate)
!     "Invoke `tramp-handle-call-process' for Tramp files."
(Continue reading)

Michael Albinus | 4 Sep 2007 21:21
Picon
Picon
Gravatar

Re: chmod, chgrp, etc... inside dired over tramp

Gilles Pion <gpion <at> lfdj.com> writes:

> (FYI, tramp-persistency-file-name had been replaced inadvertently by a
> directory)

Good point: I've improved the error message.

Best regards, Michael.
Gilles Pion | 5 Sep 2007 08:29

Re: chmod, chgrp, etc... inside dired over tramp


Thanks for your help, it worked.
--
Gilles

--

-- 
View this message in context: http://www.nabble.com/chmod%2C-chgrp%2C-etc...-inside-dired-over-tramp-tf4373216.html#a12492379
Sent from the Gnu - Tramp - Dev mailing list archive at Nabble.com.

Gmane