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.

bumped to the homepage by Community 14 hours ago

This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

  • Try // or /~/ to get a local path. The remote path will be greyed out. – nega Aug 19 at 20:33
  • Welcome to emacs.SE! Please try to only ask one question per post. – JeanPierre Aug 19 at 22:21
  • @nega , Thanks for the reply. I am using Ivy. Please see the documentation for counsel-find-file here - 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. – user23911 Aug 20 at 14:12
  • Dunno about any of that junk. Normal Emacs works the way I described. – nega Aug 20 at 15:21

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

  • 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 - 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? – user23911 Aug 21 at 15:36
  • Sorry, I don't use ivy. – Michael Albinus Aug 21 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy