branch: externals/dtache commit c08072612fafb9b457c2cf3997ce20b4d221a303 Author: Niklas Eklund <niklas.ekl...@posteo.net> Commit: Niklas Eklund <niklas.ekl...@posteo.net>
Update rerun command with prefix argument Adding a prefix-argument to the dtache-rerun-session in order to be able to suppress the output from a session one wants to rerun. --- dtache.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/dtache.el b/dtache.el index d9debff0fc..9f52cc98ff 100644 --- a/dtache.el +++ b/dtache.el @@ -303,18 +303,21 @@ Optionally SUPPRESS-OUTPUT." (pop-to-buffer buffer-name))))) ;;;###autoload -(defun dtache-rerun-session (session) +(defun dtache-rerun-session (session &optional suppress-output) "Rerun SESSION." (interactive - (list (dtache-completing-read (dtache-get-sessions)))) + (list (dtache-completing-read (dtache-get-sessions)) + current-prefix-arg)) (when (dtache-valid-session session) (let* ((default-directory (dtache--session-working-directory session)) (dtache-session-action (dtache--session-action session)) (command (dtache--session-command session))) - (if-let ((run-fun (plist-get (dtache--session-action session) :run))) - (funcall run-fun command) - (dtache-start-session command))))) + (if suppress-output + (dtache-start-session command suppress-output) + (if-let ((run-fun (plist-get (dtache--session-action session) :run))) + (funcall run-fun command) + (dtache-start-session command)))))) ;;;###autoload (defun dtache-copy-session-output (session)