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

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

[elpa] externals/detached b4e3f1933c 3/3: Another attempt to fix problem


From: ELPA Syncer
Subject: [elpa] externals/detached b4e3f1933c 3/3: Another attempt to fix problem with local sessions
Date: Fri, 11 Nov 2022 06:57:30 -0500 (EST)

branch: externals/detached
commit b4e3f1933c21878f34dd22efabb7ec2a76cd1096
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Another attempt to fix problem with local sessions
---
 detached-compile.el | 3 ++-
 detached.el         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/detached-compile.el b/detached-compile.el
index bfa753cd6c..2a7f2dee58 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -88,7 +88,7 @@ Optionally EDIT-COMMAND."
            (detached-session-mode 'attach)
            (detached--current-session session)
            (detached-local-session (detached--session-local session))
-           (default-directory (detached--session-working-directory session)))
+           (default-directory (detached--session-directory session)))
       (compilation-start (detached--session-command session)))))
 
 ;;;;; Support functions
@@ -97,6 +97,7 @@ Optionally EDIT-COMMAND."
 (defun detached-compile--start (_)
   "Run in `compilation-start-hook' if `detached-enabled'."
   (when detached-enabled
+    (setq-local default-directory (detached--session-working-directory 
detached--current-session))
     (setq detached--buffer-session detached--current-session)
     (setq compile-command (detached--session-command 
detached--current-session))
     (setq compilation-arguments nil)
diff --git a/detached.el b/detached.el
index 9e9a47fbbe..c6e996f812 100644
--- a/detached.el
+++ b/detached.el
@@ -893,12 +893,13 @@ This function uses the `notifications' library."
     (cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
                (buffer (get-buffer-create detached--shell-command-buffer))
                (detached-local-session (detached--session-local session))
-               (default-directory (detached--session-working-directory 
session))
+               (default-directory (detached--session-directory session))
                (command (detached--shell-command session t)))
       (when (get-buffer-process buffer)
         (setq buffer (generate-new-buffer (buffer-name buffer))))
       (funcall #'async-shell-command command buffer)
       (with-current-buffer buffer
+        (setq-local default-directory (detached--session-working-directory 
session))
         (setq detached--buffer-session detached--current-session)))))
 
 ;;;;; Public session functions



reply via email to

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