emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dtache c08072612f 127/158: Update rerun command with pr


From: ELPA Syncer
Subject: [elpa] externals/dtache c08072612f 127/158: Update rerun command with prefix argument
Date: Wed, 19 Jan 2022 18:58:05 -0500 (EST)

branch: externals/dtache
commit c08072612fafb9b457c2cf3997ce20b4d221a303
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]