[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache 71966f0d2f 099/158: Add run as an action propert
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache 71966f0d2f 099/158: Add run as an action property |
Date: |
Wed, 19 Jan 2022 18:58:02 -0500 (EST) |
branch: externals/dtache
commit 71966f0d2f3c4cf5bb6e2951b8ddcfc0d7370359
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Add run as an action property
By adding a run property it makes it possible to rerun a session
through the same command as before. This is especially noticeable for
dtache-compile sessions.
---
dtache-compile.el | 2 +-
dtache-eshell.el | 2 +-
dtache-shell.el | 2 +-
dtache.el | 9 ++++++---
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/dtache-compile.el b/dtache-compile.el
index 923e475781..824b977f38 100644
--- a/dtache-compile.el
+++ b/dtache-compile.el
@@ -29,7 +29,7 @@
;;;; Variables
-(defvar dtache-post-compile-session-action '(:attach dtache-compile-attach
:view dtache-post-compile-session))
+(defvar dtache-post-compile-session-action '(:attach dtache-compile-attach
:view dtache-post-compile-session :run dtache-compile))
;;;; Commands
diff --git a/dtache-eshell.el b/dtache-eshell.el
index addbf7a708..fb0387775c 100644
--- a/dtache-eshell.el
+++ b/dtache-eshell.el
@@ -32,7 +32,7 @@
;;;; Variables
-(defvar dtache-eshell-session-action '(:attach dtache-shell-command-attach
:view dtache-view-dwim))
+(defvar dtache-eshell-session-action '(:attach dtache-shell-command-attach
:view dtache-view-dwim :run dtache-shell-command))
;;;; Functions
diff --git a/dtache-shell.el b/dtache-shell.el
index 4fae7c4ea2..7329b0b03d 100644
--- a/dtache-shell.el
+++ b/dtache-shell.el
@@ -31,7 +31,7 @@
(defvar dtache-shell-history-file nil
"File to store history.")
-(defvar dtache-shell-session-action '(:attach dtache-shell-command-attach
:view dtache-view-dwim)
+(defvar dtache-shell-session-action '(:attach dtache-shell-command-attach
:view dtache-view-dwim :run dtache-shell-command)
"Actions for a session created with `dtache-shell'.")
;;;; Functions
diff --git a/dtache.el b/dtache.el
index 108e710f0c..b90e6bfe75 100644
--- a/dtache.el
+++ b/dtache.el
@@ -79,7 +79,7 @@
"An alist of annotators for metadata.")
(defvar dtache-timer-configuration '(:seconds 10 :repeat 60 :function
run-with-timer)
"A property list defining how often to run a timer.")
-(defvar dtache-shell-command-action '(:attach dtache-shell-command-attach
:view dtache-view-dwim)
+(defvar dtache-shell-command-action '(:attach dtache-shell-command-attach
:view dtache-view-dwim :run dtache-shell-command)
"Actions for a session created with `dtache-shell-command'.")
(defvar dtache-annotation-format
`((:width 3 :function dtache--active-str :face dtache-active-face)
@@ -266,8 +266,11 @@ Optionally SUPPRESS-OUTPUT."
(when (dtache-valid-session session)
(let* ((default-directory
(dtache--session-working-directory session))
- (dtache-session-action (dtache--session-action session)))
- (dtache-start-session (dtache--session-command 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)))))
;;;###autoload
(defun dtache-copy-session-output (session)
- [elpa] externals/dtache eab014faad 050/158: Version 0.2, (continued)
- [elpa] externals/dtache eab014faad 050/158: Version 0.2, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9a2f4a4d43 057/158: Introduce caching variable for candidates, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 02b93a3778 060/158: Minor cleanup, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache d693d4c386 065/158: Update README with links to blog posts, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 69b001d0e5 069/158: Make eshell-preoutput-filter-functions local, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache be23732c84 079/158: Update documentation in README, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 2e5a097da4 080/158: Implement dtache-compile-open, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c09328ca1e 081/158: Add actions to a session, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 82e5859d5a 098/158: Improve dtache-detach-session, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache f73aa7ef98 089/158: Cleanup dtache-shell, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 71966f0d2f 099/158: Add run as an action property,
ELPA Syncer <=
- [elpa] externals/dtache 5831137cf7 101/158: Rename dtache-initialize to dtache-setup, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9746f4713c 106/158: Rename session-directory to log-directory, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c6aece77d2 113/158: Enhance dtache-detach-dwim command, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache bf71be0eae 118/158: Change output-size to log-size, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache f77c57f608 120/158: Update duration part 2, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c8a99aed35 123/158: Add version to the dtache database, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 4fa1c9e8a2 134/158: Simplify call to dtache--dtach-arg, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3942dc6326 135/158: Remove unnecessary checks for dtache-session-mode, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3aa5babca5 139/158: Update table formatting, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache ee8f3efa26 144/158: Version 0.3, ELPA Syncer, 2022/01/19