Function: dired-rsync--sentinel

dired-rsync--sentinel is a natively compiled function defined in dired-rsync.el.

Signature

(dired-rsync--sentinel PROC DESC DETAILS)

Documentation

Process sentinel for rsync processes.

This gets called whenever the inferior PROC changes state as
  described by DESC. DETAILS provides access to additional
  information such as the locate of the dired-buffer.

Source Code

;; Defined in /nix/store/i42d1fmg6q3dci37c05j415vhqjrzi15-emacs-packages-deps/share/emacs/site-lisp/elpa/dired-rsync-20261005.758/dired-rsync.el
;;
;; Running rsync: We need to take care of a couple of things here. We
;; need to ensure we run from the local host as you shouldn't expect
;; the remote target to be as aware of the ssh shortcuts home as from
;; the local system out (.ssh/config). We also want to track when it
;; is finished so we can inform the user the copy is complete.
;;

(defun dired-rsync--sentinel(proc desc details)
  "Process sentinel for rsync processes.
This gets called whenever the inferior `PROC' changes state as
  described by `DESC'.  `DETAILS' provides access to additional
  information such as the locate of the dired-buffer."
  (let ((proc-buf (process-buffer proc)))
    (when (s-starts-with-p "finished" desc)
      ;; clean-up finished tasks
      (let ((dired-buf (plist-get details ':dired-buffer)))
        (when (and dired-rsync-unmark-on-completion
                   (buffer-live-p dired-buf))
          (with-current-buffer dired-buf
            (dired-unmark-all-marks)))
        (kill-buffer proc-buf))
      (run-hooks 'dired-rsync-success-hook))
    (dired-rsync--update-modeline)
    ;; If we still have a process buffer things didn't end well
    (when (and (not (process-live-p proc))
               (buffer-name proc-buf))
      (with-current-buffer proc-buf
        (run-hooks 'dired-rsync-failed-hook)))))