[EMAIL PROTECTED] writes:
> Michael,
Hi Tom,
> When in a dired and I mark some files and then do a "w"
> (copy-filename-as-kill), I get the list of names added to the kill ring.
> If I go on then to do a "0-w", I get the list
> including the full path. But I invariably don't want the
> "ssh:/[EMAIL PROTECTED]:" as part of the names. I want just the path as if I
> was on that machine. Know what I mean?
> The same when I have the cursor on the directory at the top of the dired
> and I hit the "w". I want just the path without the remote part.
>
> Can this already be done? Would you consider adding this if it isn't there
> now?
Tramp cannot change it, because dired-copy-filename-as-kill uses
standard filename operations. But you could advice this function:
(defadvice dired-copy-filename-as-kill
(after tw-advice-dired-copy-filename-as-kill () activate)
"Use only localname of remote files in kill ring."
(when (stringp ad-return-value)
(kill-new
(mapconcat
(lambda (x) (or (file-remote-p x 'localname) x))
(split-string ad-return-value)
" ")
'replace)))
This needs Emacs 23, because of the additional parameter of
file-remote-p. If you run Emacs 22 + Tramp 2.1, you must call
tramp-handle-file-remote-p instead.
> thanks!
> tom
Best regards, Michael.
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel