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

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

[elpa] externals/dtache 914daabbb8 092/158: Fix regression for shell-com


From: ELPA Syncer
Subject: [elpa] externals/dtache 914daabbb8 092/158: Fix regression for shell-command and compile
Date: Wed, 19 Jan 2022 18:58:01 -0500 (EST)

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

    Fix regression for shell-command and compile
    
    The approach with the start-process advice was too low level. It
    caused problems on remote hosts. Needs some more work.
---
 dtache-compile.el | 2 +-
 dtache.el         | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/dtache-compile.el b/dtache-compile.el
index 7a9d7e908b..57cec6a57d 100644
--- a/dtache-compile.el
+++ b/dtache-compile.el
@@ -75,7 +75,7 @@ Optionally EDIT-COMMAND."
           (cl-letf* ((name-function (lambda (_) buffer-name))
                      (dtache--current-session (or dtache--current-session
                                                   (dtache-create-session 
command))))
-            (apply compilation-start `(,command
+            (apply compilation-start `(,(dtache-dtach-command command t)
                                        ,(or mode 'dtache-compilation-mode)
                                        ,name-function
                                        ,highlight-regexp)))))
diff --git a/dtache.el b/dtache.el
index f1e0acafd6..628c03580c 100644
--- a/dtache.el
+++ b/dtache.el
@@ -452,11 +452,14 @@ Optionally SUPPRESS-OUTPUT."
                        (eq dtache-session-mode 'new)
                        (dtache--session-redirect-only 
dtache--current-session))))
              (dtache-session-mode 'new))
-        (apply #'start-file-process-shell-command `("dtache" nil ,command))
+        (progn (setq dtache-enabled nil)
+               (apply #'start-file-process-shell-command
+                      `("dtache" nil ,(dtache-dtach-command 
dtache--current-session t))))
       (cl-letf* ((dtache-session-mode 'create)
                   ((symbol-function #'set-process-sentinel) #'ignore)
                  (buffer "*Dtache Shell Command*"))
-        (funcall #'async-shell-command command buffer)
+        (setq dtache-enabled nil)
+        (funcall #'async-shell-command (dtache-dtach-command 
dtache--current-session t) buffer)
         (with-current-buffer buffer (setq dtache--buffer-session 
dtache--current-session))))))
 
 (defun dtache-update-sessions ()
@@ -556,7 +559,7 @@ Optionally make the path LOCAL to host."
                  (seq-do #'dtache-start-session-monitor))
 
     ;; Advices
-    (advice-add #'start-process :around #'dtache-start-process-advice)
+    ;; (advice-add #'start-process :around #'dtache-start-process-advice)
 
     ;; Add `dtache-shell-mode'
     (add-hook 'shell-mode-hook #'dtache-shell-mode)))



reply via email to

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