2

I am using dired-do-copy to copy a file from remote using tramp to local. When Copy file to path is promted. I used / C-j to go to local path but the path stays in the same directory , does not go to local root from remote.

I have also tried M-x copy-file , M-x gnus-copy-file and I have having the same issue as above.

  • Emacs version - 26.2
  • Local Os - MacOs
  • Remote server OS(Tramp) - RHEL
  • Swiper version - 20190708.1110

Steps to replicate -

  1. Login to a remote using tramp
  2. Open a directory in remote using dired.
  3. Mark a file to copy, and run M-x dired-do-copy.
  4. Swiper/IVY will prompt the path.
  5. Type '/ C-j' to go to local.
  6. The path stays the same.
  7. Same thing happens to M-x copy-file in tramp mode too.

Trying to implement this functionality - https://superuser.com/questions/445564/how-do-you-copy-files-from-a-remote-server-to-a-local-folder-in-emacs-using-dire/445568

Also is there a way to disable counsel-find-file when dired-do-copy is triggered.

  • Try `//` or `/~/` to get a local path. The remote path will be greyed out. – nega Aug 19 '19 at 20:33
  • Welcome to emacs.SE! Please try to only ask one question per post. – JeanPierre Aug 19 '19 at 22:21
  • @nega , Thanks for the reply. I am using Ivy. Please see the documentation for `counsel-find-file` here - https://oremacs.com/2019/07/20/ivy-0.12.0/ . '/ C-j' will take me to local root but the functionality does not work `copy-file` or `dired-do-copy` function is triggered. –  Aug 20 '19 at 14:12
  • Dunno about any of that junk. Normal Emacs works the way I described. – nega Aug 20 '19 at 15:21
  • @user23911 It works for me using Ivy and Counsel. The UI doesn't make it clear, but the '/' is shown following the full TRAMP path, and is fontified differently. It becomes much more clear if you do something like '/tmp/'. The prompt switches so that only the '/tmp' is shown, no more TRAMP path. If you're getting different behavior it might be something in your setup. Be sure to try with `emacs -q` – gregoryg May 17 '20 at 15:40

1 Answers1

0

If your minibuffer contains a remote path, you could disable that by typing three slashes "///". See also the Tramp manual https://www.gnu.org/software/tramp/#File-name-completion

Michael Albinus
  • 6,647
  • 14
  • 20
  • Hi Micheal, Thanks for the reply. I am sure this works in Vanilla emacs but This is not working when I am using Ivy. I have opened issue here - https://github.com/abo-abo/swiper/issues/2205. Also can you please let me know if I can disable Ivy when I run M-x Copy-file in tramp? –  Aug 21 '19 at 15:36
  • Sorry, I don't use ivy. – Michael Albinus Aug 21 '19 at 19:12