stsquad / dired-rsync

Support for rsync from Emacs dired buffers
GNU General Public License v3.0
126 stars 16 forks source link

Consider using expand-file-name for destination #9

Closed glynnforrest closed 6 years ago

glynnforrest commented 6 years ago

Thanks for the brilliant package, I encountered the ora-dired-rsync defun through google and was looking to clean it up until I spotted you'd already done it.

Would it be possible to get the real path of the file using expand-file-name?

It'd be great to run (dired-rsync "~/Desktop") instead of (dired-rsync (expand-file-name "~/Desktop")).

stsquad commented 6 years ago

Hmm I think so but I'll need to check for potential interactions elsewhere. The default call to dired-rsync is to pick up the path from the interactive prompt. That comes out fully qualified (although according to the docs you should call expand-file-name on the result). I also need to be sure expand file name won't choke on tramp path.

glynnforrest commented 6 years ago

Thanks. I looked into writing a patch but got scared off by the compat code for tramp, I'm not that familiar with it. It's no problem to expand the file name manually, I just thought I'd mention the potential for a small improvement. Feel free to close this issue if a fix would only complicate the code.

Having a single key to sync a load of files to the desktop is a total game changer for me, by the way. 👏

stsquad commented 6 years ago

@glynnforrest can you test and confirm master is OK for you?

glynnforrest commented 6 years ago

@stsquad Perfect, thank you for taking the time to do that!