[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached 0e4aca6dab: Update register to watch when star
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached 0e4aca6dab: Update register to watch when starting session |
Date: |
Tue, 22 Nov 2022 12:57:37 -0500 (EST) |
branch: externals/detached
commit 0e4aca6dabcb1c68eb7e96aa51baa4cf6b586bf6
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Update register to watch when starting session
---
detached-compile.el | 4 ++--
detached.el | 14 ++++++--------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/detached-compile.el b/detached-compile.el
index cc0923a175..96063068e3 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -134,8 +134,8 @@ Optionally EDIT-COMMAND."
(detached-session-start-command
detached-current-session
:type 'string))
- (unless (detached-session-started-p detached-current-session)
- (detached-register-session detached-current-session))
+ (unless (detached-session-active-p detached-current-session)
+ (detached-watch-session detached-current-session))
(apply compilation-start `(,(if (detached-session-active-p
detached-current-session)
(detached-session-attach-command
detached-current-session
:type 'string)
diff --git a/detached.el b/detached.el
index e3d99f2b19..0bc77b56f4 100644
--- a/detached.el
+++ b/detached.el
@@ -759,7 +759,7 @@ active session. For sessions created with
`detached-compile' or
(defun detached--start-session-process (session start-command)
"Start SESSION with START-COMMAND."
- (detached-register-session session)
+ (detached-watch-session session)
(if (detached--session-local-p session)
(apply #'start-process-shell-command `("detached" nil ,start-command))
(apply #'start-file-process-shell-command `("detached" nil
,start-command))))
@@ -938,7 +938,7 @@ This function uses the `notifications' library."
(not (get-buffer-process
buffer)))))
(command (detached-session-start-command session
:type 'string)))
- (detached-register-session session)
+ (detached-watch-session session)
(funcall #'async-shell-command command buffer)
(with-current-buffer buffer
(setq detached-buffer-session session))))
@@ -954,11 +954,8 @@ This function uses the `notifications' library."
(detached-with-session session
(funcall (detached-session-run-function session) session)))))
-(defun detached-register-session (session)
- "Register the existence of SESSION and start monitoring it."
- (setf (detached--session-time session) `(:start ,(time-to-seconds
(current-time)) :end 0.0 :duration 0.0 :offset 0.0))
- (setf (detached--session-state session) 'started)
- (detached--db-update-entry session)
+(defun detached-watch-session (session)
+ "Start to watch SESSION."
(detached--watch-session-directory (detached-session-directory session)))
;;;;; Public session functions
@@ -966,7 +963,7 @@ This function uses the `notifications' library."
(cl-defun detached-session-start-command (session &key type)
"Return command to start SESSION with specified TYPE."
(when (detached--valid-dtach-executable-p session)
- (detached-register-session session)
+ (detached-watch-session session)
(detached-connection-local-variables
(let* ((socket (detached--session-file session 'socket t))
(detached-session-mode (detached--session-initial-mode session))
@@ -1846,6 +1843,7 @@ session and trigger a state transition."
(is-primary (detached--primary-detached-emacs-p session)))
(setq detached--unvalidated-session-ids (delete (detached-session-id
session) detached--unvalidated-session-ids))
(setf (detached--session-state session) 'active)
+ (setf (detached--session-time session) `(:start ,(time-to-seconds
(current-time)) :end 0.0 :duration 0.0 :offset 0.0))
(detached--db-update-entry session)))))
(defun detached--initialize-session (session)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/detached 0e4aca6dab: Update register to watch when starting session,
ELPA Syncer <=