[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache 848f3a943a 108/158: Update attach naming
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache 848f3a943a 108/158: Update attach naming |
Date: |
Wed, 19 Jan 2022 18:58:03 -0500 (EST) |
branch: externals/dtache
commit 848f3a943a3e2b63fe065d7da6d4f161d8371806
Author: Niklas Eklund <niklas.eklund@zenseact.com>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Update attach naming
---
dtache-eshell.el | 2 +-
dtache-shell.el | 2 +-
dtache.el | 38 +++++++++++++++++++-------------------
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/dtache-eshell.el b/dtache-eshell.el
index 86ecca7bc1..f3f1d36387 100644
--- a/dtache-eshell.el
+++ b/dtache-eshell.el
@@ -33,7 +33,7 @@
;;;; Variables
(defcustom dtache-eshell-session-action
- '(:attach dtache-shell-command-attach
+ '(:attach dtache-attach
:view dtache-view-dwim
:run dtache-shell-command)
"Actions for a session created with `dtache-eshell'."
diff --git a/dtache-shell.el b/dtache-shell.el
index a353a72b41..301fc4d2c0 100644
--- a/dtache-shell.el
+++ b/dtache-shell.el
@@ -30,7 +30,7 @@
;;;; Variables
(defcustom dtache-shell-session-action
- '(:attach dtache-shell-command-attach
+ '(:attach dtache-attach
:view dtache-view-dwim
:run dtache-shell-command)
"Actions for a session created with `dtache-shell'."
diff --git a/dtache.el b/dtache.el
index 2d3c739c59..7f02d32d1a 100644
--- a/dtache.el
+++ b/dtache.el
@@ -109,7 +109,7 @@
:group 'dtache)
(defcustom dtache-shell-command-action
- '(:attach dtache-shell-command-attach
+ '(:attach dtache-attach
:view dtache-view-dwim
:run dtache-shell-command)
"Actions for a session created with `dtache-shell-command'."
@@ -269,8 +269,8 @@ Optionally SUPPRESS-OUTPUT."
(list (dtache-completing-read (dtache-get-sessions))))
(when (dtache-valid-session session)
(if (dtache--session-active-p session)
- (dtache-attach-session session)
- (dtache-view-session session))))
+ (dtache--attach-session session)
+ (dtache--view-session session))))
;;;###autoload
(defun dtache-post-compile-session (session)
@@ -623,33 +623,19 @@ If session is not valid trigger an automatic cleanup on
SESSION's host."
(dtache--update-sessions)
(dtache--db-get-sessions))
-(defun dtache-shell-command-attach (session)
+(defun dtache-attach (session)
"Attach to `dtache' SESSION."
(when (dtache-valid-session session)
(let* ((dtache--current-session session)
(dtache-session-mode 'attach)
(inhibit-message t))
(if (dtache--session-redirect-only session)
- (dtache-attach-session session)
+ (dtache--attach-session session)
(cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
(buffer "*Dtache Shell Command*"))
(funcall #'async-shell-command (dtache--session-command session)
buffer)
(with-current-buffer buffer (setq dtache--buffer-session
dtache--current-session)))))))
-(defun dtache-attach-session (session)
- "Attach to SESSION."
- (if (dtache--session-redirect-only session)
- (dtache-tail-output session)
- (if-let ((attach-fun (plist-get (dtache--session-action session) :attach)))
- (funcall attach-fun session)
- (dtache-tail-output session))))
-
-(defun dtache-view-session (session)
- "View SESSION."
- (if-let ((view-fun (plist-get (dtache--session-action session) :view)))
- (funcall view-fun session)
- (dtache-view-dwim session)))
-
;;;;; Other
(cl-defgeneric dtache-dtach-command (entity &optional concat)
@@ -931,6 +917,20 @@ Optionally make the path LOCAL to host."
short-home
(expand-file-name default-directory))))
+(defun dtache--attach-session (session)
+ "Attach to SESSION."
+ (if (dtache--session-redirect-only session)
+ (dtache-tail-output session)
+ (if-let ((attach-fun (plist-get (dtache--session-action session) :attach)))
+ (funcall attach-fun session)
+ (dtache-tail-output session))))
+
+(defun dtache--view-session (session)
+ "View SESSION."
+ (if-let ((view-fun (plist-get (dtache--session-action session) :view)))
+ (funcall view-fun session)
+ (dtache-view-dwim session)))
+
;;;;; Database
(defun dtache--db-initialize ()
- [elpa] externals/dtache 9c16dd3751 109/158: Update active to state, (continued)
- [elpa] externals/dtache 9c16dd3751 109/158: Update active to state, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3cc493e6b0 115/158: Add missing dtache-log-mode to detach-dwim, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache ebf9b491bd 117/158: Add variable for dtache-shell-command buffer, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e9f6794621 129/158: Rename log-directory to directory, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3969524f23 125/158: Improve dtache session header, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e0a45c055c 133/158: Address error in eshell/shell extension, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 34c7d23346 088/158: Make dtache-eshell compatible with recent changes, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 2354197acb 096/158: Fix error in dtache-compile, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 5da693be75 100/158: Update CHANGELOG, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 0c8241a33d 107/158: Update actions from defvar to defcustom, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 848f3a943a 108/158: Update attach naming,
ELPA Syncer <=
- [elpa] externals/dtache 52c82428ac 110/158: Remove documentation directory, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 9f948349a3 112/158: Rename dtache-detach to dtache-detach-dwim, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 4c47fa3ddb 122/158: Fix error in dtache-attach, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 71d7e3ad35 119/158: Update how duration is determined, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 5d78cfb3b3 142/158: Add attach command, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 94f207eeeb 149/158: Make dtache utilize notifications library, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 668f6aca83 157/158: Improve dtache-kill-session, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e3af56003d 063/158: Remove unnecessary header declarations, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache dd9c2a0095 066/158: Add contributions section in README, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 59f2ac4ab5 084/158: Rename dtache--dtach-mode to dtache-session-mode, ELPA Syncer, 2022/01/19