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

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

[elpa] externals/detached 241eb39e9a 1/2: Add initial mode to session


From: ELPA Syncer
Subject: [elpa] externals/detached 241eb39e9a 1/2: Add initial mode to session
Date: Mon, 5 Sep 2022 10:57:31 -0400 (EDT)

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

    Add initial mode to session
---
 CHANGELOG.org       | 2 ++
 detached-compile.el | 2 +-
 detached.el         | 5 ++++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index d33b977276..d0d4c454f2 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,6 +4,8 @@
 
 * Development
 
+- Add an =initial-mode= property to a session. This enables sessions that were 
created using =create= mode instead of =create-and-attach= to inherit this 
property when a session is being rerun.
+
 * Version 0.8.0 (2022-09-02)
 
 - Change to semantic versioning
diff --git a/detached-compile.el b/detached-compile.el
index 9347ce1680..c759d0d692 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -57,7 +57,7 @@ Optionally enable COMINT if prefix-argument is provided."
          (detached-session-origin (or detached-session-origin 'compile))
          (detached-session-action (or detached-session-action
                                       detached-compile-session-action))
-         (detached-session-mode 'create-and-attach))
+         (detached-session-mode (or detached-session-mode 'create-and-attach)))
     (compile command comint)))
 
 ;;;###autoload
diff --git a/detached.el b/detached.el
index 5763eada5b..ba03f03e05 100644
--- a/detached.el
+++ b/detached.el
@@ -199,7 +199,7 @@ Valid values are: create, new and attach")
 (defvar detached-metadata-annotators-alist nil
   "An alist of annotators for metadata.")
 
-(defconst detached-session-version "0.8.0.0"
+(defconst detached-session-version "0.8.0.1"
   "The version of `detached-session'.
 This version is encoded as [package-version].[revision].")
 
@@ -283,6 +283,7 @@ This version is encoded as [package-version].[revision].")
   (command nil :read-only t)
   (origin nil :read-only t)
   (working-directory nil :read-only t)
+  (initial-mode nil :read-only t)
   (directory nil :read-only t)
   (metadata nil :read-only t)
   (host nil :read-only t)
@@ -380,6 +381,7 @@ The session is compiled by opening its output and enabling
   (when (detached-valid-session session)
     (let* ((default-directory
              (detached--session-working-directory session))
+           (detached-session-mode (detached--session-initial-mode session))
            (detached-session-action (detached--session-action session))
            (command (detached--session-command session)))
       (if suppress-output
@@ -577,6 +579,7 @@ active session.  For sessions created with 
`detached-compile' or
                                     :action detached-session-action
                                     :working-directory 
(detached--get-working-directory)
                                     :degraded (detached-degraded-command-p 
command)
+                                    :initial-mode detached-session-mode
                                     :time `(:start ,(time-to-seconds 
(current-time)) :end 0.0 :duration 0.0 :offset 0.0)
                                     :status '(unknown . 0)
                                     :size 0



reply via email to

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