• Stars
    star
    101
  • Rank 338,166 (Top 7 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Support for rsync from Emacs dired buffers

dired-rsync – asynchronous rsync from dired

https://stable.melpa.org/packages/dired-rsync-badge.svg https://melpa.org/packages/dired-rsync-badge.svg https://coveralls.io/repos/github/stsquad/dired-rsync/badge.svg?branch=master

Introduction

This package adds the command dired-rsync which allows the user to copy marked files in a dired buffer via rsync. This is useful, especially for large files, because the copy happens in the background and doesn’t lock up Emacs. It is also more efficient than using tramp’s own encoding methods for moving data between systems.

Configuration is simple as you only need to bind the dired-rsync command to your preferred dired binding.

(use-package dired-rsync
  :bind (:map dired-mode-map
              ("C-c C-r" . dired-rsync))

A second package in this repository provides a transient version called dired-rsync-transient. This wraps the command in a `magit` like transient interface allowing you to tweaks the parameters for your call.

(use-package dired-rsync-transient
  :bind (:map dired-mode-map
              ("C-c C-x" . dired-rsync-transient)))

Customisation

A variable called dired-rsync-modeline-status is provided for mode lines that will report the number of active rsync operations in progress. The variable dired-rsync-job-count contains the number of currently active dired-rsync jobs currently running.

For those that don’t like the way dired-rsync unmarks transferred files when it completes please see dired-rsync-unmark-on-completion.

If you want to tweak the way marks are collected you can customise dired-rsync-source-files and provide your own function to return a list of fully qualified names to include in the command.

From time to time the call to rsync may fail. dired-rsync keeps the process buffer around for debugging and reports to the console. You can customise dired-rsync-failed-hook with your own hook function or select the more aggressive dired-rsync--pop-to-rsync-failed-buf to pop straight to the buffer. Also you can customise dired-rsync-success-hook with your own hook function to provide notification for compleated transfers.

The options dired-rsync-command and dired-rsync-options are there to modify the call to rsync but a user is unlikely to need to tweak these.

Technical Notes

While you can use rsync to copy files locally the main use case is copying files to/from a remote system. The rsync tool is always run locally as rsync needs working SSH authentication to work. If you can access a remote machine via tramp/ssh without having to enter a password (because ssh-agent is working) then rsync should work fine.

You can also do a remote-to-remote copy although this does involve setting up a port forward so the first remote can access the second remote. Also as dired-rsync needs to reverse ssh from your source location it is best if you fully qualify the location in tramp (i.e. user@remote:/dest/path) so it can extract the correct username to login with. It’s ugly but it works.

The test used by dired-rsync is tramp-tramp-file-p which will mean any tramp path will attempt to be converted to an rsync path with optional ssh transport. Obviously if your remote target doesn’t also have ssh running and remote rsync binary this will fail. The reporting could be improved.

There have been several attempts at doing this but I found them wanting in usability. This attempts to clean up the ideas from:

in a hopefully cleaner and more idiomatic way.

More Repositories

1

emacs_chrome

A Chromium "clone" of It's All Text for spawning an editor to edit text areas in browsers. Based on David Hilley's original Chromium extension.
JavaScript
497
star
2

emacs-chromebooks

Some integrations for running a crouton powered emacs session on your Chromebook
Emacs Lisp
44
star
3

mpeg4ip

Git clone of the CVS repo of a now un-maintained project
C++
38
star
4

my-emacs-stuff

My .emacs and various support bits and pieces
Emacs Lisp
38
star
5

easytag

A git repo of the development series of EasyTag (as there was no official SCM). Since then the project has moved and is hosted at Gnome in it's own upstream repo.
C
28
star
6

dotfiles

A collection of .bashrc stuff and other dotfiles
Shell
18
star
7

emacs-mark-tools

A simple library for navigating the global and local mark rings in Emacs
Emacs Lisp
11
star
8

ps3enc

A bunch of scripts for handling media in a PS3/PS4 compatible way.
Python
8
star
9

rockbox

A git-svn repository tracking rockbox and whatever local changes I'm hacking with at the time
C
7
star
10

Gwibber

My hacks on the Gwibber Microblogging Client. Follows a few of the official branches
Python
6
star
11

async-org-babel

Emacs extension for executing org-babel blocks asynchronusly
Emacs Lisp
5
star
12

checkpatch-mode

A simple mode for running checkpatch scripts.
Emacs Lisp
5
star
13

scripts

A random collection of scripts to do a random collection of things.
Python
5
star
14

parsecvs

A hacked up copy of Kieth Packards parsecvs which contains mainly fprintfs and a few patches that fix things I ran into on the uber repo I was converting at work
C
5
star
15

stonx

A GIT conversion of the Sourceforge STonX repo.
C
3
star
16

same-diff-colour-test

A VisionEgg python script which is used for measuring colour sensitivity. This version hacked to use VISAGE
Python
3
star
17

retry

A wrapper for retrying failing functions, originally for running rsync on dodgy links
Python
3
star
18

openlayers-cbnl

Lightly patched Debian packge of OpenLayers
JavaScript
3
star
19

risu

My copy of Pete Maydell's risu code generator/tester (see git://git.linaro.org/people/pmaydell/risu.git)
Perl
3
star
20

qemu-mode

A modern comint based mode for running qemu
Emacs Lisp
3
star
21

curator

A meta-album curator
Python
3
star
22

Gentoo-Overlay

My Gentoo Overlay. Usually contains whatever ebuilds I'm currently hacking about with
Shell
2
star
23

testcases

A bunch of random testcases for various things
C
2
star
24

events-manager

My local hacks to Davide Benini's events manager to support RSVP codes and wedding type organisation
PHP
2
star
25

Personal-Weblog-to-Wordpress

A simple script to migrate data from Personal Weblog into Wordpress
1
star
26

jicmp

A working copy of the OpenNMS jicmp library
Java
1
star
27

find_text

A simple text finding utility for recovering text files from file-system dumps
Python
1
star
28

mydialler

A fork of NubDial/SpellDial for my own experimental hacking
Java
1
star
29

qemu-jeos

This is a simple build system that builds a super small environment that can be used within qemu-test.
1
star
30

dbgsym

A simple script to check the integrity of debug symbols on a system
Python
1
star
31

opengl-demo

Experimenting with Python and OpenGL
Python
1
star
32

cv

A copy of my current CV in org-mode form
Makefile
1
star