[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached 4e36d9de69 10/38: Make current session public
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached 4e36d9de69 10/38: Make current session public |
Date: |
Thu, 17 Nov 2022 17:57:54 -0500 (EST) |
branch: externals/detached
commit 4e36d9de692525c77a81c0b6bac69fad4a393ed8
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Make current session public
---
detached-compile.el | 22 +++++++++++-----------
detached-eshell.el | 2 +-
detached-shell.el | 4 ++--
detached-vterm.el | 6 +++---
detached.el | 24 ++++++++++++------------
5 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/detached-compile.el b/detached-compile.el
index bcf1b6fc29..e19ac4a882 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -58,7 +58,7 @@ Optionally enable COMINT if prefix-argument is provided."
(detached-session-action (or detached-session-action
detached-compile-session-action))
(detached-session-mode (or detached-session-mode
'create-and-attach))
- (detached--current-session (detached-create-session command)))
+ (detached-current-session (detached-create-session command)))
(compile command comint)))
;;;###autoload
@@ -70,7 +70,7 @@ Optionally EDIT-COMMAND."
(detached-session-action detached-compile-session-action)
(detached-session-origin 'compile)
(detached-session-mode 'create-and-attach)
- (detached--current-session edit-command))
+ (detached-current-session edit-command))
(recompile edit-command)))
(defun detached-compile-kill ()
@@ -86,7 +86,7 @@ Optionally EDIT-COMMAND."
(when (detached-valid-session session)
(let* ((detached-enabled t)
(detached-session-mode 'attach)
- (detached--current-session session)
+ (detached-current-session session)
(detached-local-session (detached--session-local session))
(default-directory (detached--session-directory session)))
(compilation-start (detached--session-command session)))))
@@ -97,9 +97,9 @@ 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-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)
(detached-compile--replace-modesetter)
(when detached-filter-ansi-sequences
@@ -112,11 +112,11 @@ Optionally EDIT-COMMAND."
(if detached-enabled
(pcase-let ((`(,_command ,mode ,name-function ,highlight-regexp)
args))
(if (eq detached-session-mode 'create)
- (detached-start-detached-session
detached--current-session)
- (apply compilation-start `(,(if (detached-session-started-p
detached--current-session)
- (detached-session-attach-command
detached--current-session
+ (detached-start-detached-session
detached-current-session)
+ (apply compilation-start `(,(if (detached-session-started-p
detached-current-session)
+ (detached-session-attach-command
detached-current-session
:type 'string)
- (detached-session-start-command
detached--current-session
+ (detached-session-start-command
detached-current-session
:type
'string))
,(or
mode 'detached-compilation-mode)
,name-function
@@ -131,7 +131,7 @@ Optionally EDIT-COMMAND."
(goto-char (point-min))
(when (re-search-forward regexp nil t)
(delete-region (match-beginning 0) (match-end 0))
- (insert (detached--session-command
detached--current-session))))))
+ (insert (detached--session-command
detached-current-session))))))
(defun detached-compile--compilation-detached-filter ()
"Filter to modify the output in a compilation buffer."
diff --git a/detached-eshell.el b/detached-eshell.el
index 53c943005f..7612bf2e2e 100644
--- a/detached-eshell.el
+++ b/detached-eshell.el
@@ -67,7 +67,7 @@ If prefix-argument directly DETACH from the session."
(let* ((detached-session-origin 'eshell)
(detached-session-mode (if detach 'create 'create-and-attach))
(detached-enabled t)
- (detached--current-session nil))
+ (detached-current-session nil))
(advice-add #'eshell-external-command :around
#'detached-eshell-external-command)
(call-interactively #'eshell-send-input)))
diff --git a/detached-shell.el b/detached-shell.el
index d7e58830e3..c080b87c5b 100644
--- a/detached-shell.el
+++ b/detached-shell.el
@@ -76,7 +76,7 @@ cluttering the `comint-history' with dtach commands."
(list (detached-shell--select-session)))
(when (detached-valid-session session)
(if (detached-session-active-p session)
- (cl-letf ((detached--current-session session)
+ (cl-letf ((detached-current-session session)
(comint-input-sender #'detached-shell--attach-input-sender)
((symbol-function 'comint-add-to-input-history) (lambda (_)
t)))
(setq detached--buffer-session session)
@@ -102,7 +102,7 @@ cluttering the `comint-history' with dtach commands."
"Attach to `detached--session' and send the attach command to PROC."
(let* ((detached-session-mode 'attach)
(input
- (detached-session-attach-command detached--current-session
+ (detached-session-attach-command detached-current-session
:type 'string)))
(comint-simple-send proc input)))
diff --git a/detached-vterm.el b/detached-vterm.el
index 948fa64f5a..5c5b89eef7 100644
--- a/detached-vterm.el
+++ b/detached-vterm.el
@@ -58,13 +58,13 @@ Optionally DETACH from it."
(detached-session-action detached-vterm-session-action)
(detached-session-mode
(if detach 'create 'create-and-attach))
- (detached--current-session (detached-create-session input))
- (command (detached-session-start-command
detached--current-session
+ (detached-current-session (detached-create-session input))
+ (command (detached-session-start-command
detached-current-session
:type 'string)))
(vterm-send-C-a)
(vterm-send-C-k)
(process-send-string vterm--process command)
- (setq detached--buffer-session detached--current-session)
+ (setq detached--buffer-session detached-current-session)
(vterm-send-C-e)
(vterm-send-return)))
diff --git a/detached.el b/detached.el
index e0596fab69..7c9fe5905b 100644
--- a/detached.el
+++ b/detached.el
@@ -337,7 +337,7 @@ This version is encoded as [package-version].[revision].")
(defvar-local detached--buffer-session nil
"The `detached-session' session in current buffer.")
-(defvar detached--current-session nil
+(defvar detached-current-session nil
"The current session.")
(defvar detached--session-candidates nil
@@ -418,7 +418,7 @@ Optionally SUPPRESS-OUTPUT if prefix-argument is provided."
detached-shell-command-session-action))
(detached-session-mode (or detached-session-mode
(if suppress-output 'create
'create-and-attach)))
- (detached--current-session (detached-create-session command)))
+ (detached-current-session (detached-create-session command)))
(detached-start-session command suppress-output)))
;;;###autoload
@@ -712,26 +712,26 @@ Optionally SUPPRESS-OUTPUT."
(or suppress-output
(eq detached-session-mode 'create)))
(detached-session-mode 'create))
- (let ((detached--current-session
- (or detached--current-session
+ (let ((detached-current-session
+ (or detached-current-session
(detached-create-session command))))
(setq detached-enabled nil)
(detached-start-detached-session
- detached--current-session))
+ detached-current-session))
(cl-letf* ((detached-session-mode 'create-and-attach)
- (detached--current-session
- (or detached--current-session
+ (detached-current-session
+ (or detached-current-session
(detached-create-session command)))
((symbol-function #'set-process-sentinel) #'ignore)
(buffer (detached--generate-buffer
detached--shell-command-buffer
(lambda (buffer)
(not (get-buffer-process
buffer)))))
- (command (detached-session-start-command
detached--current-session
+ (command (detached-session-start-command
detached-current-session
:type 'string)))
(setq detached-enabled nil)
(funcall #'async-shell-command command buffer)
(with-current-buffer buffer
- (setq detached--buffer-session detached--current-session))))))
+ (setq detached--buffer-session detached-current-session))))))
(defun detached-start-detached-session (session)
"Start SESSION in detached mode."
@@ -894,7 +894,7 @@ This function uses the `notifications' library."
(defun detached-shell-command-attach-session (session)
"Attach to SESSION with `async-shell-command'."
- (let* ((detached--current-session session)
+ (let* ((detached-current-session session)
(detached-session-mode 'attach)
(inhibit-message t))
(cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
@@ -907,7 +907,7 @@ This function uses the `notifications' library."
(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)))))
+ (setq detached--buffer-session detached-current-session)))))
;;;;; Public session functions
@@ -1206,7 +1206,7 @@ Optionally CONCAT the command return command into a
string."
(detached--dtach-command session))
((eq 'create-and-attach detached-session-mode)
(let ((detached-session-mode 'create)
- (detached--current-session session))
+ (detached-current-session session))
(detached-start-session (detached--session-command session))
(if concat
(string-join tail-command " ")
- [elpa] externals/detached ca0ee7e465 37/38: Add detach key to session map, (continued)
- [elpa] externals/detached ca0ee7e465 37/38: Add detach key to session map, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 274993d9c9 20/38: Remove 'started state, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 51858bceb7 26/38: Begin rework of how to start a session, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 65c661bc9c 27/38: Change detached env to text-mode, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 3dc3651e98 18/38: Add session working directory function, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 88618a9cee 17/38: Add public function for session command, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 4b3609385d 01/38: Start session rewrite, ELPA Syncer, 2022/11/17
- [elpa] externals/detached f0f9728e2c 31/38: Make local predicate private, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 09b37f681c 30/38: Add detached-with-session macro, ELPA Syncer, 2022/11/17
- [elpa] externals/detached a57a728382 22/38: Remove detached-session-mode 'attach, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 4e36d9de69 10/38: Make current session public,
ELPA Syncer <=
- [elpa] externals/detached f896cd9777 32/38: Reformat code, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 0d607044d9 03/38: Add session started predicate, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 4eb5e3e9aa 04/38: Add side effect to start command, ELPA Syncer, 2022/11/17
- [elpa] externals/detached b3fa3b9893 13/38: Move functions to end to prepare for deprecation, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 1604a7b5b8 11/38: Make detached-buffer-session public, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 26210dc5a8 28/38: Improve the core structure, ELPA Syncer, 2022/11/17