"asynchrous copy-file and copy-directory in emacs-lisp?" Code Answer

32

I found the answer to this myself, I use emacs-async like this:

(async-start
    `(lambda()
        (copy-file ,local ,remote-path t t)
        ,local)
    (lambda(return-path)
        (message "Upload '%s' finished" return-path))))

Place your paths in the variables local and remote-path. For directories, just change (copy-file) to (copy-directory).

Also I think you can use emacs-deferred too, however I haven't tried it yet.

By indeterminately sequenced on February 15 2022

Answers related to “asynchrous copy-file and copy-directory in emacs-lisp?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.