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

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

[elpa] externals/detached 058852ea30: Store local property in session ob


From: ELPA Syncer
Subject: [elpa] externals/detached 058852ea30: Store local property in session object
Date: Mon, 7 Nov 2022 12:57:30 -0500 (EST)

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

    Store local property in session object
    
    If detached-local-session is set it forces a session to be created on
    the local host, even if the working directory is on a remote host.
    
    This property needs to be stored in the session object for it to work
    properly when attaching/re-running a session.
---
 CHANGELOG.org       |  1 +
 detached-compile.el |  4 ++--
 detached.el         | 13 +++++++++----
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index e551353fe7..fd5a47de49 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -5,6 +5,7 @@
 * Development
 
 - Add =edit-and-run= command, which is convenient when a session command needs 
to be tweaked before re-running.
+- Fix bug caused by incorrect adaptation to detached-local-session
 
 * Version 0.9.2 (2022-11-01)
 
diff --git a/detached-compile.el b/detached-compile.el
index eaf51ea8a7..bfa753cd6c 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -87,8 +87,8 @@ Optionally EDIT-COMMAND."
     (let* ((detached-enabled t)
            (detached-session-mode 'attach)
            (detached--current-session session)
-           (default-directory
-             (detached--session-directory session)))
+           (detached-local-session (detached--session-local session))
+           (default-directory (detached--session-working-directory session)))
       (compilation-start (detached--session-command session)))))
 
 ;;;;; Support functions
diff --git a/detached.el b/detached.el
index 60ce2152b4..5496d87a23 100644
--- a/detached.el
+++ b/detached.el
@@ -249,7 +249,7 @@ Valid values are: create, new and attach")
   "The version of `detached-session'.
 This version is encoded as [package-version].[revision].")
 
-(defconst detached-minimum-session-version "0.9.1.1"
+(defconst detached-minimum-session-version "0.9.2.0"
   "The version of `detached-session' that the package is compatible with.")
 
 ;;;;; Faces
@@ -373,6 +373,7 @@ This version is encoded as [package-version].[revision].")
   (degraded nil :read-only t)
   (env nil :read-only t)
   (action nil :read-only t)
+  (local nil :read-only t)
   (annotation)
   (time nil)
   (status nil)
@@ -469,7 +470,8 @@ The session is compiled by opening its output and enabling
    (list (detached-completing-read (detached-get-sessions))
          current-prefix-arg))
   (when (detached-valid-session session)
-    (let* ((default-directory
+    (let* ((detached-local-session (detached--session-local session))
+           (default-directory
              (detached--session-working-directory session))
            (detached-session-mode (or detached-session-mode
                                       (detached--session-initial-mode 
session)))
@@ -489,7 +491,8 @@ The session is compiled by opening its output and enabling
    (list (detached-completing-read (detached-get-sessions))
          current-prefix-arg))
   (when (detached-valid-session session)
-    (let* ((default-directory
+    (let* ((detached-local-session (detached--session-local session))
+           (default-directory
              (detached--session-working-directory session))
            (detached-session-mode (or detached-session-mode
                                       (detached--session-initial-mode 
session)))
@@ -688,6 +691,7 @@ active session.  For sessions created with 
`detached-compile' or
                                     :time `(:start ,(time-to-seconds 
(current-time)) :end 0.0 :duration 0.0 :offset 0.0)
                                     :status '(unknown . 0)
                                     :annotation detached-session-annotation
+                                    :local detached-local-session
                                     :size 0
                                     :directory 
(detached--get-session-directory)
                                     :env (detached--env command)
@@ -888,7 +892,8 @@ This function uses the `notifications' library."
          (inhibit-message t))
     (cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
                (buffer (get-buffer-create detached--shell-command-buffer))
-               (default-directory (detached--session-directory session))
+               (detached-local-session (detached--session-local session))
+               (default-directory (detached--session-working-directory 
session))
                (command (detached--shell-command session t)))
       (when (get-buffer-process buffer)
         (setq buffer (generate-new-buffer (buffer-name buffer))))



reply via email to

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