[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached a15b46d32f 35/38: Merge copy and annotation co
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached a15b46d32f 35/38: Merge copy and annotation commands |
Date: |
Thu, 17 Nov 2022 17:57:56 -0500 (EST) |
branch: externals/detached
commit a15b46d32f0518e567c18637dfe69d16e8358187
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Merge copy and annotation commands
---
README.md | 2 +-
detached-init.el | 4 ++--
detached-list.el | 27 ++-------------------------
detached.el | 17 +++++++++++++++--
4 files changed, 20 insertions(+), 30 deletions(-)
diff --git a/README.md b/README.md
index 9cff19e1c9..8332374169 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ The package also provides additional commands to interact
with a session.
| detached-rerun-session (r) | Rerun a session
|
| detached-insert-session-command (i) | Insert the session's command at point
|
| detached-copy-session-command (w) | Copy the session's shell command
|
-| detached-copy-session (W) | Copy the session's output
|
+| detached-copy-session-output (W) | Copy the session's output
|
| detached-kill-session (k) | Kill an active session
|
| detached-delete-session (d) | Delete an inactive session
|
diff --git a/detached-init.el b/detached-init.el
index efc98d437d..aa8e4dede5 100644
--- a/detached-init.el
+++ b/detached-init.el
@@ -36,7 +36,7 @@
(declare-function detached-rerun-session "detached")
(declare-function detached-view-session "detached")
(declare-function detached-copy-session-command "detached")
-(declare-function detached-copy-session "detached")
+(declare-function detached-copy-session-output "detached")
(declare-function detached-diff-session "detached")
(declare-function detached-initialize-sessions "detached")
(declare-function detached-shell-mode "detached")
@@ -89,7 +89,7 @@
(define-key map "r" #'detached-rerun-session)
(define-key map "v" #'detached-view-session)
(define-key map "w" #'detached-copy-session-command)
- (define-key map "W" #'detached-copy-session)
+ (define-key map "W" #'detached-copy-session-output)
(define-key map "=" #'detached-diff-session)
map))
diff --git a/detached-list.el b/detached-list.el
index d419559c49..7a817e1e62 100644
--- a/detached-list.el
+++ b/detached-list.el
@@ -144,17 +144,6 @@ Optionally initialize ALL session-directories."
(detached-list--initialize-directory directory)))
(message "All session directories have been initialized")))
-(defun detached-list-edit-annotation (session)
- "Edit SESSION's annotation."
- (interactive
- (list (tabulated-list-get-id)))
- (when-let* ((initial-value (or
- (detached--session-annotation session)
- ""))
- (annotation (read-string "Annotation: " initial-value)))
- (setf (detached--session-annotation session) annotation)
- (detached--db-update-entry session)))
-
(defun detached-list-quit ()
"Quit command."
(interactive)
@@ -192,18 +181,6 @@ Optionally initialize ALL session-directories."
(list (tabulated-list-get-id)))
(detached-open-session-directory session))
-(defun detached-list-copy-session-command (session)
- "Copy SESSION at point's command."
- (interactive
- (list (tabulated-list-get-id)))
- (detached-copy-session-command session))
-
-(defun detached-list-copy-session-output (session)
- "Copy SESSION at point's output."
- (interactive
- (list (tabulated-list-get-id)))
- (detached-copy-session session))
-
(defun detached-list-kill-session ()
"Send a TERM signal to sessions at point, or all marked sessions.
@@ -893,7 +870,7 @@ If prefix-argument is provided unmark instead of mark."
(defvar detached-list-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "a") #'detached-list-edit-annotation)
+ (define-key map (kbd "a") #'detached-edit-session-annotation)
(define-key map (kbd "d") #'detached-list-delete-session)
(define-key map (kbd "e") #'detached-edit-and-run-session)
(define-key map (kbd "f") #'detached-list-select-filter)
@@ -930,7 +907,7 @@ If prefix-argument is provided unmark instead of mark."
(define-key map (kbd "U") #'detached-list-unmark-sessions)
(define-key map (kbd "v") #'detached-list-view-session)
(define-key map (kbd "w") #'detached-copy-session-command)
- (define-key map (kbd "W") #'detached-copy-session)
+ (define-key map (kbd "W") #'detached-copy-session-output)
(define-key map (kbd "x") #'detached-list-detach-from-session)
(define-key map (kbd "%") #'detached-list-mark-regexp)
(define-key map (kbd "=") #'detached-list-diff-marked-sessions)
diff --git a/detached.el b/detached.el
index 84a3e0d3c8..d13fb5a8aa 100644
--- a/detached.el
+++ b/detached.el
@@ -229,10 +229,11 @@ If set to a non nil value the latest entry to
(defvar detached-session-map
(let ((map (make-sparse-keymap)))
+ (define-key map "a" #'detached-edit-session-annotation)
(define-key map "e" #'detached-edit-and-run-session)
(define-key map "r" #'detached-rerun-session)
(define-key map "w" #'detached-copy-session-command)
- (define-key map "W" #'detached-copy-session)
+ (define-key map "W" #'detached-copy-session-output)
map))
(defvar detached-enabled nil)
@@ -500,6 +501,18 @@ The session is compiled by opening its output and enabling
(select-window
(display-buffer buffer-name
detached-open-session-display-buffer-action))))))
+;;;###autoload
+(defun detached-edit-session-annotation (session)
+ "Edit SESSION's annotation."
+ (interactive
+ (list (detached-session-in-context)))
+ (when-let* ((initial-value (or
+ (detached--session-annotation session)
+ ""))
+ (annotation (read-string "Annotation: " initial-value)))
+ (setf (detached--session-annotation session) annotation)
+ (detached--db-update-entry session)))
+
;;;###autoload
(defun detached-edit-and-run-session (session &optional toggle-session-mode)
"Edit and re-run SESSION at point.
@@ -570,7 +583,7 @@ Optionally TOGGLE-SESSION-MODE."
initialized-session)))))
;;;###autoload
-(defun detached-copy-session (session)
+(defun detached-copy-session-output (session)
"Copy SESSION's output."
(interactive
(list (detached-session-in-context)))
- [elpa] externals/detached updated (53161621ff -> 0facedc6fb), ELPA Syncer, 2022/11/17
- [elpa] externals/detached aa75d63a4c 02/38: Update session start command, ELPA Syncer, 2022/11/17
- [elpa] externals/detached d7dc968dfe 07/38: Sync start/attach command with main branch, ELPA Syncer, 2022/11/17
- [elpa] externals/detached c72236c67f 06/38: Implement attach command, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 3b7be9c684 15/38: Properly detach degraded session, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 1092140da8 29/38: Add detached-session-map, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 945830a744 33/38: Remove deprecated function, ELPA Syncer, 2022/11/17
- [elpa] externals/detached a15b46d32f 35/38: Merge copy and annotation commands,
ELPA Syncer <=
- [elpa] externals/detached 0facedc6fb 38/38: Update CHANGELOG, ELPA Syncer, 2022/11/17
- [elpa] externals/detached ff666ad28e 25/38: Fix indentation, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 3c7ac1730f 34/38: Add session environment property getter, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 236f6c95af 08/38: Improve implementation, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 0ca53e29ff 09/38: Remove error check, ELPA Syncer, 2022/11/17
- [elpa] externals/detached fec1a4c7bd 24/38: Update function signatures, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 473fcc2d43 23/38: Rename detached-session-modes, ELPA Syncer, 2022/11/17
- [elpa] externals/detached 5c212b2609 05/38: Update start-detached-session, ELPA Syncer, 2022/11/17
- [elpa] externals/detached aca448c773 19/38: Revert marks in list when widening, ELPA Syncer, 2022/11/17
- [elpa] externals/detached f70ac98dc5 21/38: Remove dtach--arg dependency, ELPA Syncer, 2022/11/17