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

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

[elpa] externals/dtache 34c7d23346 088/158: Make dtache-eshell compatibl


From: ELPA Syncer
Subject: [elpa] externals/dtache 34c7d23346 088/158: Make dtache-eshell compatible with recent changes
Date: Wed, 19 Jan 2022 18:58:01 -0500 (EST)

branch: externals/dtache
commit 34c7d233461a3c4fcfc8b3289c7f49b2fbed8c69
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Make dtache-eshell compatible with recent changes
---
 dtache-eshell.el | 20 +++++++++-----------
 dtache.el        |  2 +-
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/dtache-eshell.el b/dtache-eshell.el
index e1fff1136c..fe2542b924 100644
--- a/dtache-eshell.el
+++ b/dtache-eshell.el
@@ -32,8 +32,7 @@
 
 ;;;; Variables
 
-(defvar dtache-eshell-command nil)
-(defvar dtache-shell-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))
 
 ;;;; Functions
 
@@ -54,18 +53,16 @@
     (dtache-completing-read sessions)))
 
 (defun dtache-eshell-maybe-create-session ()
-  "Create a session if `dtache-eshell-command' value is t."
-  (when dtache-eshell-command
+  "Create a session if `dtache-enabled' value is t."
+  (when dtache-enabled
     (let* ((dtache-session-mode 'create)
-           (dtache-session-action dtache-shell-session-action)
+           (dtache-session-action dtache-eshell-session-action)
            (command (mapconcat #'identity
                                `(,eshell-last-command-name
                                  ,@eshell-last-arguments)
-                               " "))
-           (session (dtache-create-session command)))
-      (setq eshell-last-arguments (dtache-dtach-command session))
-      (setq dtache--buffer-session session))
-    (setq eshell-last-command-name "dtach")))
+                               " ")))
+      (setq dtache--current-session (dtache-create-session command))
+      (setq dtache--buffer-session dtache--current-session))))
 
 (defun dtache-eshell-get-dtach-process ()
   "Return `eshell' process if `dtache' is running."
@@ -83,7 +80,8 @@ If prefix-argument directly DETACH from the session."
   (interactive "P")
   (let* ((dtache-session-origin 'eshell)
          (dtache-session-mode (if detach 'new 'create))
-         (dtache-eshell-command t))
+         (dtache-enabled t)
+         (dtache--current-session nil))
     (call-interactively #'eshell-send-input)))
 
 ;;;###autoload
diff --git a/dtache.el b/dtache.el
index 2dc2a34c5d..207c60bdd3 100644
--- a/dtache.el
+++ b/dtache.el
@@ -456,7 +456,7 @@ Optionally SUPPRESS-OUTPUT."
               (and (not (eq dtache-session-mode 'attach))
                    (or suppress-output
                        (eq dtache-session-mode 'new)
-                       (dtache-redirect-only-p command))))
+                       (dtache--session-redirect-only 
dtache--current-session))))
              (dtache-session-mode 'new))
         (apply #'start-file-process-shell-command
                `("dtache" nil ,command))



reply via email to

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