The excellent dired-async library works by advising two functions, dired-create-files and wdired-do-rename. The first one is used by almost every user-facing command that copies or moves files (dired-do-copy, among others).
Except dired-ranger-paste and dired-ranger-move, that more or less reimplement part of the functionality provided by dired-create-files with the primitives copy-file or rename-file. This is why those operations were unaffected by dired-async-mode.
This PR changes the implementation of dired-ranger-copy and dired-ranger-move to a much more simple wrapper around dired-create-files, which allows get the asynchronous operations when, and only when, dired-async-mode is activated.
Since dired-create-files takes care of the reverting of the relevant buffers, the function dired-ranger--revert-target is not needed anymore.
Fix #119
Fix #160
In what is my humble opinion the simplest way possible.
The excellent
dired-async
library works by advising two functions,dired-create-files
andwdired-do-rename
. The first one is used by almost every user-facing command that copies or moves files (dired-do-copy
, among others).Except
dired-ranger-paste
anddired-ranger-move
, that more or less reimplement part of the functionality provided bydired-create-files
with the primitivescopy-file
orrename-file
. This is why those operations were unaffected bydired-async-mode
.This PR changes the implementation of
dired-ranger-copy
anddired-ranger-move
to a much more simple wrapper arounddired-create-files
, which allows get the asynchronous operations when, and only when,dired-async-mode
is activated.Since
dired-create-files
takes care of the reverting of the relevant buffers, the functiondired-ranger--revert-target
is not needed anymore.Fix #119 Fix #160
In what is my humble opinion the simplest way possible.
Feel free to ask any questions.
Best,
Aymeric Agon-Rambosson