branch: externals/dtache
commit 9f948349a367555f083a1508cb8d38be790e19e2
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Rename dtache-detach to dtache-detach-dwim
---
CHANELOG.org | 2 +-
README.org | 12 ++++++------
dtache.el | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/CHANELOG.org b/CHANELOG.org
index f34c0223c0..88e100b015 100644
--- a/CHANELOG.org
+++ b/CHANELOG.org
@@ -6,7 +6,7 @@
- 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=. This command is supposed to
be used to detach from sessions in all supported modes.
+- Add a generic detach command, =dtache-detach-dwim=. 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 f4d36ece8e..b0e255fdd4 100644
--- a/README.org
+++ b/README.org
@@ -60,7 +60,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)))
+ ("C-c C-q" . dtache-detach-dwim)))
#+end_src
* Commands
@@ -78,7 +78,7 @@ There are tree different ways to create a dtache session.
The =dtache-shell-command= is for the Emacs users that are accustomed to
running shell commands from =M-x shell-command= or =M-x async-shell-command=.
The =dtache-start-session= is supposed to be called from custom user functions,
or for other packages to integrate towards. The user can also choose to
override built in functions with it, for example =compile=. Lastly there is the
=dtache-shell-create-session= command which is supposed to be bound to a key.
It is a command that the user c [...]
-To detach from a =dtache= session you should use the univeral =dtache-detach=.
+To detach from a =dtache= session you should use the univeral
=dtache-detach-dwim=.
** Interacting with a session
@@ -133,7 +133,7 @@ A minor mode named =dtache-shell-mode= is provided, and
will be enabled in =shel
|-----------------------+-----------------------|
| dtache-shell-create | Create a session |
| dtache-shell-attach | Attach to a session |
-| dtache-detach | Detach from a session |
+| dtache-detach-dwim | Detach from a session |
** Dtache-eshell
@@ -145,7 +145,7 @@ A =use-package= configuration of the =dtache-eshell=
extension, which provides t
:bind (:map dtache-eshell-mode-map
(("<S-return>" . dtache-eshell-send-input)
("<C-return>" . dtache-eshell-attach)
- ("C-c C-q" . dtache-detach))))
+ ("C-c C-q" . dtache-detach-dwim))))
#+end_src
A minor mode named =dtache-eshell-mode= is provided, and will be enabled in
=eshell=. The commands that are implemented are:
@@ -154,7 +154,7 @@ A minor mode named =dtache-eshell-mode= is provided, and
will be enabled in =esh
|------------------------------+-----------------------|
| dtache-eshell-send-input | Create a session |
| dtache-eshell-attach | Attach to a session |
-| dtache-detach | Detach from a session |
+| dtache-detach-dwim | Detach from a session |
In this [[https://niklaseklund.gitlab.io/blog/posts/dtache_eshell/][blog
post]] there are examples and more information about the extension.
@@ -168,7 +168,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)))
+ ("C-c C-q" . dtache-detach-dwim)))
#+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.el b/dtache.el
index b3194ca1d5..048e719510 100644
--- a/dtache.el
+++ b/dtache.el
@@ -418,7 +418,7 @@ Optionally SUPPRESS-OUTPUT."
(ediff-buffers buffer1 buffer2))))
;;;###autoload
-(defun dtache-detach ()
+(defun dtache-detach-dwim ()
"Detach from current session.
This command is only activated if `dtache--buffer-session' is set and