[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache 87f3610778 5/8: Rename commands
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache 87f3610778 5/8: Rename commands |
Date: |
Fri, 21 Jan 2022 10:57:30 -0500 (EST) |
branch: externals/dtache
commit 87f3610778a44b4ca43df0d0079328aba7fcc167
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Rename commands
This patch improves the names of the dtache commands.
---
CHANELOG.org | 2 +-
README.org | 40 ++++++++++++++++++++--------------------
dtache-compile.el | 4 ++--
dtache-eshell.el | 4 ++--
dtache-shell.el | 4 ++--
dtache.el | 48 ++++++++++++++++++++++++------------------------
6 files changed, 51 insertions(+), 51 deletions(-)
diff --git a/CHANELOG.org b/CHANELOG.org
index 1c23e826f0..439dc328c5 100644
--- a/CHANELOG.org
+++ b/CHANELOG.org
@@ -14,7 +14,7 @@
- Add version for =dtache-session= objects. This makes dtache not break
whenever non-backwards compatible changes are made to the dtache-session object.
- The commands for launching sessions are now renamed to resemble the non
dtache commands. The commands are =dtache-shell-command=,
=dtache-shell-send-input=, =dtache-eshell-send-input=, =dtache-compile=.
- Add action value to a session. This value is set to dtache-session-action
which is a property list optionally specifying attach, view and run properties.
These properties are then used in dwim commands to improve their functionality.
-- Add a generic detach command, =dtache-detach-dwim=. This command is supposed
to be used to detach from sessions in all supported modes.
+- Add a generic detach command, =dtache-detach-session=. This command is
supposed to be used to detach from sessions in all supported modes.
- Add =dtache-compile.el=. This library provides commands =dtache-compile= and
=dtache-compile-recompile= which are supposed to be used instead of
=compile=/=recompile=.
- Improve =dtache-shell-command=, the command is now very similar to
=async-shell-command= and can be considered a replacement of the latter.
- Add integration with the =consult= package through =dtache-consult.el=.
diff --git a/README.org b/README.org
index a8e8209c02..9c3a55ee17 100644
--- a/README.org
+++ b/README.org
@@ -65,7 +65,7 @@ A minimal configuration for =dtache=.
:hook (after-init . dtache-setup)
:bind (([remap async-shell-command] . dtache-shell-command)
:map dtache-shell-mode-map
- ("C-c C-q" . dtache-detach-dwim)))
+ ("C-c C-q" . dtache-detach-session)))
#+end_src
* Commands
@@ -98,15 +98,15 @@ The actions are controlled by the customizable variables
named =dtache-.*-sessio
| Command (Keybinding) | Description
|
|-----------------------------------+---------------------------------------------|
-| dtache-open-output (o) | Open a session's output
|
-| dtache-attach (a) | Attach to a session
|
-| dtache-tail-output (t) | Tail the output of an active session
|
+| dtache-view-session (v) | View a session's output
|
+| dtache-attach-session (a) | Attach to a session
|
+| dtache-tail-session (t) | Tail the output of an active session
|
| dtache-diff-session (=) | Diff a session with another session
|
-| dtache-post-compile-session (c) | Open the session output in compilation
mode |
+| dtache-compile-session (c) | Open the session output in compilation
mode |
| dtache-rerun-session (r) | Rerun a session
|
| dtache-insert-session-command (i) | Insert the session's command at point
|
| dtache-copy-session-command (w) | Copy the session's shell command
|
-| dtache-copy-session-output (W) | Copy the session's output
|
+| dtache-copy-session (W) | Copy the session's output
|
| dtache-kill-session (k) | Kill an active session
|
| dtache-delete-session (d) | Delete an inactive session
|
@@ -128,18 +128,18 @@ A =use-package= configuration of the =dtache-shell=
extension, which provides th
:hook (after-init . dtache-shell-setup)
:bind (:map dtache-shell-mode-map
(("<S-return>" . dtache-shell-send-input)
- ("<C-return>" . dtache-shell-attach)))
+ ("<C-return>" . dtache-shell-attach-session)))
:config
(setq dtache-shell-history-file "~/.bash_history"))
#+end_src
A minor mode named =dtache-shell-mode= is provided, and will be enabled in
=shell=. The commands that are implemented are:
-| Command | Description |
-|-------------------------+------------------------------|
-| dtache-shell-send-input | Run command with dtache |
-| dtache-shell-attach | Attach to a dtache session |
-| dtache-detach-dwim | Detach from a dtache session |
+| Command | Description |
+|-----------------------------+------------------------------|
+| dtache-shell-send-input | Run command with dtache |
+| dtache-shell-attach-session | Attach to a dtache session |
+| dtache-detach-session | Detach from a dtache session |
** Dtache-eshell
@@ -150,17 +150,17 @@ A =use-package= configuration of the =dtache-eshell=
extension, which provides t
:hook (after-init . dtache-eshell-setup)
:bind (:map dtache-eshell-mode-map
(("<S-return>" . dtache-eshell-send-input)
- ("<C-return>" . dtache-eshell-attach)
- ("C-c C-q" . dtache-detach-dwim))))
+ ("<C-return>" . dtache-eshell-attach-session)
+ ("C-c C-q" . dtache-detach-session))))
#+end_src
A minor mode named =dtache-eshell-mode= is provided, and will be enabled in
=eshell=. The commands that are implemented are:
-| Command | Description |
-|--------------------------+------------------------------|
-| dtache-eshell-send-input | Run command with dtache |
-| dtache-eshell-attach | Attach to a dtache session |
-| dtache-detach-dwim | Detach from a dtache session |
+| Command | Description |
+|------------------------------+------------------------------|
+| dtache-eshell-send-input | Run command with dtache |
+| dtache-eshell-attach-session | Attach to a dtache session |
+| dtache-detach-session | Detach from a dtache session |
In this [[https://niklaseklund.gitlab.io/blog/posts/dtache_eshell/][blog
post]] there are examples and more information about the extension.
@@ -174,7 +174,7 @@ A =use-package= configuration of the =dtache-compile=
extension, which provides
:bind (([remap compile] . dtache-compile)
([remap recompile] . dtache-compile-recompile)
:map dtache-compilation-mode-map
- ("C-c C-q" . dtache-detach-dwim)))
+ ("C-c C-q" . dtache-detach-session)))
#+end_src
The package implements the commands =dtache-compile= and
=dtache-compile-recompile=, which are thin wrappers around the original
=compile= and =recompile= commands. The users should be able to use the former
as replacements for the latter without noticing any difference except from the
possibility to =detach=.
diff --git a/dtache-compile.el b/dtache-compile.el
index 9d0acef011..2f19347b36 100644
--- a/dtache-compile.el
+++ b/dtache-compile.el
@@ -32,7 +32,7 @@
(defcustom dtache-compile-session-action
'(:attach dtache-compile-attach
- :view dtache-post-compile-session
+ :view dtache-compile-session
:run dtache-compile)
"Actions for a session created with `dtache-compile'."
:group 'dtache
@@ -83,7 +83,7 @@ Optionally EDIT-COMMAND."
(when (dtache-valid-session session)
(if (eq 'active (dtache--session-state session))
(dtache-compile-attach session)
- (dtache-post-compile-session session))))
+ (dtache-compile-session session))))
;;;###autoload
(defun dtache-compile-setup ()
diff --git a/dtache-eshell.el b/dtache-eshell.el
index 160432f51c..3af0d0f051 100644
--- a/dtache-eshell.el
+++ b/dtache-eshell.el
@@ -33,7 +33,7 @@
;;;; Variables
(defcustom dtache-eshell-session-action
- '(:attach dtache-tail-output
+ '(:attach dtache-tail-session
:view dtache-view-dwim
:run dtache-shell-command)
"Actions for a session created with `dtache-eshell'."
@@ -80,7 +80,7 @@ If prefix-argument directly DETACH from the session."
(call-interactively #'eshell-send-input)))
;;;###autoload
-(defun dtache-eshell-attach (session)
+(defun dtache-eshell-attach-session (session)
"Attach to SESSION."
(interactive
(list (dtache-eshell-select-session)))
diff --git a/dtache-shell.el b/dtache-shell.el
index 6bb6fbaed2..46119a9bcf 100644
--- a/dtache-shell.el
+++ b/dtache-shell.el
@@ -30,7 +30,7 @@
;;;; Variables
(defcustom dtache-shell-session-action
- '(:attach dtache-tail-output
+ '(:attach dtache-tail-session
:view dtache-view-dwim
:run dtache-shell-command)
"Actions for a session created with `dtache-shell'."
@@ -74,7 +74,7 @@
(comint-send-input)))
;;;###autoload
-(defun dtache-shell-attach (session)
+(defun dtache-shell-attach-session (session)
"Attach to SESSION.
`comint-add-to-input-history' is temporarily disabled to avoid
diff --git a/dtache.el b/dtache.el
index 11b78499c9..db9c4a73d4 100644
--- a/dtache.el
+++ b/dtache.el
@@ -104,7 +104,7 @@
:group 'dtache)
(defcustom dtache-shell-command-session-action
- '(:attach dtache-attach
+ '(:attach dtache-attach-session
:view dtache-view-dwim
:run dtache-shell-command)
"Actions for a session created with `dtache-shell-command'."
@@ -145,16 +145,16 @@ This version is encoded as [package-version].[revision].")
(defvar dtache-action-map
(let ((map (make-sparse-keymap)))
- (define-key map "a" #'dtache-attach)
- (define-key map "c" #'dtache-post-compile-session)
+ (define-key map "a" #'dtache-attach-session)
+ (define-key map "c" #'dtache-compile-session)
(define-key map "d" #'dtache-delete-session)
(define-key map "i" #'dtache-insert-session-command)
(define-key map "k" #'dtache-kill-session)
- (define-key map "o" #'dtache-open-output)
(define-key map "r" #'dtache-rerun-session)
- (define-key map "t" #'dtache-tail-output)
+ (define-key map "t" #'dtache-tail-session)
+ (define-key map "v" #'dtache-view-session)
(define-key map "w" #'dtache-copy-session-command)
- (define-key map "W" #'dtache-copy-session-output)
+ (define-key map "W" #'dtache-copy-session)
(define-key map "=" #'dtache-diff-session)
map))
@@ -276,8 +276,8 @@ Optionally SUPPRESS-OUTPUT."
(dtache--view-session session))))
;;;###autoload
-(defun dtache-post-compile-session (session)
- "Post `compile' by opening the output of a SESSION in `compilation-mode'."
+(defun dtache-compile-session (session)
+ "Compile SESSION by opening the output in `compilation-mode'."
(interactive
(list (dtache-completing-read (dtache-get-sessions))))
(when (dtache-valid-session session)
@@ -319,19 +319,19 @@ Optionally SUPPRESS-OUTPUT."
(dtache-start-session command))))))
;;;###autoload
-(defun dtache-attach (session)
+(defun dtache-attach-session (session)
"Attach to SESSION."
(interactive
(list (dtache-completing-read (dtache-get-sessions))))
(when (dtache-valid-session session)
(if (or (eq 'inactive (dtache--session-state session))
(not (dtache--session-attachable session)))
- (dtache-open-output session)
+ (dtache-view-session session)
(let* ((dtache--current-session session)
(dtache-session-mode 'attach)
(inhibit-message t))
(if (not (dtache--session-attachable session))
- (dtache-tail-output session)
+ (dtache-tail-session session)
(cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
(buffer (get-buffer-create dtache--shell-command-buffer))
(default-directory (dtache--session-working-directory
session))
@@ -342,8 +342,8 @@ Optionally SUPPRESS-OUTPUT."
(with-current-buffer buffer (setq dtache--buffer-session
dtache--current-session))))))))
;;;###autoload
-(defun dtache-copy-session-output (session)
- "Copy SESSION's log."
+(defun dtache-copy-session (session)
+ "Copy SESSION's output."
(interactive
(list (dtache-completing-read (dtache-get-sessions))))
(when (dtache-valid-session session)
@@ -353,7 +353,7 @@ Optionally SUPPRESS-OUTPUT."
;;;###autoload
(defun dtache-copy-session-command (session)
- "Copy SESSION command."
+ "Copy SESSION's command."
(interactive
(list (dtache-completing-read (dtache-get-sessions))))
(when (dtache-valid-session session)
@@ -389,7 +389,7 @@ Optionally SUPPRESS-OUTPUT."
(dtache--kill-processes pid)))))
;;;###autoload
-(defun dtache-open-output (session)
+(defun dtache-view-session (session)
"Open SESSION's output."
(interactive
(list (dtache-completing-read (dtache-get-sessions))))
@@ -412,7 +412,7 @@ Optionally SUPPRESS-OUTPUT."
(message "Dtache can't find file: %s" file-path)))))
;;;###autoload
-(defun dtache-tail-output (session)
+(defun dtache-tail-session (session)
"Tail SESSION's output."
(interactive
(list (dtache-completing-read (dtache-get-sessions))))
@@ -426,7 +426,7 @@ Optionally SUPPRESS-OUTPUT."
(setq dtache--buffer-session session)
(dtache-tail-mode)
(goto-char (point-max))))
- (dtache-open-output session))))
+ (dtache-view-session session))))
;;;###autoload
(defun dtache-diff-session (session1 session2)
@@ -450,8 +450,8 @@ Optionally SUPPRESS-OUTPUT."
(ediff-buffers buffer1 buffer2))))
;;;###autoload
-(defun dtache-detach-dwim ()
- "Detach from current session.
+(defun dtache-detach-session ()
+ "Detach from a session.
This command is only activated if `dtache--buffer-session' is set and
`dtache--determine-session-state' returns active. For modes such as
@@ -662,11 +662,11 @@ This function uses the `notifications' library."
(defun dtache-view-dwim (session)
"View SESSION in a do what I mean fashion."
(cond ((eq 'success (dtache--session-status session))
- (dtache-open-output session))
+ (dtache-view-session session))
((eq 'failure (dtache--session-status session))
- (dtache-post-compile-session session))
+ (dtache-compile-session session))
((eq 'unknown (dtache--session-status session))
- (dtache-open-output session))
+ (dtache-view-session session))
(t (message "Dtache session is in an unexpected state."))))
(defun dtache-get-sessions ()
@@ -903,10 +903,10 @@ Optionally make the path LOCAL to host."
(defun dtache--attach-session (session)
"Attach to SESSION."
(if (not (dtache--session-attachable session))
- (dtache-tail-output session)
+ (dtache-tail-session session)
(if-let ((attach-fun (plist-get (dtache--session-action session) :attach)))
(funcall attach-fun session)
- (dtache-tail-output session))))
+ (dtache-tail-session session))))
(defun dtache--view-session (session)
"View SESSION."
- [elpa] externals/dtache updated (c57f57a49e -> 98344e50fb), ELPA Syncer, 2022/01/21
- [elpa] externals/dtache 2395b0e034 3/8: Update notifications to reference host, ELPA Syncer, 2022/01/21
- [elpa] externals/dtache 5edde14d06 1/8: Rename log-size property to size, ELPA Syncer, 2022/01/21
- [elpa] externals/dtache d744ff82b8 2/8: Only update size when a session becomes inactive, ELPA Syncer, 2022/01/21
- [elpa] externals/dtache 87f3610778 5/8: Rename commands,
ELPA Syncer <=
- [elpa] externals/dtache e6aa944f8b 6/8: Improve docstrings, ELPA Syncer, 2022/01/21
- [elpa] externals/dtache 050ac04bc3 7/8: Update dtache-open-session, ELPA Syncer, 2022/01/21
- [elpa] externals/dtache 98344e50fb 8/8: Improve state transition update, ELPA Syncer, 2022/01/21
- [elpa] externals/dtache 88a41c9ee3 4/8: Improve session handling, ELPA Syncer, 2022/01/21