emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dtache f5fd0607f1 1/4: Revert dtache -> detached.el


From: ELPA Syncer
Subject: [elpa] externals/dtache f5fd0607f1 1/4: Revert dtache -> detached.el
Date: Sat, 21 May 2022 17:57:30 -0400 (EDT)

branch: externals/dtache
commit f5fd0607f1d15ea77e791587e0977f9ceaca19f4
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Revert dtache -> detached.el
---
 .build.yml            |    2 +-
 CHANGELOG.org         |    3 +-
 LICENSE               |    4 +-
 README.md             |  234 ++++-----
 detached-compile.el   |  138 +++---
 detached-consult.el   |  178 +++----
 detached-dired.el     |   18 +-
 detached-env          |   20 +-
 detached-eshell.el    |  110 ++---
 detached-extra.el     |   34 +-
 detached-init.el      |  158 +++----
 detached-org.el       |   44 +-
 detached-shell.el     |  108 ++---
 detached-vterm.el     |   68 +--
 detached.el           | 1256 ++++++++++++++++++++++++-------------------------
 guix.scm              |   16 +-
 test/detached-test.el |  366 +++++++-------
 17 files changed, 1378 insertions(+), 1379 deletions(-)

diff --git a/.build.yml b/.build.yml
index 1c83904acd..e1064d970d 100644
--- a/.build.yml
+++ b/.build.yml
@@ -3,7 +3,7 @@ packages:
 - emacs-ert-runner
 - dtach
 environment:
-  project: detached.el
+  project: dtache
 tasks:
 - guix: |
     cd $project
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 070966c66c..fe88e29a57 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -1,9 +1,8 @@
-#+title: detached.el - Changelog
+#+title: dtache.el - Changelog
 #+author: Niklas Eklund
 #+language: en
 
 *   Development
-- Rename =dtache= to =detached.el=
 - Introduce =dtache-init.el= and move integration of other packages there. The 
integration now becomes even simpler for users of =dtache=.
 - Rewrite =dtache= to enable the package to lazy load and not force users to 
load it when starting Emacs.
 - Make completion of sessions adapt to the current dtache sessions. All of the 
sessions will be used to determine an an appropriate width for the command 
width as well as each individual annotation. Format has updated in 
=dtache-annotation-format= and a =dtache-command-format= has been added, this 
supersedes the =dtache-max-command-lenght=.
diff --git a/LICENSE b/LICENSE
index b52c500f8a..f22c5a432a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -631,7 +631,7 @@ to attach them to the start of each source file to most 
effectively
 state the exclusion of warranty; and each file should have at least
 the "copyright" line and a pointer to where the full notice is found.
 
-    detached
+    dtache
     Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
     This program is free software: you can redistribute it and/or modify
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic 
and paper mail.
   If the program does terminal interaction, make it output a short
 notice like this when it starts in an interactive mode:
 
-    detached  Copyright (C) 2020-2022  Free Software Foundation, Inc.
+    dtache  Copyright (C) 2020-2022  Free Software Foundation, Inc.
     This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
     This is free software, and you are welcome to redistribute it
     under certain conditions; type `show c' for details.
diff --git a/README.md b/README.md
index 4ad8caa8d8..e4e4c0924b 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,16 @@
-# detached.el
+# dtache.el
 
 <a href="http://elpa.gnu.org/packages/dtache.html";><img alt="GNU ELPA" 
src="https://elpa.gnu.org/packages/dtache.svg"/></a>
 <a href="http://elpa.gnu.org/devel/dtache.html";><img alt="GNU-devel ELPA" 
src="https://elpa.gnu.org/devel/dtache.svg"/></a>
 <a href="https://melpa.org/#/dtache";><img alt="MELPA" 
src="https://melpa.org/packages/dtache-badge.svg"/></a>
 <a href="https://stable.melpa.org/#/dtache";><img alt="MELPA Stable" 
src="https://stable.melpa.org/packages/dtache-badge.svg"/></a>
-<a 
href="https://builds.sr.ht/~niklaseklund/detached.el/commits/main/.build.yml";><img
 alt="Build" 
src="https://builds.sr.ht/~niklaseklund/detached.el/commits/main/.build.yml.svg"/></a>
+<a 
href="https://builds.sr.ht/~niklaseklund/dtache.el/commits/main/.build.yml";><img
 alt="Build" 
src="https://builds.sr.ht/~niklaseklund/dtache.el/commits/main/.build.yml.svg"/></a>
 
 # Introduction
 
-`detached.el` is a package to launch, and manage, detached processes. The idea 
is that these processes are detached from the Emacs process and the package can 
make Emacs seamlessly attach to these processes. This enables users to launch 
processes that can survive when Emacs itself is being shutdown. The package 
relies on the program [dtach](https://github.com/crigler/dtach), in order to 
make this functionality possible.
+`dtache` is a package to launch, and manage, detached processes. The idea is 
that these processes are detached from the Emacs process and the package can 
make Emacs seamlessly attach to these processes. This enables users to launch 
processes that can survive when Emacs itself is being shutdown. The package 
relies on the program [dtach](https://github.com/crigler/dtach), in order to 
make this functionality possible.
 
-Internally the package transforms the detached process into a 
`detached-session` object, which essentially is a text-based representation of 
the process. All `detached-session` objects are stored in a lisp file, and the 
output of all sessions are captured into individual logs.
+Internally the package transforms the dtache process into a `dtache-session` 
object, which essentially is a text-based representation of the process. All 
`dtache-session` objects are stored in a lisp file, and the output of all 
sessions are captured into individual logs.
 
 The package supports integration with multiple packages, here is a list of the 
built-in packages that are supported:
 
@@ -22,12 +22,12 @@ The package supports integration with multiple packages, 
here is a list of the b
 
 # Features
 
-Since a `detached-session` contain all the output of the process as well as 
data such as, `what command` was run, `which directory` the process was 
launched etc, it opens up the possibility for the following features:
+Since a `dtache-session` contain all the output of the process as well as data 
such as, `what command` was run, `which directory` the process was launched 
etc, it opens up the possibility for the following features:
 
-- `Unlimited scrollback:` All the output from a `detached-session` is always 
accessible
+- `Unlimited scrollback:` All the output from a `dtache-session` is always 
accessible
 - `Remote support:` Full support for running on remote hosts. See `Remote 
support` section of the README
-- `Notifications:` The package will monitor all detached sessions and notify 
when a session has finished
-- `Post compilation`: If the package has been configured to use `detached-env` 
it will know the exit status of a session. That enables the package to post 
compile the output of a session to enable Emacs's built-in functionality of 
navigating between errors in the output.
+- `Notifications:` The package will monitor all dtache sessions and notify 
when a session has finished
+- `Post compilation`: If the package has been configured to use `dtache-env` 
it will know the exit status of a session. That enables the package to post 
compile the output of a session to enable Emacs's built-in functionality of 
navigating between errors in the output.
 - `Annotations:` When selecting a session all are presented with a rich set of 
annotations
 - `Actions:` The package provides actions to act on a session:
   + `kill` a an active session
@@ -41,29 +41,29 @@ The package is available on [GNU 
ELPA](https://elpa.gnu.org) and [MELPA](https:/
 
 # Configuration
 
-The prerequisite for `detached.el` is that the user has the program `dtach` 
installed.
+The prerequisite for `dtache.el` is that the user has the program `dtach` 
installed.
 
 ## Use-package example
 
 A minimal `use-package` configuration.
 
 ``` emacs-lisp
-(use-package detached
+(use-package dtache
   :init
-  (detached-init)
-  :bind (;; Replace `async-shell-command' with `detached-shell-command'
-         ([remap async-shell-command] . detached-shell-command)
-         ;; Replace `compile' with `detached-compile'
-         ([remap compile] . detached-compile)
-         ([remap recompile] . detached-compile-recompile)
+  (dtache-init)
+  :bind (;; Replace `async-shell-command' with `dtache-shell-command'
+         ([remap async-shell-command] . dtache-shell-command)
+         ;; Replace `compile' with `dtache-compile'
+         ([remap compile] . dtache-compile)
+         ([remap recompile] . dtache-compile-recompile)
          ;; Replace built in completion of sessions with `consult'
-         ([remap detached-open-session] . detached-consult-session))
-  :custom ((detached-env "<path_to_detached-env>")
-           (detached-show-output-on-attach t)
-           (detached-shell-history-file "~/.bash_history")))
+         ([remap dtache-open-session] . dtache-consult-session))
+  :custom ((dtache-env "<path_to_dtache-env>")
+           (dtache-show-output-on-attach t)
+           (dtache-shell-history-file "~/.bash_history")))
 ```
 
-The users are required to call `detached-init`. This function orchestrates the 
integration with all other internal and external packages that `detached.el` 
supports. These are:
+The users are required to call `dtache-init`. This function orchestrates the 
integration with all other internal and external packages that `dtache.el` 
supports. These are:
 
 - `compile`
 - `dired`
@@ -77,24 +77,24 @@ The users are required to call `detached-init`. This 
function orchestrates the i
 
 All of the integration are configured to enable lazy-loading. Meaning that if 
you are not a user of `projectile` that code that handles the integration will 
never load.
 
-However if you do want to disable the integration with a specific package, or 
enable for a subset of the packages use the variables 
`detached-init-allow-list` or `detached-init-block-list`.
+However if you do want to disable the integration with a specific package, or 
enable for a subset of the packages use the variables `dtache-init-allow-list` 
or `dtache-init-block-list`.
 
 # Usage 
 
 The idea is that users can choose to either:
-- `create`: a detached session and attach to it
-- `detach`: from a detached session
-- `attach`: to a detached session
+- `create`: a dtache session and attach to it
+- `detach`: from a dtache session
+- `attach`: to a dtache session
 
-In the integration of `detached.el` with other packages these commands are 
always existent, with the exception for `org-mode`.
+In the integration of `dtache.el` with other packages these commands are 
always existent, with the exception for `org-mode`.
 
-To detach from a `detached-session` in any of the modes, use the universal 
`detached-detach-session` command. The keybinding for this command is defined 
by the `detached-detach-key` variable, which by default has the value `C-c C-d`.
+To detach from a `dtache-session` in any of the modes, use the universal 
`dtache-detach-session` command. The keybinding for this command is defined by 
the `dtache-detach-key` variable, which by default has the value `C-c C-d`.
 
 ## General
 
-To interact with a session the package provides the command 
`detached-open-session`. This provides a convenient completion interface, 
enriched with annotations to provide useful information about the sessions. The 
`detached-open-session` command is implemented as a do what I mean command. 
This results in `detached.el` performing different actions depending on the 
state of a session. The actions can be configured based on the `origin` of the 
session. The user can have one set of configura [...]
+To interact with a session the package provides the command 
`detached-open-session`. This provides a convenient completion interface, 
enriched with annotations to provide useful information about the sessions. The 
`detached-open-session` command is implemented as a do what I mean command. 
This results in `dtache` performing different actions depending on the state of 
a session. The actions can be configured based on the `origin` of the session. 
The user can have one set of configurations [...]
 
-The actions are controlled by the customizable variables named 
`detached-.*-session-action`. They come preconfigured but if you don't like the 
behavior of `detached-open-session` these variables allows for tweaking the 
experience.
+The actions are controlled by the customizable variables named 
`dtache-.*-session-action`. They come preconfigured but if you don't like the 
behavior of `dtache-open-session` these variables allows for tweaking the 
experience.
 
 - If the session is `active`, call the sessions `attach` function
 - If the session is `inactive` call the sessions `view` function, which by 
default performs a post-compile on the session if its status is `failure` 
otherwise the sessions raw output is opened.
@@ -103,62 +103,62 @@ The package also provides additional commands to interact 
with a session.
 
 | Command (Keybinding)                | Description                            
     |
 
|-------------------------------------|---------------------------------------------|
-| detached-view-session (v)           | View a session's output                
     |
-| detached-attach-session (a)         | Attach to a session                    
     |
-| detached-tail-session  (t)          | Tail the output of an active session   
     |
-| detached-diff-session (=)           | Diff a session with another session    
     |
-| detached-compile-session (c)        | Open the session output in compilation 
mode |
-| 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-kill-session (k)           | Kill an active session                 
     |
-| detached-delete-session (d)         | Delete an inactive session             
     |
-
-These commands are available through the `detached-action-map`. The user can 
bind the action map to a keybinding of choice. For example
+| 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-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 (W)           | Copy the session's output                
   |
+| dtache-kill-session (k)           | Kill an active session                   
   |
+| dtache-delete-session (d)         | Delete an inactive session               
   |
+
+These commands are available through the `dtache-action-map`. The user can 
bind the action map to a keybinding of choice. For example
 
 ``` emacs-lisp
-(global-set-key (kbd "C-c d") detached-action-map)
+(global-set-key (kbd "C-c d") dtache-action-map)
 ```
 
-Then upon invocation the user can choose an action, keybindings listed in the 
table above, and then choose a session to perform the action upon. For those 
using `embark` this will not be necessary as `detached-init` sets up 
integration with embark actions.
+Then upon invocation the user can choose an action, keybindings listed in the 
table above, and then choose a session to perform the action upon. For those 
using `embark` this will not be necessary as `dtache-init` sets up integration 
with embark actions.
 
 ## Shell command
 
-The `detached-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-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`.
 
 ## Shell
 
-A minor mode named `detached-shell-mode` is provided, and will be enabled in 
`shell`. The commands that are implemented are:
+A minor mode named `dtache-shell-mode` is provided, and will be enabled in 
`shell`. The commands that are implemented are:
 
 | Command                       | Description                    | Keybinding  
        |
 
|-------------------------------|--------------------------------|---------------------|
-| detached-shell-send-input     | Run command with detached      | <S-return>  
        |
-| detached-shell-attach-session | Attach to a detached session   | <C-return>  
        |
-| detached-detach-session       | Detach from a detached session | 
detached-detach-key |
+| dtache-shell-send-input     | Run command with dtache      | <S-return>      
    |
+| dtache-shell-attach-session | Attach to a dtache session   | <C-return>      
    |
+| dtache-detach-session       | Detach from a dtache session | 
dtache-detach-key |
 
 ## Eshell
 
-A minor mode named `detached-eshell-mode` is provided, and will be enabled in 
`eshell`. The commands that are implemented are:
+A minor mode named `dtache-eshell-mode` is provided, and will be enabled in 
`eshell`. The commands that are implemented are:
 
 | Command                        | Description                    | Keybinding 
         |
 
|--------------------------------|--------------------------------|---------------------|
-| detached-eshell-send-input     | Run command with detached      | <S-return> 
         |
-| detached-eshell-attach-session | Attach to a detached session   | <C-return> 
         |
-| detached-detach-session        | Detach from a detached session | 
detached-detach-key |
+| dtache-eshell-send-input     | Run command with dtache      | <S-return>     
     |
+| dtache-eshell-attach-session | Attach to a dtache session   | <C-return>     
     |
+| dtache-detach-session        | Detach from a dtache session | 
dtache-detach-key |
 
 ## Org babel
 
-The package implements an additional header argument for `ob-shell`. The 
header argument is `:detached t`. When provided it will enable the code inside 
a src block to be run with `detached.el`. Since org is not providing any live 
updates on the output the session is created with `detached-sesion-mode` set to 
`create`. This means that if you want to access the output of the session you 
do that the same way you would for any other type of session. The 
`detached-org` works both with and wit [...]
+The package implements an additional header argument for `ob-shell`. The 
header argument is `:detached t`. When provided it will enable the code inside 
a src block to be run with `dtache`. Since org is not providing any live 
updates on the output the session is created with `detached-sesion-mode` set to 
`create`. This means that if you want to access the output of the session you 
do that the same way you would for any other type of session. The 
`detached-org` works both with and without  [...]
 
 ```
-#+begin_src sh :detached t
+#+begin_src sh :dtache t
     cd ~/code
     ls -la
 #+end_src
 
 #+RESULTS:
-: [detached]
+: [dtache]
 ```
 
 ## Compile
@@ -187,72 +187,72 @@ The package provides the following customizable variables.
 
 | Name                                 | Description                           
                                           |
 
|--------------------------------------|----------------------------------------------------------------------------------|
-| detached-session-directory           | A host specific directory to store 
sessions in                                   |
-| detached-db-directory                | A localhost specific directory to 
store the database                             |
-| detached-dtach-program               | Name or path to the `dtach` program   
                                           |
-| detached-shell-program               | Name or path to the `shell` that 
`detached.el` should use                        |
-| detached-timer-configuration         | Configuration of the timer that runs 
on remote hosts                             |
-| detached-env                         | Name or path to the `detached-env` 
script                                        |
-| detached-annotation-format           | A list of annotations that should be 
present in completion                       |
-| detached-command-format              | A configuration for displaying a 
session command                                 |
-| detached-tail-interval               | How often `detached.el` should 
refresh the output when tailing                   |
-| detached-nonattachable-commands      | A list of commands that should be 
considered nonattachable                       |
-| detached-notification-function       | Specifies which function to issue 
notifications with                             |
-| detached-detach-key                  | Specifies which keybinding to use to 
detach from a session                       |
-| detached-shell-command-initial-input | Enables latest value in history to be 
used as initial input                      |
-| detached-filter-ansi-sequences       | Specifies if `detached.el` will use 
ansi-color to filter out escape sequences    |
-| detached-show-output-command         | Specifies if `detached.el` should 
show the session's output when attaching to it |
+| dtache-session-directory           | A host specific directory to store 
sessions in                                   |
+| dtache-db-directory                | A localhost specific directory to store 
the database                             |
+| dtache-dtach-program               | Name or path to the `dtach` program     
                                         |
+| dtache-shell-program               | Name or path to the `shell` that 
`dtache.el` should use                        |
+| dtache-timer-configuration         | Configuration of the timer that runs on 
remote hosts                             |
+| dtache-env                         | Name or path to the `dtache-env` script 
                                       |
+| dtache-annotation-format           | A list of annotations that should be 
present in completion                       |
+| dtache-command-format              | A configuration for displaying a 
session command                                 |
+| dtache-tail-interval               | How often `dtache.el` should refresh 
the output when tailing                   |
+| dtache-nonattachable-commands      | A list of commands that should be 
considered nonattachable                       |
+| dtache-notification-function       | Specifies which function to issue 
notifications with                             |
+| dtache-detach-key                  | Specifies which keybinding to use to 
detach from a session                       |
+| dtache-shell-command-initial-input | Enables latest value in history to be 
used as initial input                      |
+| dtache-filter-ansi-sequences       | Specifies if `dtache.el` will use 
ansi-color to filter out escape sequences    |
+| dtache-show-output-command         | Specifies if `dtache.el` should show 
the session's output when attaching to it |
 
 Apart from those variables there is also the different `action` variables, 
which can be configured differently depending on the origin of the session.
 
 | Name                                  | Description                          
                           |
 
|---------------------------------------|-----------------------------------------------------------------|
-| detached-shell-command-session-action | Actions for sessions launched with 
`detached-shell-command`     |
-| detached-eshell-session-action        | Actions for sessions launched with 
`detached-eshell-send-input` |
-| detached-shell-session-action         | Actions for sessions launched with 
`detached-shell-send-input`  |
-| detached-compile-session-action       | Actions for sessions launched with 
`detached-compile`           |
-| detached-org-session-action           | Actions for sessions launched with 
`detached-org`               |
+| dtache-shell-command-session-action | Actions for sessions launched with 
`dtache-shell-command`     |
+| dtache-eshell-session-action        | Actions for sessions launched with 
`dtache-eshell-send-input` |
+| dtache-shell-session-action         | Actions for sessions launched with 
`dtache-shell-send-input`  |
+| dtache-compile-session-action       | Actions for sessions launched with 
`dtache-compile`           |
+| dtache-org-session-action           | Actions for sessions launched with 
`dtache-org`               |
 
 ## Remote support
 
-The `detached.el` supports [Connection Local 
Variables](https://www.gnu.org/software/emacs/manual/html_node/elisp/Connection-Local-Variables.html)
 which allows the user to customize the variables used by `detached.el` when 
running on a remote host. This example shows how the following variables are 
customized for all remote hosts.
+The `dtache` supports [Connection Local 
Variables](https://www.gnu.org/software/emacs/manual/html_node/elisp/Connection-Local-Variables.html)
 which allows the user to customize the variables used by `dtache` when running 
on a remote host. This example shows how the following variables are customized 
for all remote hosts.
 
 ``` emacs-lisp
 (connection-local-set-profile-variables
- 'remote-detached
- '((detached-env . "~/bin/detached-env")
-   (detached-shell-program . "/bin/bash")
-   (detached-shell-history-file . "~/.bash_history")
-   (detached-session-directory . "~/tmp")
-   (detached-dtach-program . "/home/user/.local/bin/dtach")))
+ 'remote-dtache
+ '((dtache-env . "~/bin/dtache-env")
+   (dtache-shell-program . "/bin/bash")
+   (dtache-shell-history-file . "~/.bash_history")
+   (dtache-session-directory . "~/tmp")
+   (dtache-dtach-program . "/home/user/.local/bin/dtach")))
 
 (connection-local-set-profiles
- '(:application tramp :protocol "ssh") 'remote-detached)
+ '(:application tramp :protocol "ssh") 'remote-dtache)
 ```
 
 ## Completion annotations
 
-Users can customize the appearance of annotations in `detached-open-session` 
by modifying the `detached-annotation-format`. The default annotation format is 
the following.
+Users can customize the appearance of annotations in `dtache-open-session` by 
modifying the `dtache-annotation-format`. The default annotation format is the 
following.
 
 ``` emacs-lisp
-(defvar detached-annotation-format
-  `((:width 3 :function detached--state-str :face detached-state-face)
-    (:width 3 :function detached--status-str :face detached-failure-face)
-    (:width 10 :function detached--host-str :face detached-host-face)
-    (:width 40 :function detached--working-dir-str :face 
detached-working-dir-face)
-    (:width 30 :function detached--metadata-str :face detached-metadata-face)
-    (:width 10 :function detached--duration-str :face detached-duration-face)
-    (:width 8 :function detached--size-str :face detached-size-face)
-    (:width 12 :function detached--creation-str :face detached-creation-face))
+(defvar dtache-annotation-format
+  `((:width 3 :function dtache--state-str :face dtache-state-face)
+    (:width 3 :function dtache--status-str :face dtache-failure-face)
+    (:width 10 :function dtache--host-str :face dtache-host-face)
+    (:width 40 :function dtache--working-dir-str :face dtache-working-dir-face)
+    (:width 30 :function dtache--metadata-str :face dtache-metadata-face)
+    (:width 10 :function dtache--duration-str :face dtache-duration-face)
+    (:width 8 :function dtache--size-str :face dtache-size-face)
+    (:width 12 :function dtache--creation-str :face dtache-creation-face))
   "The format of the annotations.")
 ```
 
 ## Status deduction
 
-Users are encouraged to define the `detached-env` variable. It should point to 
the `detached-env` script, which is provided in the repository. This script 
allows sessions to communicate the status of a session when it transitions to 
inactive. When configured properly `detached.el` will be able to set the status 
of a session to either `success` or `failure`.
+Users are encouraged to define the `detached-env` variable. It should point to 
the `detached-env` script, which is provided in the repository. This script 
allows sessions to communicate the status of a session when it transitions to 
inactive. When configured properly `dtache` will be able to set the status of a 
session to either `success` or `failure`.
 
 ``` emacs-lisp
-(setq detached-env "/path/to/repo/detached-env")
+(setq dtache-env "/path/to/repo/dtache-env")
 ```
 
 ## Metadata annotators
@@ -260,7 +260,7 @@ Users are encouraged to define the `detached-env` variable. 
It should point to t
 The user can configure any number of annotators to run upon creation of a 
session. Here is an example of an annotator which captures the git branch name, 
if the session is started in a git repository.
 
 ``` emacs-lisp
-(defun my/detached--session-git-branch ()
+(defun my/dtache--session-git-branch ()
   "Return current git branch."
   (let ((git-directory (locate-dominating-file "." ".git")))
     (when git-directory
@@ -270,51 +270,51 @@ The user can configure any number of annotators to run 
upon creation of a sessio
           (string-trim (buffer-string)))))))
 ```
 
-Next add the annotation function to the `detached-metadata-annotators-alist` 
together with a symbol describing the property.
+Next add the annotation function to the `dtache-metadata-annotators-alist` 
together with a symbol describing the property.
 
 ``` emacs-lisp
-(setq detached-metadata-annotators-alist '((branch . 
my/detached--session-git-branch))
+(setq dtache-metadata-annotators-alist '((branch . 
my/dtache--session-git-branch))
 ```
 
 ## Nonattachable commands
 
-To be able to both attach to a dtach session as well as logging its output 
`detached.el` relies on the usage of `tee`. However it is possible that the 
user tries to run a command which involves a program that doesn't integrate 
well with tee. In those situations the output could be delayed until the 
session ends, which is not preferable.
+To be able to both attach to a dtach session as well as logging its output 
`dtache` relies on the usage of `tee`. However it is possible that the user 
tries to run a command which involves a program that doesn't integrate well 
with tee. In those situations the output could be delayed until the session 
ends, which is not preferable.
 
-For these situations `detached.el` provides the 
`detached-nonattachable-commands` variable. This is a list of regular 
expressions. Any command that matches any of the strings will be getting the 
property `attachable` set to false.
+For these situations `dtache.el` provides the `dtache-nonattachable-commands` 
variable. This is a list of regular expressions. Any command that matches any 
of the strings will be getting the property `attachable` set to false.
 ``` emacs-lisp
-(setq detached-nonattachable-commands '("^ls"))
+(setq dtache-nonattachable-commands '("^ls"))
 ```
 
 Here a command beginning with `ls` would from now on be considered 
nonattachable.
 
 ## Colors in sessions
 
-The package needs to use a trick to get programs programs such as `git` or 
`grep` to show color in their outputs. This is because these commands only use 
colors and ansi sequences if they are being run in a terminal, as opposed to a 
pipe. The `detached-env` therefore has two different modes. The mode can be 
either `plain-text` or `terminal-data`, the latter is now the default. The 
`detached-env` program then uses the `script` command to make programs run in 
`detached.el` think they are i [...]
+The package needs to use a trick to get programs programs such as `git` or 
`grep` to show color in their outputs. This is because these commands only use 
colors and ansi sequences if they are being run in a terminal, as opposed to a 
pipe. The `detached-env` therefore has two different modes. The mode can be 
either `plain-text` or `terminal-data`, the latter is now the default. The 
`detached-env` program then uses the `script` command to make programs run in 
`dtache` think they are inside [...]
 
-The drawback is that there can be commands which generates escape sequences 
that the package supports and will therefore mess up the output for some 
commands. If you detect such an incompatible command you can add a regexp that 
matches that command to the list `detached-env-plain-text-commands`. By doing 
so `detached.el` will instruct `detached-env` to run those commands in 
plain-text mode.
+The drawback is that there can be commands which generates escape sequences 
that the package supports and will therefore mess up the output for some 
commands. If you detect such an incompatible command you can add a regexp that 
matches that command to the list `detached-env-plain-text-commands`. By doing 
so `dtache` will instruct `detached-env` to run those commands in plain-text 
mode.
 
 # Tips & Tricks
 
-The `detached.el` package integrates with core Emacs packages as well as 3rd 
party packages. Integration is orchestrated in the `detached-init.el`. In this 
section you can find tips for integrations that are not supported in the 
package itself.
+The `dtache.el` package integrates with core Emacs packages as well as 3rd 
party packages. Integration is orchestrated in the `dtache-init.el`. In this 
section you can find tips for integrations that are not supported in the 
package itself.
 
 ## Alert
 
-By default `detached.el` uses the built in `notifications` library to issue a 
notification. This solution uses `dbus` but if that doesn't work for the user 
there is the possibility to set the `detached-notification-function` to 
`detached-state-transition-echo-message` to use the echo area instead. If that 
doesn't suffice there is the possibility to use the 
[alert](https://github.com/jwiegley/alert) package to get a system notification 
instead.
+By default `dtache` uses the built in `notifications` library to issue a 
notification. This solution uses `dbus` but if that doesn't work for the user 
there is the possibility to set the `detached-notification-function` to 
`detached-state-transition-echo-message` to use the echo area instead. If that 
doesn't suffice there is the possibility to use the 
[alert](https://github.com/jwiegley/alert) package to get a system notification 
instead.
 
 ``` emacs-lisp
-(defun my/state-detached-transition-alert-notification (session)
+(defun my/state-dtache-transition-alert-notification (session)
   "Send an `alert' notification when SESSION becomes inactive."
-  (let ((status (car (detached--session-status session)))
-        (host (car (detached--session-host session))))
-    (alert (detached--session-command session)
+  (let ((status (car (dtache--session-status session)))
+        (host (car (dtache--session-host session))))
+    (alert (dtache--session-command session)
            :title (pcase status
-                    ('success (format "Detached finished [%s]" host))
-                    ('failure (format "Detached failed [%s]" host)))
+                    ('success (format "Dtache finished [%s]" host))
+                    ('failure (format "Dtache failed [%s]" host)))
            :severity (pcase status
                        ('success 'moderate)
                        ('failure 'high)))))
 
-(setq detached-notification-function 
#'my/detached-state-transition-alert-notification)
+(setq dtache-notification-function 
#'my/dtache-state-transition-alert-notification)
 ```
 
 # Versions
@@ -323,7 +323,7 @@ Information about larger changes that has been made between 
versions can be foun
 
 # Support
 
-The `detached.el` package should work on `Linux` and `macOS`. It is regularly 
tested on `Ubuntu` and `GNU Guix System`.
+The `dtache.el` package should work on `Linux` and `macOS`. It is regularly 
tested on `Ubuntu` and `GNU Guix System`.
 
 # Contributions
 
@@ -340,8 +340,8 @@ This package wouldn't have been were it is today without 
these contributors.
 
 ## Idea contributors
 
-- [rosetail](https://gitlab.com/rosetail) for all the great ideas and 
improvements to the package. Without those contributions `detached.el` would be 
a less sophisticated package.
-- [Troy de Freitas](https://gitlab.com/ntdef) for solving the problem of 
getting `detached.el` to work with `filenotify` on macOS.
-- [Daniel Mendler](https://gitlab.com/minad) for helping out in improving 
`detached.el`, among other things integration with other packages such as 
`embark` and `consult`.
+- [rosetail](https://gitlab.com/rosetail) for all the great ideas and 
improvements to the package. Without those contributions `dtache.el` would be a 
less sophisticated package.
+- [Troy de Freitas](https://gitlab.com/ntdef) for solving the problem of 
getting `dtache.el` to work with `filenotify` on macOS.
+- [Daniel Mendler](https://gitlab.com/minad) for helping out in improving 
`dtache.el`, among other things integration with other packages such as 
`embark` and `consult`.
 - [Ambrevar](https://gitlab.com/ambrevar) who indirectly contributed by 
inspiring me with his [yes eshell is my main 
shell](https://www.reddit.com/r/emacs/comments/6y3q4k/yes_eshell_is_my_main_shell/).
 It was through that I discovered his 
[package-eshell-detach](https://github.com/Ambrevar/dotfiles/blob/master/.emacs.d/lisp/package-eshell-detach.el)
 which got me into the idea of using `dtach` as a base for detached shell 
commands.
 
diff --git a/detached-compile.el b/detached-compile.el
index a924275fe1..6d6b0cd1d7 100644
--- a/detached-compile.el
+++ b/detached-compile.el
@@ -1,4 +1,4 @@
-;;; detached-compile.el --- Detached integration for compile -*- 
lexical-binding: t -*-
+;;; dtache-compile.el --- Dtache integration for compile -*- lexical-binding: 
t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,32 +19,32 @@
 
 ;;; Commentary:
 
-;; This is a `detached' extension which provides integration for `compile'.
+;; This is a `dtache' extension which provides integration for `compile'.
 
 ;;; Code:
 
 ;;;; Requirements
 
 (require 'compile)
-(require 'detached)
+(require 'dtache)
 
 (declare-function ansi-color-compilation-filter "ansi-color")
 
 ;;;; Variables
 
-(defcustom detached-compile-session-action
-  '(:attach detached-compile-attach
-            :view detached-compile-session
-            :run detached-compile)
-  "Actions for a session created with `detached-compile'."
-  :group 'detached
+(defcustom dtache-compile-session-action
+  '(:attach dtache-compile-attach
+            :view dtache-compile-session
+            :run dtache-compile)
+  "Actions for a session created with `dtache-compile'."
+  :group 'dtache
   :type 'plist)
 
 ;;;; Commands
 
 ;;;###autoload
-(defun detached-compile (command &optional comint)
-  "Run COMMAND through `compile' but in a 'detached' session.
+(defun dtache-compile (command &optional comint)
+  "Run COMMAND through `compile' but in a 'dtache' session.
 Optionally enable COMINT if prefix-argument is provided."
   (interactive
    (list
@@ -53,74 +53,74 @@ Optionally enable COMINT if prefix-argument is provided."
           (compilation-read-command command)
         command))
     (consp current-prefix-arg)))
-  (let* ((detached-enabled t)
-         (detached-session-origin (or detached-session-origin 'compile))
-         (detached-session-action (or detached-session-action
-                                      detached-compile-session-action))
-         (detached-session-mode 'create-and-attach))
+  (let* ((dtache-enabled t)
+         (dtache-session-origin (or dtache-session-origin 'compile))
+         (dtache-session-action (or dtache-session-action
+                                      dtache-compile-session-action))
+         (dtache-session-mode 'create-and-attach))
     (compile command comint)))
 
 ;;;###autoload
-(defun detached-compile-recompile (&optional edit-command)
-  "Re-compile by running `compile' but in a 'detached' session.
+(defun dtache-compile-recompile (&optional edit-command)
+  "Re-compile by running `compile' but in a 'dtache' session.
 Optionally EDIT-COMMAND."
   (interactive "P")
-  (let* ((detached-enabled t)
-         (detached-session-action detached-compile-session-action)
-         (detached-session-origin 'compile)
-         (detached-session-mode 'create-and-attach))
+  (let* ((dtache-enabled t)
+         (dtache-session-action dtache-compile-session-action)
+         (dtache-session-origin 'compile)
+         (dtache-session-mode 'create-and-attach))
     (recompile edit-command)))
 
 ;;;;; Functions
 
 ;;;###autoload
-(defun detached-compile-attach (session)
+(defun dtache-compile-attach (session)
   "Attach to SESSION with `compile'."
-  (when (detached-valid-session session)
-    (let* ((detached-enabled t)
-           (detached-session-mode 'attach)
-           (detached--current-session session))
-      (compilation-start (detached--session-command session)))))
+  (when (dtache-valid-session session)
+    (let* ((dtache-enabled t)
+           (dtache-session-mode 'attach)
+           (dtache--current-session session))
+      (compilation-start (dtache--session-command session)))))
 
 ;;;###autoload
-(defun detached-compile-open (session)
-  "Open SESSION with `detached-compile'."
-  (when (detached-valid-session session)
-    (if (eq 'active (detached--session-state session))
-        (detached-compile-attach session)
-      (detached-compile-session session))))
+(defun dtache-compile-open (session)
+  "Open SESSION with `dtache-compile'."
+  (when (dtache-valid-session session)
+    (if (eq 'active (dtache--session-state session))
+        (dtache-compile-attach session)
+      (dtache-compile-session session))))
 
 ;;;###autoload
-(defun detached-compile-start (_)
-  "Run in `compilation-start-hook' if `detached-enabled'."
-  (when detached-enabled
-    (setq detached--buffer-session detached--current-session)
-    (detached-compile--replace-modesetter)
-    (when detached-filter-ansi-sequences
+(defun dtache-compile-start (_)
+  "Run in `compilation-start-hook' if `dtache-enabled'."
+  (when dtache-enabled
+    (setq dtache--buffer-session dtache--current-session)
+    (dtache-compile--replace-modesetter)
+    (when dtache-filter-ansi-sequences
       (add-hook 'compilation-filter-hook #'ansi-color-compilation-filter 0 t))
-    (add-hook 'comint-preoutput-filter-functions 
#'detached--detached-env-message-filter 0 t)
-    (add-hook 'comint-preoutput-filter-functions 
#'detached--dtach-eof-message-filter 0 t)))
+    (add-hook 'comint-preoutput-filter-functions 
#'dtache--dtache-env-message-filter 0 t)
+    (add-hook 'comint-preoutput-filter-functions 
#'dtache--dtach-eof-message-filter 0 t)))
 
 ;;;;; Support functions
 
-(defun detached-compile--compilation-start (compilation-start &rest args)
-  "Create a `detached' session before running COMPILATION-START with ARGS."
-  (if detached-enabled
+(defun dtache-compile--compilation-start (compilation-start &rest args)
+  "Create a `dtache' session before running COMPILATION-START with ARGS."
+  (if dtache-enabled
       (pcase-let ((`(,command ,mode ,_ ,highlight-regexp) args)
-                  (buffer-name "*detached-compilation*"))
-        (if (and (not (eq detached-session-mode 'attach))
-                 (not (detached-attachable-command-p command)))
-            (detached-start-session command t)
+                  (buffer-name "*dtache-compilation*"))
+        (if (and (not (eq dtache-session-mode 'attach))
+                 (not (dtache-attachable-command-p command)))
+            (dtache-start-session command t)
           (cl-letf* ((name-function (lambda (_) buffer-name))
-                     (detached--current-session (or detached--current-session
-                                                    (detached-create-session 
command))))
-            (apply compilation-start `(,(detached-dtach-command 
detached--current-session t)
-                                       ,(or mode 'detached-compilation-mode)
+                     (dtache--current-session (or dtache--current-session
+                                                    (dtache-create-session 
command))))
+            (apply compilation-start `(,(dtache-dtach-command 
dtache--current-session t)
+                                       ,(or mode 'dtache-compilation-mode)
                                        ,name-function
                                        ,highlight-regexp)))))
     (apply compilation-start args)))
 
-(defun detached-compile--replace-modesetter ()
+(defun dtache-compile--replace-modesetter ()
   "Replace the modsetter inserted by `compilation-start'."
   (save-excursion
     (let ((buffer-read-only nil)
@@ -128,42 +128,42 @@ Optionally EDIT-COMMAND."
       (goto-char (point-min))
       (when (re-search-forward regexp nil t)
         (kill-region (match-beginning 0) (match-end 0))
-        (insert (detached--session-command detached--current-session))))))
+        (insert (dtache--session-command dtache--current-session))))))
 
-(defun detached-compile--compilation-detached-filter ()
+(defun dtache-compile--compilation-dtache-filter ()
   "Filter to modify the output in a compilation buffer."
   (let ((begin compilation-filter-start)
         (end (copy-marker (point))))
     (save-excursion
       (goto-char begin)
-      (when (re-search-forward "\n?Detached session.*\n?" end t)
+      (when (re-search-forward "\n?Dtache session.*\n?" end t)
         (delete-region (match-beginning 0) (match-end 0))))))
 
-(defun detached-compile--compilation-eof-filter ()
+(defun dtache-compile--compilation-eof-filter ()
   "Filter to modify the output in a compilation buffer."
   (let ((begin compilation-filter-start)
         (end (copy-marker (point))))
     (save-excursion
       (goto-char begin)
-      (when (re-search-forward (format "\n?%s\n" detached--dtach-eof-message) 
end t)
+      (when (re-search-forward (format "\n?%s\n" dtache--dtach-eof-message) 
end t)
         (delete-region (match-beginning 0) (match-end 0))))))
 
 ;;;;; Major modes
 
-(defvar detached-compilation-mode-map
+(defvar dtache-compilation-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd detached-detach-key) #'detached-detach-session)
+    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
     map)
-  "Keymap for `detached-compilation-mode'.")
+  "Keymap for `dtache-compilation-mode'.")
 
 ;;;###autoload
-(define-derived-mode detached-compilation-mode compilation-mode "Detached 
Compilation"
-  "Major mode for tailing `detached' logs."
-  (add-hook 'compilation-filter-hook 
#'detached-compile--compilation-eof-filter 0 t)
-  (add-hook 'compilation-filter-hook 
#'detached-compile--compilation-detached-filter 0 t))
+(define-derived-mode dtache-compilation-mode compilation-mode "Dtache 
Compilation"
+  "Major mode for tailing `dtache' logs."
+  (add-hook 'compilation-filter-hook #'dtache-compile--compilation-eof-filter 
0 t)
+  (add-hook 'compilation-filter-hook 
#'dtache-compile--compilation-dtache-filter 0 t))
 
-(advice-add #'compilation-start :around #'detached-compile--compilation-start)
+(advice-add #'compilation-start :around #'dtache-compile--compilation-start)
 
-(provide 'detached-compile)
+(provide 'dtache-compile)
 
-;;; detached-compile.el ends here
+;;; dtache-compile.el ends here
diff --git a/detached-consult.el b/detached-consult.el
index 0022163036..8e71f59ea8 100644
--- a/detached-consult.el
+++ b/detached-consult.el
@@ -1,4 +1,4 @@
-;;; detached-consult.el --- Detached interface using Consult multi sources -*- 
lexical-binding: t -*-
+;;; dtache-consult.el --- Dtache interface using Consult multi sources -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 
@@ -19,8 +19,8 @@
 
 ;;; Commentary:
 
-;; This package integrates `detached' with `consult'[1].  The package
-;; provides a command `detached-consult-session' which provides multiple 
session sources.
+;; This package integrates `dtache' with `consult'[1].  The package
+;; provides a command `dtache-consult-session' which provides multiple session 
sources.
 ;;
 ;; [1] https://github.com/minad/consult
 
@@ -28,37 +28,37 @@
 
 ;;;; Requirements
 
-(require 'detached)
+(require 'dtache)
 
 (declare-function consult--multi "consult")
 
 ;;;; Variables
 
-(defcustom detached-consult-hidden-predicates nil
+(defcustom dtache-consult-hidden-predicates nil
   "Predicates for sessions that should be hidden."
   :type '(repeat function)
-  :group 'detached)
-
-(defcustom detached-consult-sources
-  '(detached-consult--source-session
-    detached-consult--source-active-session
-    detached-consult--source-inactive-session
-    detached-consult--source-hidden-session
-    detached-consult--source-success-session
-    detached-consult--source-failure-session
-    detached-consult--source-local-session
-    detached-consult--source-remote-session
-    detached-consult--source-current-session)
-  "Sources used by `detached-consult-session'.
+  :group 'dtache)
+
+(defcustom dtache-consult-sources
+  '(dtache-consult--source-session
+    dtache-consult--source-active-session
+    dtache-consult--source-inactive-session
+    dtache-consult--source-hidden-session
+    dtache-consult--source-success-session
+    dtache-consult--source-failure-session
+    dtache-consult--source-local-session
+    dtache-consult--source-remote-session
+    dtache-consult--source-current-session)
+  "Sources used by `dtache-consult-session'.
 
 See `consult-multi' for a description of the source values."
   :type '(repeat symbol)
-  :group 'detached)
+  :group 'dtache)
 
-(defvar detached-consult--source-session
-  `(:category detached
-              :annotate detached-session-annotation
-              :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+(defvar dtache-consult--source-session
+  `(:category dtache
+              :annotate dtache-session-annotation
+              :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
               :items
               ,(lambda ()
                  (mapcar #'car
@@ -66,16 +66,16 @@ See `consult-multi' for a description of the source values."
                           (lambda (x)
                             (seq-find (lambda (predicate)
                                         (apply predicate `(,(cdr x))))
-                                      detached-consult-hidden-predicates))
-                          (detached-session-candidates 
(detached-get-sessions))))))
-  "All `detached' sessions as a source for `consult'.")
+                                      dtache-consult-hidden-predicates))
+                          (dtache-session-candidates (dtache-get-sessions))))))
+  "All `dtache' sessions as a source for `consult'.")
 
-(defvar detached-consult--source-hidden-session
+(defvar dtache-consult--source-hidden-session
   `(:narrow (?\s . "Hidden")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
                (mapcar #'car
@@ -83,128 +83,128 @@ See `consult-multi' for a description of the source 
values."
                         (lambda (x)
                           (seq-find (lambda (predicate)
                                       (apply predicate `(,(cdr x))))
-                                    detached-consult-hidden-predicates))
-                        (detached-session-candidates 
(detached-get-sessions))))))
-  "Active `detached' sessions as a source for `consult'.")
+                                    dtache-consult-hidden-predicates))
+                        (dtache-session-candidates (dtache-get-sessions))))))
+  "Active `dtache' sessions as a source for `consult'.")
 
-(defvar detached-consult--source-active-session
+(defvar dtache-consult--source-active-session
   `(:narrow (?a . "Active")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
                (mapcar #'car
                        (seq-filter
                         (lambda (x)
-                          (eq 'active (detached--session-state (cdr x))))
-                        (detached-session-candidates 
(detached-get-sessions))))))
-  "Active `detached' sessions as a source for `consult'.")
+                          (eq 'active (dtache--session-state (cdr x))))
+                        (dtache-session-candidates (dtache-get-sessions))))))
+  "Active `dtache' sessions as a source for `consult'.")
 
-(defvar detached-consult--source-inactive-session
+(defvar dtache-consult--source-inactive-session
   `(:narrow (?i . "Inactive")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
                (mapcar #'car
                        (seq-filter
                         (lambda (x)
-                          (eq 'inactive (detached--session-state (cdr x))))
-                        (detached-session-candidates 
(detached-get-sessions))))))
-  "Inactive `detached' sessions as a source for `consult'.")
+                          (eq 'inactive (dtache--session-state (cdr x))))
+                        (dtache-session-candidates (dtache-get-sessions))))))
+  "Inactive `dtache' sessions as a source for `consult'.")
 
-(defvar detached-consult--source-failure-session
+(defvar dtache-consult--source-failure-session
   `(:narrow (?f . "Failure")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
                (mapcar #'car
                        (seq-filter
                         (lambda (x)
-                          (eq 'failure (car (detached--session-status (cdr 
x)))))
-                        (detached-session-candidates 
(detached-get-sessions))))))
-  "Failed `detached' sessions as a source for `consult'.")
+                          (eq 'failure (car (dtache--session-status (cdr x)))))
+                        (dtache-session-candidates (dtache-get-sessions))))))
+  "Failed `dtache' sessions as a source for `consult'.")
 
-(defvar detached-consult--source-success-session
+(defvar dtache-consult--source-success-session
   `(:narrow (?s . "Success")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
                (mapcar #'car
                        (seq-filter
                         (lambda (x)
-                          (eq 'success (car (detached--session-status (cdr 
x)))))
-                        (detached-session-candidates 
(detached-get-sessions))))))
-  "Successful `detached' sessions as a source for `consult'.")
+                          (eq 'success (car (dtache--session-status (cdr x)))))
+                        (dtache-session-candidates (dtache-get-sessions))))))
+  "Successful `dtache' sessions as a source for `consult'.")
 
-(defvar detached-consult--source-local-session
+(defvar dtache-consult--source-local-session
   `(:narrow (?l . "Local Host")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
                (mapcar #'car
                        (seq-filter
                         (lambda (x)
-                          (eq 'local (cdr (detached--session-host (cdr x)))))
-                        (detached-session-candidates 
(detached-get-sessions)))))
-            "Local host `detached' sessions as a source for `consult'."))
+                          (eq 'local (cdr (dtache--session-host (cdr x)))))
+                        (dtache-session-candidates (dtache-get-sessions)))))
+            "Local host `dtache' sessions as a source for `consult'."))
 
-(defvar detached-consult--source-remote-session
+(defvar dtache-consult--source-remote-session
   `(:narrow (?r . "Remote Host")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
                (mapcar #'car
                        (seq-filter
                         (lambda (x)
-                          (eq 'remote (cdr (detached--session-host (cdr x)))))
-                        (detached-session-candidates 
(detached-get-sessions))))))
-  "Remote host `detached' sessions as a source for `consult'.")
+                          (eq 'remote (cdr (dtache--session-host (cdr x)))))
+                        (dtache-session-candidates (dtache-get-sessions))))))
+  "Remote host `dtache' sessions as a source for `consult'.")
 
-(defvar detached-consult--source-current-session
+(defvar dtache-consult--source-current-session
   `(:narrow (?c . "Current Host")
             :hidden t
-            :category detached
-            :annotate detached-session-annotation
-            :action (lambda (x) (detached-open-session 
(detached--decode-session x)))
+            :category dtache
+            :annotate dtache-session-annotation
+            :action (lambda (x) (dtache-open-session (dtache--decode-session 
x)))
             :items
             ,(lambda ()
-               (let ((host-name (car (detached--host))))
+               (let ((host-name (car (dtache--host))))
                  (mapcar #'car (seq-filter
                                 (lambda (x)
-                                  (string= (car (detached--session-host (cdr 
x))) host-name))
-                                (detached-session-candidates 
(detached-get-sessions)))))))
-  "Current host `detached' sessions as a source for `consult'.")
+                                  (string= (car (dtache--session-host (cdr 
x))) host-name))
+                                (dtache-session-candidates 
(dtache-get-sessions)))))))
+  "Current host `dtache' sessions as a source for `consult'.")
 
 ;;;; Commands
 
 ;;;###autoload
-(defun detached-consult-session ()
-  "Enhanced `detached-open-session' command."
+(defun dtache-consult-session ()
+  "Enhanced `dtache-open-session' command."
   (interactive)
   (unless (require 'consult nil 'noerror)
-    (error "Install Consult to use detached-consult"))
-  (consult--multi detached-consult-sources
+    (error "Install Consult to use dtache-consult"))
+  (consult--multi dtache-consult-sources
                   :prompt "Select session: "
                   :require-match t
                   :sort nil))
 
-(provide 'detached-consult)
+(provide 'dtache-consult)
 
-;;; detached-consult.el ends here
+;;; dtache-consult.el ends here
diff --git a/detached-dired.el b/detached-dired.el
index 673b1321d9..098692d918 100644
--- a/detached-dired.el
+++ b/detached-dired.el
@@ -1,4 +1,4 @@
-;;; detached-dired.el --- Detached integration for dired -*- lexical-binding: 
t -*-
+;;; dtache-dired.el --- Dtache integration for dired -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,27 +19,27 @@
 
 ;;; Commentary:
 
-;; This package integrates `detached' with `dired'.
+;; This package integrates `dtache' with `dired'.
 
 ;;; Code:
 
 ;;;; Requirements
 
 (require 'dired)
-(require 'detached)
+(require 'dtache)
 
 ;;;; Functions
 
 ;;;###autoload
-(defun detached-dired-do-shell-command (dired-do-shell-command &rest args)
-  "Ensure `detached' is used before running DIRED-DO-SHELL-COMMAND with ARGS."
-  (cl-letf* ((detached-session-origin 'dired)
+(defun dtache-dired-do-shell-command (dired-do-shell-command &rest args)
+  "Ensure `dtache' is used before running DIRED-DO-SHELL-COMMAND with ARGS."
+  (cl-letf* ((dtache-session-origin 'dired)
              ((symbol-function #'dired-run-shell-command)
               (lambda (command)
-                (detached-start-session command)
+                (dtache-start-session command)
                 nil)))
     (apply dired-do-shell-command args)))
 
-(provide 'detached-dired)
+(provide 'dtache-dired)
 
-;;; detached-dired.el ends here
+;;; dtache-dired.el ends here
diff --git a/detached-env b/detached-env
index 0db3e69615..2427d3a342 100755
--- a/detached-env
+++ b/detached-env
@@ -1,30 +1,30 @@
 #!/usr/bin/env bash
 
-# detached-env is a script which purpose is to run a detached command, and
+# dtache-env is a script which purpose is to run a dtache command, and
 # issue to stdout, based on the exit code.
 
 mode="$1"
 shift
-detached_command="$*"
+dtache_command="$*"
 
-# detached-env features two different modes:
+# dtache-env features two different modes:
 # 1) Plain-text: where plain text data will be logged in the sessions output
 # 2) Terminal-data: the script command is used to record the terminal
 #    data in raw format, this includes ansi escape sequences. The TERM
 #    environmental variable is set to eterm-color in order to enabled
-#    colored outputs from the detached_command
+#    colored outputs from the dtache_command
 
 if [ "$mode" = "plain-text" ]; then
-    if eval "$detached_command"; then
-        echo -e "\nDetached session finished"
+    if eval "$dtache_command"; then
+        echo -e "\nDtache session finished"
     else
-        echo -e "\nDetached session exited abnormally with code $?"
+        echo -e "\nDtache session exited abnormally with code $?"
     fi
 elif [ "$mode" = "terminal-data" ]; then
     TERM="eterm-color"
-    if eval script --quiet --flush --return --command "\"$detached_command\"" 
/dev/null; then
-        echo -e "\nDetached session finished"
+    if eval script --quiet --flush --return --command "\"$dtache_command\"" 
/dev/null; then
+        echo -e "\nDtache session finished"
     else
-        echo -e "\nDetached session exited abnormally with code $?"
+        echo -e "\nDtache session exited abnormally with code $?"
     fi
 fi
diff --git a/detached-eshell.el b/detached-eshell.el
index fc8cdc1903..7e7e493a94 100644
--- a/detached-eshell.el
+++ b/detached-eshell.el
@@ -1,4 +1,4 @@
-;;; detached-eshell.el --- Detached integration for eshell -*- 
lexical-binding: t -*-
+;;; dtache-eshell.el --- Dtache integration for eshell -*- lexical-binding: t 
-*-
 
 ;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 
@@ -19,13 +19,13 @@
 
 ;;; Commentary:
 
-;; This is a `detached' extension which provides integration for `eshell'.
+;; This is a `dtache' extension which provides integration for `eshell'.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'detached)
+(require 'dtache)
 (require 'eshell)
 (require 'esh-mode)
 (require 'esh-ext)
@@ -33,28 +33,28 @@
 
 ;;;; Variables
 
-(defcustom detached-eshell-session-action
-  '(:attach detached-shell-command-attach-session
-            :view detached-view-dwim
-            :run detached-shell-command)
-  "Actions for a session created with `detached-eshell'."
-  :group 'detached
+(defcustom dtache-eshell-session-action
+  '(:attach dtache-shell-command-attach-session
+            :view dtache-view-dwim
+            :run dtache-shell-command)
+  "Actions for a session created with `dtache-eshell'."
+  :group 'dtache
   :type 'plist)
 
 ;;;; Functions
 
-(defun detached-eshell-select-session ()
+(defun dtache-eshell-select-session ()
   "Return selected session."
-  (let* ((host-name (car (detached--host)))
+  (let* ((host-name (car (dtache--host)))
          (sessions
-          (thread-last (detached-get-sessions)
+          (thread-last (dtache-get-sessions)
                        (seq-filter (lambda (it)
-                                     (string= (car (detached--session-host 
it)) host-name)))
-                       (seq-filter (lambda (it) (eq 'active 
(detached--determine-session-state it)))))))
-    (detached-completing-read sessions)))
+                                     (string= (car (dtache--session-host it)) 
host-name)))
+                       (seq-filter (lambda (it) (eq 'active 
(dtache--determine-session-state it)))))))
+    (dtache-completing-read sessions)))
 
-(defun detached-eshell-get-dtach-process ()
-  "Return `eshell' process if `detached' is running."
+(defun dtache-eshell-get-dtach-process ()
+  "Return `eshell' process if `dtache' is running."
   (when-let* ((process (and eshell-process-list (caar eshell-process-list))))
     (and (string= (process-name process) "dtach")
          process)))
@@ -62,29 +62,29 @@
 ;;;; Commands
 
 ;;;###autoload
-(defun detached-eshell-send-input (&optional detach)
+(defun dtache-eshell-send-input (&optional detach)
   "Create a session and attach to it.
 
 If prefix-argument directly DETACH from the session."
   (interactive "P")
-  (let* ((detached-session-origin 'eshell)
-         (detached-session-mode (if detach 'create 'create-and-attach))
-         (detached-enabled t)
-         (detached--current-session nil))
-    (advice-add #'eshell-external-command :around 
#'detached-eshell-external-command)
+  (let* ((dtache-session-origin 'eshell)
+         (dtache-session-mode (if detach 'create 'create-and-attach))
+         (dtache-enabled t)
+         (dtache--current-session nil))
+    (advice-add #'eshell-external-command :around 
#'dtache-eshell-external-command)
     (call-interactively #'eshell-send-input)))
 
 ;;;###autoload
-(defun detached-eshell-attach-session (session)
+(defun dtache-eshell-attach-session (session)
   "Attach to SESSION."
   (interactive
-   (list (detached-eshell-select-session)))
-  (when (detached-valid-session session)
-    (if (and (eq 'active (detached--determine-session-state session))
-             (detached--session-attachable session))
-        (cl-letf* ((detached-session-mode 'attach)
+   (list (dtache-eshell-select-session)))
+  (when (dtache-valid-session session)
+    (if (and (eq 'active (dtache--determine-session-state session))
+             (dtache--session-attachable session))
+        (cl-letf* ((dtache-session-mode 'attach)
                    (input
-                    (detached-dtach-command session t))
+                    (dtache-dtach-command session t))
                    ((symbol-function #'eshell-add-to-history) #'ignore))
           (eshell-kill-input)
           ;; Hide the input from the user
@@ -95,51 +95,51 @@ If prefix-argument directly DETACH from the session."
             (overlay-put (make-overlay begin end) 'invisible t)
             (overlay-put (make-overlay end end) 'before-string "[attached]")
             (insert " "))
-          (setq detached--buffer-session session)
+          (setq dtache--buffer-session session)
           (call-interactively #'eshell-send-input))
-      (detached-open-session session))))
+      (dtache-open-session session))))
 
 ;;;; Support functions
 
 ;;;###autoload
-(defun detached-eshell-external-command (orig-fun &rest args)
-  "Advice `eshell-external-command' to optionally use `detached'."
-  (let* ((detached-session-action detached-eshell-session-action)
+(defun dtache-eshell-external-command (orig-fun &rest args)
+  "Advice `eshell-external-command' to optionally use `dtache'."
+  (let* ((dtache-session-action dtache-eshell-session-action)
          (command (string-trim-right
                    (mapconcat #'identity
                               (flatten-list args)
                               " ")))
-         (session (detached-create-session command))
-         (command (detached-dtach-command session)))
-    (advice-remove #'eshell-external-command 
#'detached-eshell-external-command)
-    (setq detached--buffer-session session)
-    (setq detached-enabled nil)
+         (session (dtache-create-session command))
+         (command (dtache-dtach-command session)))
+    (advice-remove #'eshell-external-command #'dtache-eshell-external-command)
+    (setq dtache--buffer-session session)
+    (setq dtache-enabled nil)
     (apply orig-fun `(,(seq-first command) ,(seq-rest command)))))
 
 ;;;; Minor mode
 
-(defvar detached-eshell-mode-map
+(defvar dtache-eshell-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "<S-return>") #'detached-eshell-send-input)
-    (define-key map (kbd "<C-return>") #'detached-eshell-attach-session)
-    (define-key map (kbd detached-detach-key) #'detached-detach-session)
+    (define-key map (kbd "<S-return>") #'dtache-eshell-send-input)
+    (define-key map (kbd "<C-return>") #'dtache-eshell-attach-session)
+    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
     map)
-  "Keymap for `detached-eshell-mode'.")
+  "Keymap for `dtache-eshell-mode'.")
 
 ;;;###autoload
-(define-minor-mode detached-eshell-mode
-  "Integrate `detached' in `eshell-mode'."
-  :lighter " detached-eshell"
+(define-minor-mode dtache-eshell-mode
+  "Integrate `dtache' in `eshell-mode'."
+  :lighter " dtache-eshell"
   :keymap (let ((map (make-sparse-keymap)))
             map)
   (make-local-variable 'eshell-preoutput-filter-functions)
-  (if detached-eshell-mode
+  (if dtache-eshell-mode
       (progn
-        (add-hook 'eshell-preoutput-filter-functions 
#'detached--detached-env-message-filter)
-        (add-hook 'eshell-preoutput-filter-functions 
#'detached--dtach-eof-message-filter))
-    (remove-hook 'eshell-preoutput-filter-functions 
#'detached--detached-env-message-filter)
-    (remove-hook 'eshell-preoutput-filter-functions 
#'detached--dtach-eof-message-filter)))
+        (add-hook 'eshell-preoutput-filter-functions 
#'dtache--dtache-env-message-filter)
+        (add-hook 'eshell-preoutput-filter-functions 
#'dtache--dtach-eof-message-filter))
+    (remove-hook 'eshell-preoutput-filter-functions 
#'dtache--dtache-env-message-filter)
+    (remove-hook 'eshell-preoutput-filter-functions 
#'dtache--dtach-eof-message-filter)))
 
-(provide 'detached-eshell)
+(provide 'dtache-eshell)
 
-;;; detached-eshell.el ends here
+;;; dtache-eshell.el ends here
diff --git a/detached-extra.el b/detached-extra.el
index a9f8867592..359dff08a5 100644
--- a/detached-extra.el
+++ b/detached-extra.el
@@ -1,4 +1,4 @@
-;;; detached-extra.el --- Detached integration for external packages -*- 
lexical-binding: t -*-
+;;; dtache-extra.el --- Dtache integration for external packages -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,37 +19,37 @@
 
 ;;; Commentary:
 
-;; This package provides a collection of functionality to integrate `detached' 
with external packages.
+;; This package provides a collection of functionality to integrate `dtache' 
with external packages.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(declare-function detached-compile "detached")
-(declare-function detached-start-session "detached")
+(declare-function dtache-compile "dtache")
+(declare-function dtache-start-session "dtache")
 
-(defvar detached-session-origin)
-(defvar detached-local-session)
+(defvar dtache-session-origin)
+(defvar dtache-local-session)
 
 ;;;; Functions
 
 ;;;###autoload
-(defun detached-extra-projectile-run-compilation (cmd &optional 
use-comint-mode)
-  "If CMD is a string execute it with `detached-compile'.
+(defun dtache-extra-projectile-run-compilation (cmd &optional use-comint-mode)
+  "If CMD is a string execute it with `dtache-compile'.
 
 Optionally USE-COMINT-MODE"
   (if (functionp cmd)
       (funcall cmd)
-    (let ((detached-session-origin 'projectile))
-      (detached-compile cmd use-comint-mode))))
+    (let ((dtache-session-origin 'projectile))
+      (dtache-compile cmd use-comint-mode))))
 
 ;;;###autoload
-(defun detached-extra-dired-rsync (command _details)
-  "Run COMMAND with `detached'."
-  (let ((detached-local-session t)
-        (detached-session-origin 'rsync))
-    (detached-start-session command t)))
+(defun dtache-extra-dired-rsync (command _details)
+  "Run COMMAND with `dtache'."
+  (let ((dtache-local-session t)
+        (dtache-session-origin 'rsync))
+    (dtache-start-session command t)))
 
-(provide 'detached-extra)
+(provide 'dtache-extra)
 
-;;; detached-extra.el ends here
+;;; dtache-extra.el ends here
diff --git a/detached-init.el b/detached-init.el
index b6bcda7543..07da844be2 100644
--- a/detached-init.el
+++ b/detached-init.el
@@ -1,4 +1,4 @@
-;;; detached-init.el --- Initialize detached -*- lexical-binding: t -*-
+;;; dtache-init.el --- Initialize dtache -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,7 +19,7 @@
 
 ;;; Commentary:
 
-;; This is intended to aid users in configuring `detached's integration with 
other packages.
+;; This is intended to aid users in configuring `dtache's integration with 
other packages.
 
 ;;; Code:
 
@@ -27,28 +27,28 @@
 
 (require 'subr-x)
 
-(declare-function detached-attach-session "detached")
-(declare-function detached-compile-session "detached")
-(declare-function detached-delete-session "detached")
-(declare-function detached-insert-session-command "detached")
-(declare-function detached-kill-session "detached")
-(declare-function detached-rerun-session "detached")
-(declare-function detached-tail-session "detached")
-(declare-function detached-view-session "detached")
-(declare-function detached-copy-session-command "detached")
-(declare-function detached-copy-session "detached")
-(declare-function detached-diff-session "detached")
-
-(declare-function detached-shell-mode "detached")
-(declare-function detached-compile-start "detached-compile")
-(declare-function detached-dired-do-shell-command "detached-dired")
-(declare-function detached-eshell-mode "detached-eshell")
-(declare-function detached-extra-projectile-run-compilation "detached-extra")
-(declare-function detached-extra-dired-rsync "detached-extra")
-(declare-function detached-org-babel-sh "detached-org")
-(declare-function detached-shell-override-history "detached-shell")
-(declare-function detached-shell-save-history-on-kill "detached-shell")
-(declare-function detached-vterm-mode "detached-vterm")
+(declare-function dtache-attach-session "dtache")
+(declare-function dtache-compile-session "dtache")
+(declare-function dtache-delete-session "dtache")
+(declare-function dtache-insert-session-command "dtache")
+(declare-function dtache-kill-session "dtache")
+(declare-function dtache-rerun-session "dtache")
+(declare-function dtache-tail-session "dtache")
+(declare-function dtache-view-session "dtache")
+(declare-function dtache-copy-session-command "dtache")
+(declare-function dtache-copy-session "dtache")
+(declare-function dtache-diff-session "dtache")
+
+(declare-function dtache-shell-mode "dtache")
+(declare-function dtache-compile-start "dtache-compile")
+(declare-function dtache-dired-do-shell-command "dtache-dired")
+(declare-function dtache-eshell-mode "dtache-eshell")
+(declare-function dtache-extra-projectile-run-compilation "dtache-extra")
+(declare-function dtache-extra-dired-rsync "dtache-extra")
+(declare-function dtache-org-babel-sh "dtache-org")
+(declare-function dtache-shell-override-history "dtache-shell")
+(declare-function dtache-shell-save-history-on-kill "dtache-shell")
+(declare-function dtache-vterm-mode "dtache-vterm")
 
 (declare-function org-babel-sh-evaluate "ob-shell")
 (declare-function dired-rsync--do-run "dired-rsync")
@@ -61,108 +61,108 @@
 
 ;;;; Variables
 
-(defcustom detached-init-block-list nil
+(defcustom dtache-init-block-list nil
   "A list of blocked packages."
-  :group 'detached
+  :group 'dtache
   :type 'list)
 
-(defcustom detached-init-allow-list
+(defcustom dtache-init-allow-list
   '(compile dired dired-rsync embark eshell org projectile shell vterm)
   "A list of allowed packages."
-  :group 'detached
+  :group 'dtache
   :type 'list)
 
-(defvar detached-action-map
+(defvar dtache-action-map
   (let ((map (make-sparse-keymap)))
-    (define-key map "a" #'detached-attach-session)
-    (define-key map "c" #'detached-compile-session)
-    (define-key map "d" #'detached-delete-session)
-    (define-key map "i" #'detached-insert-session-command)
-    (define-key map "k" #'detached-kill-session)
-    (define-key map "r" #'detached-rerun-session)
-    (define-key map "t" #'detached-tail-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 "=" #'detached-diff-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 "r" #'dtache-rerun-session)
+    (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)
+    (define-key map "=" #'dtache-diff-session)
     map))
 
 ;;;; Support functions
 
-(defvar detached-init--package-integration '((compile . detached-init-compile)
-                                             (dired . detached-init-dired)
-                                             (dired-rsync . 
detached-init-dired-rsync)
-                                             (embark . detached-init-embark)
-                                             (eshell . detached-init-eshell)
-                                             (org . detached-init-org)
-                                             (projectile . 
detached-init-projectile)
-                                             (shell . detached-init-shell)
-                                             (vterm . detached-init-vterm))
+(defvar dtache-init--package-integration '((compile . dtache-init-compile)
+                                             (dired . dtache-init-dired)
+                                             (dired-rsync . 
dtache-init-dired-rsync)
+                                             (embark . dtache-init-embark)
+                                             (eshell . dtache-init-eshell)
+                                             (org . dtache-init-org)
+                                             (projectile . 
dtache-init-projectile)
+                                             (shell . dtache-init-shell)
+                                             (vterm . dtache-init-vterm))
   "Alist which contain names of packages and their initialization function.")
 
 ;;;; Functions
 
 ;;;###autoload
-(defun detached-init ()
-  "Initialize `detached' integration with all packages."
+(defun dtache-init ()
+  "Initialize `dtache' integration with all packages."
 
-  ;; Required for `detached-shell-command' which is always provided
-  (add-hook 'shell-mode-hook #'detached-shell-mode)
+  ;; Required for `dtache-shell-command' which is always provided
+  (add-hook 'shell-mode-hook #'dtache-shell-mode)
 
   (let ((init-functions
-         (thread-last detached-init--package-integration
+         (thread-last dtache-init--package-integration
                       (seq-filter (lambda (it)
-                                    (member (car it) 
detached-init-allow-list)))
+                                    (member (car it) dtache-init-allow-list)))
                       (seq-remove (lambda (it)
-                                    (member (car it) 
detached-init-block-list)))
+                                    (member (car it) dtache-init-block-list)))
                       (seq-map #'cdr))))
     (dolist (init-function init-functions)
       (funcall init-function))))
 
-(defun detached-init-shell ()
+(defun dtache-init-shell ()
   "Initialize integration with `shell'."
-  (advice-add #'shell :around #'detached-shell-override-history)
-  (add-hook 'shell-mode-hook #'detached-shell-save-history-on-kill))
+  (advice-add #'shell :around #'dtache-shell-override-history)
+  (add-hook 'shell-mode-hook #'dtache-shell-save-history-on-kill))
 
-(defun detached-init-compile ()
+(defun dtache-init-compile ()
   "Initialize integration with `compile'."
-  (add-hook 'compilation-start-hook #'detached-compile-start)
-  (add-hook 'compilation-shell-minor-mode-hook #'detached-shell-mode))
+  (add-hook 'compilation-start-hook #'dtache-compile-start)
+  (add-hook 'compilation-shell-minor-mode-hook #'dtache-shell-mode))
 
-(defun detached-init-eshell ()
+(defun dtache-init-eshell ()
   "Initialize integration with `eshell'."
-  (add-hook 'eshell-mode-hook #'detached-eshell-mode))
+  (add-hook 'eshell-mode-hook #'dtache-eshell-mode))
 
-(defun detached-init-org ()
+(defun dtache-init-org ()
   "Initialize integration with `org'."
-  (advice-add #'org-babel-sh-evaluate :around #'detached-org-babel-sh))
+  (advice-add #'org-babel-sh-evaluate :around #'dtache-org-babel-sh))
 
-(defun detached-init-dired ()
+(defun dtache-init-dired ()
   "Initialize integration with `dired'."
-  (advice-add 'dired-do-shell-command :around 
#'detached-dired-do-shell-command))
+  (advice-add 'dired-do-shell-command :around #'dtache-dired-do-shell-command))
 
-(defun detached-init-dired-rsync ()
+(defun dtache-init-dired-rsync ()
   "Initialize integration with `dired-rsync'."
   (when (functionp #'dired-rsync)
-    (advice-add #'dired-rsync--do-run :override #'detached-extra-dired-rsync)))
+    (advice-add #'dired-rsync--do-run :override #'dtache-extra-dired-rsync)))
 
-(defun detached-init-projectile ()
+(defun dtache-init-projectile ()
   "Initialize integration with `projectile'."
   (when (functionp #'projectile)
     (advice-add 'projectile-run-compilation
-                :override #'detached-extra-projectile-run-compilation)))
+                :override #'dtache-extra-projectile-run-compilation)))
 
-(defun detached-init-vterm ()
+(defun dtache-init-vterm ()
   "Initialize integration with `vterm'."
   (when (functionp #'vterm)
-    (add-hook 'vterm-mode-hook #'detached-vterm-mode)))
+    (add-hook 'vterm-mode-hook #'dtache-vterm-mode)))
 
-(defun detached-init-embark ()
+(defun dtache-init-embark ()
   "Initialize integration with `embark'."
   (with-eval-after-load 'embark
-    (defvar embark-detached-map (make-composed-keymap detached-action-map 
embark-general-map))
-    (add-to-list 'embark-keymap-alist '(detached . embark-detached-map))))
+    (defvar embark-dtache-map (make-composed-keymap dtache-action-map 
embark-general-map))
+    (add-to-list 'embark-keymap-alist '(dtache . embark-dtache-map))))
 
-(provide 'detached-init)
+(provide 'dtache-init)
 
-;;; detached-init.el ends here
+;;; dtache-init.el ends here
diff --git a/detached-org.el b/detached-org.el
index 77bd642122..eb45d45f72 100644
--- a/detached-org.el
+++ b/detached-org.el
@@ -1,4 +1,4 @@
-;;; detached-org.el --- Detached integration for org -*- lexical-binding: t -*-
+;;; dtache-org.el --- Dtache integration for org -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,52 +19,52 @@
 
 ;;; Commentary:
 
-;; This package integrates `detached' with `org'.  In particular it
+;; This package integrates `dtache' with `org'.  In particular it
 ;; integrates with `ob-shell' in order to detach babel src blocks.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'detached)
+(require 'dtache)
 (require 'ob-shell)
 
 ;;;; Variables
 
-(defcustom detached-org-session-action
-  '(:attach detached-shell-command-attach-session
-            :view detached-view-dwim
-            :run detached-shell-command)
-  "Actions for a session created with `detached-org'."
-  :group 'detached
+(defcustom dtache-org-session-action
+  '(:attach dtache-shell-command-attach-session
+            :view dtache-view-dwim
+            :run dtache-shell-command)
+  "Actions for a session created with `dtache-org'."
+  :group 'dtache
   :type 'plist)
 
 ;;;; Functions
 
 ;;;###autoload
-(defun detached-org-babel-sh (org-babel-sh-evaluate-fun &rest args)
+(defun dtache-org-babel-sh (org-babel-sh-evaluate-fun &rest args)
   "Modify ARGS before calling ORG-BABEL-SH-EVALUATE-FUN.
 
 This function modifies the full-body in ARGS and replaces it with a
-`detached' command.  The functionality is enabled by setting a header
-property of :detached t in the org babel src block."
+`dtache' command.  The functionality is enabled by setting a header
+property of :dtache t in the org babel src block."
   (pcase-let* ((`(,session ,full-body ,params ,stdin ,cmdline) args))
-    (if (alist-get :detached params)
-        (cl-letf* ((detached-session-origin 'org)
-                   (detached-session-action detached-org-session-action)
-                   (detached-session-mode 'create)
+    (if (alist-get :dtache params)
+        (cl-letf* ((dtache-session-origin 'org)
+                   (dtache-session-action dtache-org-session-action)
+                   (dtache-session-mode 'create)
                    (new-command (replace-regexp-in-string "\n" " && " 
full-body))
                    (dtach-command
                     (if (string= "none" (alist-get :session params))
-                        (detached-dtach-command new-command t)
-                      (format "%s\necho \"[detached]\"" 
(detached-dtach-command new-command t))))
+                        (dtache-dtach-command new-command t)
+                      (format "%s\necho \"[dtache]\"" (dtache-dtach-command 
new-command t))))
                    ((symbol-function #'org-babel-eval)
                     (lambda (_ command)
-                      (start-file-process-shell-command "detached-org" nil 
command)
-                      "[detached]")))
+                      (start-file-process-shell-command "dtache-org" nil 
command)
+                      "[dtache]")))
           (apply org-babel-sh-evaluate-fun `(,session ,dtach-command ,params 
,stdin ,cmdline)))
       (apply org-babel-sh-evaluate-fun args))))
 
-(provide 'detached-org)
+(provide 'dtache-org)
 
-;;; detached-org.el ends here
+;;; dtache-org.el ends here
diff --git a/detached-shell.el b/detached-shell.el
index 089f7c1bac..54cbcd33f9 100644
--- a/detached-shell.el
+++ b/detached-shell.el
@@ -1,4 +1,4 @@
-;;; detached-shell.el --- Detached integration for shell -*- lexical-binding: 
t -*-
+;;; dtache-shell.el --- Dtache integration for shell -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
@@ -19,130 +19,130 @@
 
 ;;; Commentary:
 
-;; This is a `detached' extension which provides integration for `shell'.
+;; This is a `dtache' extension which provides integration for `shell'.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'detached)
+(require 'dtache)
 
 ;;;; Variables
 
-(defcustom detached-shell-session-action
-  '(:attach detached-shell-command-attach-session
-            :view detached-view-dwim
-            :run detached-shell-command)
-  "Actions for a session created with `detached-shell'."
-  :group 'detached
+(defcustom dtache-shell-session-action
+  '(:attach dtache-shell-command-attach-session
+            :view dtache-view-dwim
+            :run dtache-shell-command)
+  "Actions for a session created with `dtache-shell'."
+  :group 'dtache
   :type 'plist)
 
-(defcustom detached-shell-history-file nil
+(defcustom dtache-shell-history-file nil
   "File to store history."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
 ;;;; Functions
 
-(defun detached-shell-select-session ()
+(defun dtache-shell-select-session ()
   "Return selected session."
-  (let* ((host-name (car (detached--host)))
+  (let* ((host-name (car (dtache--host)))
          (sessions
-          (thread-last (detached-get-sessions)
+          (thread-last (dtache-get-sessions)
                        (seq-filter (lambda (it)
-                                     (string= (car (detached--session-host 
it)) host-name)))
-                       (seq-filter (lambda (it) (eq 'active 
(detached--determine-session-state it)))))))
-    (detached-completing-read sessions)))
+                                     (string= (car (dtache--session-host it)) 
host-name)))
+                       (seq-filter (lambda (it) (eq 'active 
(dtache--determine-session-state it)))))))
+    (dtache-completing-read sessions)))
 
 ;;;; Commands
 
 ;;;###autoload
-(defun detached-shell-send-input (&optional detach)
+(defun dtache-shell-send-input (&optional detach)
   "Create a session and attach to it unless DETACH."
   (interactive "P")
-  (let* ((detached-session-origin 'shell)
-         (detached-session-action detached-shell-session-action)
-         (detached-session-mode (if detach 'create 'create-and-attach))
-         (comint-input-sender #'detached-shell--create-input-sender))
+  (let* ((dtache-session-origin 'shell)
+         (dtache-session-action dtache-shell-session-action)
+         (dtache-session-mode (if detach 'create 'create-and-attach))
+         (comint-input-sender #'dtache-shell--create-input-sender))
     (comint-send-input)))
 
 ;;;###autoload
-(defun detached-shell-attach-session (session)
+(defun dtache-shell-attach-session (session)
   "Attach to SESSION.
 
 `comint-add-to-input-history' is temporarily disabled to avoid
 cluttering the comint-history with dtach commands."
   (interactive
-   (list (detached-shell-select-session)))
-  (when (detached-valid-session session)
-    (if (and (eq 'active (detached--determine-session-state session))
-             (detached--session-attachable session))
-        (cl-letf ((detached--current-session session)
-                  (comint-input-sender #'detached-shell--attach-input-sender)
+   (list (dtache-shell-select-session)))
+  (when (dtache-valid-session session)
+    (if (and (eq 'active (dtache--determine-session-state session))
+             (dtache--session-attachable session))
+        (cl-letf ((dtache--current-session session)
+                  (comint-input-sender #'dtache-shell--attach-input-sender)
                   ((symbol-function 'comint-add-to-input-history) (lambda (_) 
t)))
-          (setq detached--buffer-session session)
+          (setq dtache--buffer-session session)
           (comint-kill-input)
           (insert "[attached]")
           (comint-send-input))
-      (detached-open-session session))))
+      (dtache-open-session session))))
 
 ;;;; Support functions
 
-(defun detached-shell--attach-input-sender (proc _string)
-  "Attach to `detached--session' and send the attach command to PROC."
-  (let* ((detached-session-mode 'attach)
+(defun dtache-shell--attach-input-sender (proc _string)
+  "Attach to `dtache--session' and send the attach command to PROC."
+  (let* ((dtache-session-mode 'attach)
          (input
-          (detached-dtach-command detached--current-session t)))
+          (dtache-dtach-command dtache--current-session t)))
     (comint-simple-send proc input)))
 
-(defun detached-shell--create-input-sender (proc string)
-  "Create a detached session based on STRING and send to PROC."
+(defun dtache-shell--create-input-sender (proc string)
+  "Create a dtache session based on STRING and send to PROC."
   (with-connection-local-variables
    (let* ((command (substring-no-properties string))
-          (dtach-command (detached-dtach-command command t)))
+          (dtach-command (dtache-dtach-command command t)))
      (comint-simple-send proc dtach-command))))
 
-(defun detached-shell--comint-read-input-ring-advice (orig-fun &rest args)
+(defun dtache-shell--comint-read-input-ring-advice (orig-fun &rest args)
   "Set `comint-input-ring-file-name' before calling ORIG-FUN with ARGS."
   (with-connection-local-variables
    (let ((comint-input-ring-file-name
           (concat
            (file-remote-p default-directory)
-           detached-shell-history-file)))
+           dtache-shell-history-file)))
      (apply orig-fun args)
-     (advice-remove 'comint-read-input-ring 
#'detached-shell--comint-read-input-ring-advice))))
+     (advice-remove 'comint-read-input-ring 
#'dtache-shell--comint-read-input-ring-advice))))
 
-(defun detached-shell--save-history ()
+(defun dtache-shell--save-history ()
   "Save `shell' history."
   (with-connection-local-variables
-   (unless (string-prefix-p detached--shell-command-buffer (buffer-name))
+   (unless (string-prefix-p dtache--shell-command-buffer (buffer-name))
      (let* ((inhibit-message t)
             (comint-input-ring-file-name
              (concat
               (file-remote-p default-directory)
-              detached-shell-history-file)))
+              dtache-shell-history-file)))
        (comint-write-input-ring)))))
 
 ;;;###autoload
-(defun detached-shell-override-history (orig-fun &rest args)
-  "Override history to read `detached-shell-history-file' in ORIG-FUN with 
ARGS.
+(defun dtache-shell-override-history (orig-fun &rest args)
+  "Override history to read `dtache-shell-history-file' in ORIG-FUN with ARGS.
 
 This function also makes sure that the HISTFILE is disabled for local shells."
   (cl-letf (((getenv "HISTFILE") ""))
-    (advice-add 'comint-read-input-ring :around 
#'detached-shell--comint-read-input-ring-advice)
+    (advice-add 'comint-read-input-ring :around 
#'dtache-shell--comint-read-input-ring-advice)
     (apply orig-fun args)))
 
 ;;;###autoload
-(defun detached-shell-save-history-on-kill ()
+(defun dtache-shell-save-history-on-kill ()
   "Add hook to save history when killing `shell' buffer."
-  (add-hook 'kill-buffer-hook #'detached-shell--save-history 0 t))
+  (add-hook 'kill-buffer-hook #'dtache-shell--save-history 0 t))
 
 ;;;; Minor mode
 
-(let ((map detached-shell-mode-map))
-  (define-key map (kbd "<S-return>") #'detached-shell-send-input)
-  (define-key map (kbd "<C-return>") #'detached-shell-attach-session))
+(let ((map dtache-shell-mode-map))
+  (define-key map (kbd "<S-return>") #'dtache-shell-send-input)
+  (define-key map (kbd "<C-return>") #'dtache-shell-attach-session))
 
-(provide 'detached-shell)
+(provide 'dtache-shell)
 
-;;; detached-shell.el ends here
+;;; dtache-shell.el ends here
diff --git a/detached-vterm.el b/detached-vterm.el
index b9217fd59e..fc1e27db93 100644
--- a/detached-vterm.el
+++ b/detached-vterm.el
@@ -1,4 +1,4 @@
-;;; detached-vterm.el --- Detached integration with vterm -*- lexical-binding: 
t -*-
+;;; dtache-vterm.el --- Dtache integration with vterm -*- lexical-binding: t 
-*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,13 +19,13 @@
 
 ;;; Commentary:
 
-;; This package integrates `detached' with `vterm'
+;; This package integrates `dtache' with `vterm'
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'detached)
+(require 'dtache)
 
 (declare-function vterm-send-C-a "vterm")
 (declare-function vterm-send-C-k "vterm")
@@ -38,64 +38,64 @@
 ;;;; Commands
 
 ;;;###autoload
-(defun detached-vterm-send-input (&optional detach)
-  "Create a `detached' session.
+(defun dtache-vterm-send-input (&optional detach)
+  "Create a `dtache' session.
 
 Optionally DETACH from it."
   (interactive)
   (vterm-send-C-a)
   (let* ((input (buffer-substring-no-properties (point) (vterm-end-of-line)))
-         (detached-session-origin 'vterm)
-         (detached-session-action
-          '(:attach detached-shell-command-attach-session
-                    :view detached-view-dwim
-                    :run detached-shell-command))
-         (detached-session-mode
+         (dtache-session-origin 'vterm)
+         (dtache-session-action
+          '(:attach dtache-shell-command-attach-session
+                    :view dtache-view-dwim
+                    :run dtache-shell-command))
+         (dtache-session-mode
           (if detach 'create 'create-and-attach)))
     (vterm-send-C-k)
-    (process-send-string vterm--process (detached-dtach-command input t))
+    (process-send-string vterm--process (dtache-dtach-command input t))
     (vterm-send-C-e)
     (vterm-send-return)))
 
 ;;;###autoload
-(defun detached-vterm-attach (session)
-  "Attach to an active `detached' SESSION."
+(defun dtache-vterm-attach (session)
+  "Attach to an active `dtache' SESSION."
   (interactive
    (list
-    (let* ((host-name (car (detached--host)))
+    (let* ((host-name (car (dtache--host)))
            (sessions
-            (thread-last (detached-get-sessions)
+            (thread-last (dtache-get-sessions)
                          (seq-filter (lambda (it)
-                                       (string= (car (detached--session-host 
it)) host-name)))
-                         (seq-filter (lambda (it) (eq 'active 
(detached--determine-session-state it)))))))
-      (detached-completing-read sessions))))
-  (let ((detached-session-mode 'attach))
-    (process-send-string vterm--process (detached-dtach-command session t))
+                                       (string= (car (dtache--session-host 
it)) host-name)))
+                         (seq-filter (lambda (it) (eq 'active 
(dtache--determine-session-state it)))))))
+      (dtache-completing-read sessions))))
+  (let ((dtache-session-mode 'attach))
+    (process-send-string vterm--process (dtache-dtach-command session t))
     (vterm-send-return)))
 
 ;;;###autoload
-(defun detached-vterm-detach ()
-  "Detach from a `detached' session."
+(defun dtache-vterm-detach ()
+  "Detach from a `dtache' session."
   (interactive)
-  (process-send-string vterm--process detached--dtach-detach-character))
+  (process-send-string vterm--process dtache--dtach-detach-character))
 
 ;;;; Minor mode
 
-(defvar detached-vterm-mode-map
+(defvar dtache-vterm-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd "<S-return>") #'detached-vterm-send-input)
-    (define-key map (kbd "<C-return>") #'detached-vterm-attach)
-    (define-key map (kbd detached-detach-key) #'detached-vterm-detach)
+    (define-key map (kbd "<S-return>") #'dtache-vterm-send-input)
+    (define-key map (kbd "<C-return>") #'dtache-vterm-attach)
+    (define-key map (kbd dtache-detach-key) #'dtache-vterm-detach)
     map)
-  "Keymap for `detached-vterm-mode'.")
+  "Keymap for `dtache-vterm-mode'.")
 
 ;;;###autoload
-(define-minor-mode detached-vterm-mode
-  "Integrate `detached' in `vterm'."
-  :lighter " detached-vterm"
+(define-minor-mode dtache-vterm-mode
+  "Integrate `dtache' in `vterm'."
+  :lighter " dtache-vterm"
   :keymap (let ((map (make-sparse-keymap)))
             map))
 
-(provide 'detached-vterm)
+(provide 'dtache-vterm)
 
-;;; detached-vterm.el ends here
+;;; dtache-vterm.el ends here
diff --git a/detached.el b/detached.el
index f5a0ac97a0..0d1e96eb75 100644
--- a/detached.el
+++ b/detached.el
@@ -1,10 +1,10 @@
-;;; detached.el --- A package to launch, and manage, detached processes -*- 
lexical-binding: t -*-
+;;; dtache.el --- A package to launch, and manage, dtache processes -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
 ;; Author: Niklas Eklund <niklas.eklund@posteo.net>
 ;; Maintainer: Niklas Eklund <niklas.eklund@posteo.net>
-;; URL: https://sr.ht/~niklaseklund/detached.el/
+;; URL: https://sr.ht/~niklaseklund/dtache.el/
 ;; Version: 0.6
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: convenience processes
@@ -26,15 +26,15 @@
 
 ;;; Commentary:
 
-;; The detached package allows users to run shell commands detached from
+;; The dtache package allows users to run shell commands dtache from
 ;; Emacs.  These commands are launched in sessions, using the program
 ;; dtach[1].  These sessions can be easily created through the command
-;; `detached-shell-command', or any of the commands provided by the
-;; `detached-shell', `detached-eshell' and `detached-compile' extensions.
+;; `dtache-shell-command', or any of the commands provided by the
+;; `dtache-shell', `dtache-eshell' and `dtache-compile' extensions.
 
-;; When a session is created, detached makes sure that Emacs is attached
+;; When a session is created, dtache makes sure that Emacs is attached
 ;; to it the same time, which makes it a seamless experience for the
-;; users.  The `detached' package internally creates a `detached-session'
+;; users.  The `dtache' package internally creates a `dtache-session'
 ;; for all commands.
 
 ;; [1] https://github.com/crigler/dtach
@@ -51,229 +51,229 @@
 (require 'simple)
 (require 'tramp)
 
-(declare-function detached-eshell-get-dtach-process "detached-eshell")
+(declare-function dtache-eshell-get-dtach-process "dtache-eshell")
 
 ;;;; Variables
 
 ;;;;; Customizable
 
-(defcustom detached-session-directory (expand-file-name "detached" 
(temporary-file-directory))
+(defcustom dtache-session-directory (expand-file-name "dtache" 
(temporary-file-directory))
   "The directory to store sessions."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-db-directory user-emacs-directory
-  "The directory to store the `detached' database."
+(defcustom dtache-db-directory user-emacs-directory
+  "The directory to store the `dtache' database."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-dtach-program "dtach"
+(defcustom dtache-dtach-program "dtach"
   "The name of the `dtach' program."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-shell-program shell-file-name
+(defcustom dtache-shell-program shell-file-name
   "Path to the shell to run the dtach command in."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-show-output-on-attach nil
+(defcustom dtache-show-output-on-attach nil
   "If set to t show the session output when attaching to it."
   :type 'bool
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-show-output-command (executable-find "cat")
+(defcustom dtache-show-output-command (executable-find "cat")
   "The command to be run to show a sessions output."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-env nil
-  "The name of, or path to, the `detached' environment script."
+(defcustom dtache-env nil
+  "The name of, or path to, the `dtache' environment script."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-env-plain-text-commands nil
+(defcustom dtache-env-plain-text-commands nil
   "A list of regexps for commands to run in plain-text mode."
   :type 'list
-  :group 'detached)
-
-(defcustom detached-annotation-format
-  '((:width 3 :padding 2 :function detached--status-str :face 
detached-failure-face)
-    (:width 3 :padding 4 :function detached--state-str :face 
detached-state-face)
-    (:width 10 :padding 4 :function detached--host-str :face 
detached-host-face)
-    (:width 40 :padding 4 :function detached--working-dir-str :face 
detached-working-dir-face)
-    (:width 40 :padding 4 :function detached--metadata-str :face 
detached-metadata-face)
-    (:width 10 :padding 4 :function detached--duration-str :face 
detached-duration-face)
-    (:width 8 :padding 4 :function detached--size-str :face detached-size-face)
-    (:width 12 :padding 4 :function detached--creation-str :face 
detached-creation-face))
+  :group 'dtache)
+
+(defcustom dtache-annotation-format
+  '((:width 3 :padding 2 :function dtache--status-str :face 
dtache-failure-face)
+    (:width 3 :padding 4 :function dtache--state-str :face dtache-state-face)
+    (:width 10 :padding 4 :function dtache--host-str :face dtache-host-face)
+    (:width 40 :padding 4 :function dtache--working-dir-str :face 
dtache-working-dir-face)
+    (:width 40 :padding 4 :function dtache--metadata-str :face 
dtache-metadata-face)
+    (:width 10 :padding 4 :function dtache--duration-str :face 
dtache-duration-face)
+    (:width 8 :padding 4 :function dtache--size-str :face dtache-size-face)
+    (:width 12 :padding 4 :function dtache--creation-str :face 
dtache-creation-face))
   "The format of the annotations."
   :type '(repeat symbol)
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-command-format
-  '(:width 90 :padding 4 :function detached-command-str)
+(defcustom dtache-command-format
+  '(:width 90 :padding 4 :function dtache-command-str)
   "The format for displaying the command."
   :type 'integer
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-tail-interval 2
+(defcustom dtache-tail-interval 2
   "Interval in seconds for the update rate when tailing a session."
   :type 'integer
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-open-active-session-action 'attach
+(defcustom dtache-open-active-session-action 'attach
   "How to open an active session, allowed values are `attach' and `tail'."
   :type 'symbol
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-shell-command-session-action
-  '(:attach detached-shell-command-attach-session
-            :view detached-view-dwim
-            :run detached-shell-command)
-  "Actions for a session created with `detached-shell-command'."
+(defcustom dtache-shell-command-session-action
+  '(:attach dtache-shell-command-attach-session
+            :view dtache-view-dwim
+            :run dtache-shell-command)
+  "Actions for a session created with `dtache-shell-command'."
   :type 'plist
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-shell-command-initial-input t
-  "Variable to control initial command input for `detached-shell-command'.
+(defcustom dtache-shell-command-initial-input t
+  "Variable to control initial command input for `dtache-shell-command'.
 If set to a non nil value the latest entry to
-`detached-shell-command-history' will be used as the initial input in
-`detached-shell-command' when it is used as a command."
+`dtache-shell-command-history' will be used as the initial input in
+`dtache-shell-command' when it is used as a command."
   :type 'bool
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-nonattachable-commands nil
-  "A list of commands which `detached' should consider nonattachable."
+(defcustom dtache-nonattachable-commands nil
+  "A list of commands which `dtache' should consider nonattachable."
   :type '(repeat (regexp :format "%v"))
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-notification-function 
#'detached-state-transition-notifications-message
+(defcustom dtache-notification-function 
#'dtache-state-transition-notifications-message
   "Variable to set which function to use to issue a notification."
   :type 'function
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-detach-key "C-c C-d"
+(defcustom dtache-detach-key "C-c C-d"
   "Variable to set the keybinding for detaching."
   :type 'string
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-filter-ansi-sequences t
-  "Variable to instruct `detached' to use `ansi-filter'."
+(defcustom dtache-filter-ansi-sequences t
+  "Variable to instruct `dtache' to use `ansi-filter'."
   :type 'bool
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-log-mode-hook '()
-  "Hook for customizing `detached-log' mode."
+(defcustom dtache-log-mode-hook '()
+  "Hook for customizing `dtache-log' mode."
   :type 'hook
-  :group 'detached)
+  :group 'dtache)
 
-(defcustom detached-shell-mode-filter-functions
-  '(detached--detached-env-message-filter
-    detached--dtach-eof-message-filter)
-  "A list of filter functions that are run in `detached-shell-mode'."
+(defcustom dtache-shell-mode-filter-functions
+  '(dtache--dtache-env-message-filter
+    dtache--dtach-eof-message-filter)
+  "A list of filter functions that are run in `dtache-shell-mode'."
   :type 'list
-  :group 'detached)
+  :group 'dtache)
 
 ;;;;; Public
 
-(defvar detached-enabled nil)
-(defvar detached-session-mode nil
+(defvar dtache-enabled nil)
+(defvar dtache-session-mode nil
   "Mode of operation for session.
 Valid values are: create, new and attach")
-(defvar detached-session-origin nil
+(defvar dtache-session-origin nil
   "Variable to specify the origin of the session.")
-(defvar detached-session-action nil
+(defvar dtache-session-action nil
   "A property list of actions for a session.")
-(defvar detached-shell-command-history nil
-  "History of commands run with `detached-shell-command'.")
-(defvar detached-local-session nil
+(defvar dtache-shell-command-history nil
+  "History of commands run with `dtache-shell-command'.")
+(defvar dtache-local-session nil
   "If set to t enforces a local session.")
 
-(defvar detached-compile-session-hooks nil
+(defvar dtache-compile-session-hooks nil
   "Hooks to run when compiling a session.")
-(defvar detached-metadata-annotators-alist nil
+(defvar dtache-metadata-annotators-alist nil
   "An alist of annotators for metadata.")
 
-(defconst detached-session-version "0.6.1"
-  "The version of `detached-session'.
+(defconst dtache-session-version "0.6.1"
+  "The version of `dtache-session'.
 This version is encoded as [package-version].[revision].")
 
 ;;;;; Faces
 
-(defgroup detached-faces nil
-  "Faces used by `detached'."
-  :group 'detached
+(defgroup dtache-faces nil
+  "Faces used by `dtache'."
+  :group 'dtache
   :group 'faces)
 
-(defface detached-metadata-face
+(defface dtache-metadata-face
   '((t :inherit font-lock-builtin-face))
-  "Face used to highlight metadata in `detached'.")
+  "Face used to highlight metadata in `dtache'.")
 
-(defface detached-failure-face
+(defface dtache-failure-face
   '((t :inherit error))
-  "Face used to highlight failure in `detached'.")
+  "Face used to highlight failure in `dtache'.")
 
-(defface detached-state-face
+(defface dtache-state-face
   '((t :inherit success))
-  "Face used to highlight state in `detached'.")
+  "Face used to highlight state in `dtache'.")
 
-(defface detached-duration-face
+(defface dtache-duration-face
   '((t :inherit font-lock-builtin-face))
-  "Face used to highlight duration in `detached'.")
+  "Face used to highlight duration in `dtache'.")
 
-(defface detached-size-face
+(defface dtache-size-face
   '((t :inherit font-lock-function-name-face))
-  "Face used to highlight size in `detached'.")
+  "Face used to highlight size in `dtache'.")
 
-(defface detached-creation-face
+(defface dtache-creation-face
   '((t :inherit font-lock-comment-face))
-  "Face used to highlight date in `detached'.")
+  "Face used to highlight date in `dtache'.")
 
-(defface detached-working-dir-face
+(defface dtache-working-dir-face
   '((t :inherit font-lock-variable-name-face))
-  "Face used to highlight working directory in `detached'.")
+  "Face used to highlight working directory in `dtache'.")
 
-(defface detached-host-face
+(defface dtache-host-face
   '((t :inherit font-lock-constant-face))
-  "Face used to highlight host in `detached'.")
+  "Face used to highlight host in `dtache'.")
 
-(defface detached-identifier-face
+(defface dtache-identifier-face
   '((t :inherit font-lock-comment-face))
-  "Face used to highlight identifier in `detached'.")
+  "Face used to highlight identifier in `dtache'.")
 
 ;;;;; Private
 
-(defvar detached--sessions-initialized nil
+(defvar dtache--sessions-initialized nil
   "Sessions are initialized.")
-(defvar detached--sessions nil
+(defvar dtache--sessions nil
   "A list of sessions.")
-(defvar detached--watched-session-directories nil
+(defvar dtache--watched-session-directories nil
   "An alist where values are a (directory . descriptor).")
-(defvar detached--db-watch nil
-  "A descriptor to the `detached-db-directory'.")
-(defvar detached--buffer-session nil
-  "The `detached-session' session in current buffer.")
-(defvar detached--current-session nil
+(defvar dtache--db-watch nil
+  "A descriptor to the `dtache-db-directory'.")
+(defvar dtache--buffer-session nil
+  "The `dtache-session' session in current buffer.")
+(defvar dtache--current-session nil
   "The current session.")
-(make-variable-buffer-local 'detached--buffer-session)
-(defvar detached--session-candidates nil
+(make-variable-buffer-local 'dtache--buffer-session)
+(defvar dtache--session-candidates nil
   "An alist of session candidates.")
-(defvar detached--annotation-widths nil
+(defvar dtache--annotation-widths nil
   "An alist of widths to use for annotation.")
 
-(defconst detached--shell-command-buffer "*Detached Shell Command*"
-  "Name of the `detached-shell-command' buffer.")
-(defconst detached--dtach-eof-message "\\[EOF - dtach terminating\\]"
+(defconst dtache--shell-command-buffer "*Dtache Shell Command*"
+  "Name of the `dtache-shell-command' buffer.")
+(defconst dtache--dtach-eof-message "\\[EOF - dtach terminating\\]"
   "Message printed when `dtach' terminates.")
-(defconst detached--dtach-detached-message "\\[detached\\]\^M"
+(defconst dtache--dtach-dtache-message "\\[dtache\\]\^M"
   "Message printed when detaching from `dtach'.")
-(defconst detached--dtach-detach-character "\C-\\"
+(defconst dtache--dtach-detach-character "\C-\\"
   "Character used to detach from a session.")
 
 ;;;; Data structures
 
-(cl-defstruct (detached-session (:constructor detached--session-create)
-                              (:conc-name detached--session-))
+(cl-defstruct (dtache-session (:constructor dtache--session-create)
+                              (:conc-name dtache--session-))
   (id nil :read-only t)
   (command nil :read-only t)
   (origin nil :read-only t)
@@ -291,9 +291,9 @@ This version is encoded as [package-version].[revision].")
 
 ;;;; Macros
 
-(defmacro detached-connection-local-variables (&rest body)
+(defmacro dtache-connection-local-variables (&rest body)
   "A macro that conditionally use `connection-local-variables' when executing 
BODY."
-  `(if detached-local-session
+  `(if dtache-local-session
        (progn
          ,@body)
      (with-connection-local-variables
@@ -303,373 +303,373 @@ This version is encoded as 
[package-version].[revision].")
 ;;;; Commands
 
 ;;;###autoload
-(defun detached-shell-command (command &optional suppress-output)
-  "Execute COMMAND with `detached'.
+(defun dtache-shell-command (command &optional suppress-output)
+  "Execute COMMAND with `dtache'.
 
 Optionally SUPPRESS-OUTPUT if prefix-argument is provided."
   (interactive
    (list
     (read-shell-command (if shell-command-prompt-show-cwd
-                            (format-message "Detached shell command in `%s': "
+                            (format-message "Dtache shell command in `%s': "
                                             (abbreviate-file-name
                                              default-directory))
-                          "Detached shell command: ")
-                        (when detached-shell-command-initial-input
-                          (car detached-shell-command-history))
-                        'detached-shell-command-history)
+                          "Dtache shell command: ")
+                        (when dtache-shell-command-initial-input
+                          (car dtache-shell-command-history))
+                        'dtache-shell-command-history)
     current-prefix-arg))
-  (let* ((detached-session-origin (or detached-session-origin 'shell-command))
-         (detached-session-action (or detached-session-action
-                                    detached-shell-command-session-action))
-         (detached--current-session (detached-create-session command)))
-    (detached-start-session command suppress-output)))
+  (let* ((dtache-session-origin (or dtache-session-origin 'shell-command))
+         (dtache-session-action (or dtache-session-action
+                                    dtache-shell-command-session-action))
+         (dtache--current-session (dtache-create-session command)))
+    (dtache-start-session command suppress-output)))
 
 ;;;###autoload
-(defun detached-open-session (session)
-  "Open a `detached' SESSION."
+(defun dtache-open-session (session)
+  "Open a `dtache' SESSION."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (if (eq 'active (detached--session-state session))
-        (pcase detached-open-active-session-action
-          ('attach (detached-attach-session session))
-          ('tail (detached-tail-session session))
-          (_ (message "`detached-open-active-session-action' has an incorrect 
value")))
-      (if-let ((view-fun (plist-get (detached--session-action session) :view)))
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
+    (if (eq 'active (dtache--session-state session))
+        (pcase dtache-open-active-session-action
+          ('attach (dtache-attach-session session))
+          ('tail (dtache-tail-session session))
+          (_ (message "`dtache-open-active-session-action' has an incorrect 
value")))
+      (if-let ((view-fun (plist-get (dtache--session-action session) :view)))
           (funcall view-fun session)
-        (detached-view-dwim session)))))
+        (dtache-view-dwim session)))))
 
 ;;;###autoload
-(defun detached-compile-session (session)
+(defun dtache-compile-session (session)
   "Compile SESSION.
 
 The session is compiled by opening its output and enabling
 `compilation-minor-mode'."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (let ((buffer-name "*detached-session-output*")
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
+    (let ((buffer-name "*dtache-session-output*")
           (file
-           (detached--session-file session 'log))
+           (dtache--session-file session 'log))
           (tramp-verbose 1))
       (when (file-exists-p file)
         (with-current-buffer (get-buffer-create buffer-name)
           (setq-local buffer-read-only nil)
           (erase-buffer)
-          (insert (detached--session-output session))
+          (insert (dtache--session-output session))
           (setq-local default-directory
-                      (detached--session-working-directory session))
-          (run-hooks 'detached-compile-session-hooks)
-          (detached-log-mode)
+                      (dtache--session-working-directory session))
+          (run-hooks 'dtache-compile-session-hooks)
+          (dtache-log-mode)
           (compilation-minor-mode)
-          (setq detached--buffer-session session)
+          (setq dtache--buffer-session session)
           (setq-local font-lock-defaults '(compilation-mode-font-lock-keywords 
t))
           (font-lock-mode)
           (read-only-mode))
         (pop-to-buffer buffer-name)))))
 
 ;;;###autoload
-(defun detached-rerun-session (session &optional suppress-output)
+(defun dtache-rerun-session (session &optional suppress-output)
   "Rerun SESSION, optionally SUPPRESS-OUTPUT."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))
+   (list (dtache-completing-read (dtache-get-sessions))
          current-prefix-arg))
-  (when (detached-valid-session session)
+  (when (dtache-valid-session session)
     (let* ((default-directory
-            (detached--session-working-directory session))
-           (detached-session-action (detached--session-action session))
-           (command (detached--session-command session)))
+            (dtache--session-working-directory session))
+           (dtache-session-action (dtache--session-action session))
+           (command (dtache--session-command session)))
       (if suppress-output
-          (detached-start-session command suppress-output)
-        (if-let ((run-fun (plist-get (detached--session-action session) :run)))
+          (dtache-start-session command suppress-output)
+        (if-let ((run-fun (plist-get (dtache--session-action session) :run)))
             (funcall run-fun command)
-          (detached-start-session command))))))
+          (dtache-start-session command))))))
 
 ;;;###autoload
-(defun detached-attach-session (session)
+(defun dtache-attach-session (session)
   "Attach to SESSION."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (if (or (eq 'inactive (detached--session-state session))
-            (not (detached--session-attachable session)))
-        (detached-open-session session)
-      (if-let ((attach-fun (plist-get (detached--session-action session) 
:attach)))
+   (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-session session)
+      (if-let ((attach-fun (plist-get (dtache--session-action session) 
:attach)))
           (funcall attach-fun session)
-        (detached-shell-command-attach-session session)))))
+        (dtache-shell-command-attach-session session)))))
 
 ;;;###autoload
-(defun detached-copy-session (session)
+(defun dtache-copy-session (session)
   "Copy SESSION's output."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
     (with-temp-buffer
-      (insert (detached--session-output session))
-      (when (eq 'terminal-data (detached--session-env-mode session))
-        ;; Enable `detached-log-mode' to parse ansi-escape sequences
-        (detached-log-mode))
+      (insert (dtache--session-output session))
+      (when (eq 'terminal-data (dtache--session-env-mode session))
+        ;; Enable `dtache-log-mode' to parse ansi-escape sequences
+        (dtache-log-mode))
       (kill-new (buffer-string)))))
 
 ;;;###autoload
-(defun detached-copy-session-command (session)
+(defun dtache-copy-session-command (session)
   "Copy SESSION's command."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (kill-new (detached--session-command session))))
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
+    (kill-new (dtache--session-command session))))
 
 ;;;###autoload
-(defun detached-insert-session-command (session)
+(defun dtache-insert-session-command (session)
   "Insert SESSION's command."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (insert (detached--session-command session))))
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
+    (insert (dtache--session-command session))))
 
 ;;;###autoload
-(defun detached-delete-session (session)
+(defun dtache-delete-session (session)
   "Delete SESSION."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (if (eq 'active (detached--determine-session-state session))
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
+    (if (eq 'active (dtache--determine-session-state session))
         (message "Kill session first before removing it.")
-      (detached--db-remove-entry session))))
+      (dtache--db-remove-entry session))))
 
 ;;;###autoload
-(defun detached-kill-session (session &optional delete)
+(defun dtache-kill-session (session &optional delete)
   "Send a TERM signal to SESSION.
 
 Optionally DELETE the session if prefix-argument is provided."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))
+   (list (dtache-completing-read (dtache-get-sessions))
          current-prefix-arg))
-  (when (detached-valid-session session)
-    (when-let* ((default-directory (detached--session-directory session))
-                (pid (detached--session-pid session)))
-      (detached--kill-processes pid))
+  (when (dtache-valid-session session)
+    (when-let* ((default-directory (dtache--session-directory session))
+                (pid (dtache--session-pid session)))
+      (dtache--kill-processes pid))
     (when delete
-      (detached--db-remove-entry session))))
+      (dtache--db-remove-entry session))))
 
 ;;;###autoload
-(defun detached-view-session (session)
+(defun dtache-view-session (session)
   "View the SESSION."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (let* ((buffer-name "*detached-session-output*")
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
+    (let* ((buffer-name "*dtache-session-output*")
            (file-path
-            (detached--session-file session 'log))
+            (dtache--session-file session 'log))
            (tramp-verbose 1))
       (if (file-exists-p file-path)
           (progn
             (with-current-buffer (get-buffer-create buffer-name)
               (setq-local buffer-read-only nil)
               (erase-buffer)
-              (insert (detached--session-output session))
-              (setq-local default-directory 
(detached--session-working-directory session))
-              (detached-log-mode)
-              (setq detached--buffer-session session)
+              (insert (dtache--session-output session))
+              (setq-local default-directory (dtache--session-working-directory 
session))
+              (dtache-log-mode)
+              (setq dtache--buffer-session session)
               (goto-char (point-max)))
             (pop-to-buffer buffer-name))
-        (message "Detached can't find file: %s" file-path)))))
+        (message "Dtache can't find file: %s" file-path)))))
 
 ;;;###autoload
-(defun detached-tail-session (session)
+(defun dtache-tail-session (session)
   "Tail the SESSION."
   (interactive
-   (list (detached-completing-read (detached-get-sessions))))
-  (when (detached-valid-session session)
-    (if (eq 'active (detached--determine-session-state session))
+   (list (dtache-completing-read (dtache-get-sessions))))
+  (when (dtache-valid-session session)
+    (if (eq 'active (dtache--determine-session-state session))
         (let* ((file-path
-                (detached--session-file session 'log))
+                (dtache--session-file session 'log))
                (tramp-verbose 1))
           (when (file-exists-p file-path)
             (find-file-other-window file-path)
-            (setq detached--buffer-session session)
-            (detached-tail-mode)
+            (setq dtache--buffer-session session)
+            (dtache-tail-mode)
             (goto-char (point-max))))
-      (detached-view-session session))))
+      (dtache-view-session session))))
 
 ;;;###autoload
-(defun detached-diff-session (session1 session2)
+(defun dtache-diff-session (session1 session2)
   "Diff SESSION1 with SESSION2."
   (interactive
-   (let ((sessions (detached-get-sessions)))
-     `(,(detached-completing-read sessions)
-       ,(detached-completing-read sessions))))
-  (when (and (detached-valid-session session1)
-             (detached-valid-session session2))
-    (let ((buffer1 "*detached-session-output-1*")
-          (buffer2 "*detached-session-output-2*"))
+   (let ((sessions (dtache-get-sessions)))
+     `(,(dtache-completing-read sessions)
+       ,(dtache-completing-read sessions))))
+  (when (and (dtache-valid-session session1)
+             (dtache-valid-session session2))
+    (let ((buffer1 "*dtache-session-output-1*")
+          (buffer2 "*dtache-session-output-2*"))
       (with-current-buffer (get-buffer-create buffer1)
         (erase-buffer)
-        (insert (detached--session-header session1))
-        (insert (detached--session-output session1))
-        (when (eq 'terminal-data (detached--session-env-mode session1))
-          ;; Enable `detached-log-mode' to parse ansi-escape sequences
-          (detached-log-mode)))
+        (insert (dtache--session-header session1))
+        (insert (dtache--session-output session1))
+        (when (eq 'terminal-data (dtache--session-env-mode session1))
+          ;; Enable `dtache-log-mode' to parse ansi-escape sequences
+          (dtache-log-mode)))
       (with-current-buffer (get-buffer-create buffer2)
         (erase-buffer)
-        (insert (detached--session-header session2))
-        (insert (detached--session-output session2))
-        (when (eq 'terminal-data (detached--session-env-mode session2))
-          ;; Enable `detached-log-mode' to parse ansi-escape sequences
-          (detached-log-mode)))
+        (insert (dtache--session-header session2))
+        (insert (dtache--session-output session2))
+        (when (eq 'terminal-data (dtache--session-env-mode session2))
+          ;; Enable `dtache-log-mode' to parse ansi-escape sequences
+          (dtache-log-mode)))
       (ediff-buffers buffer1 buffer2))))
 
 ;;;###autoload
-(defun detached-detach-session ()
+(defun dtache-detach-session ()
   "Detach from session in current buffer.
 
-This command is only activated if `detached--buffer-session' is an
-active session.  For sessions created with `detached-compile' or
-`detached-shell-command', the command will also kill the window."
+This command is only activated if `dtache--buffer-session' is an
+active session.  For sessions created with `dtache-compile' or
+`dtache-shell-command', the command will also kill the window."
   (interactive)
-  (if (detached-session-p detached--buffer-session)
-      (if (eq major-mode 'detached-tail-mode)
-          (detached-quit-tail-session)
+  (if (dtache-session-p dtache--buffer-session)
+      (if (eq major-mode 'dtache-tail-mode)
+          (dtache-quit-tail-session)
           (if-let ((command-or-compile
-                    (cond ((string-match detached--shell-command-buffer 
(buffer-name)) t)
-                          ((string-match "\*detached-compilation" 
(buffer-name)) t)
-                          ((eq major-mode 'detached-log-mode) t)
-                          ((eq major-mode 'detached-tail-mode) t)
+                    (cond ((string-match dtache--shell-command-buffer 
(buffer-name)) t)
+                          ((string-match "\*dtache-compilation" (buffer-name)) 
t)
+                          ((eq major-mode 'dtache-log-mode) t)
+                          ((eq major-mode 'dtache-tail-mode) t)
                           (t nil))))
-              ;; `detached-shell-command' or `detached-compile'
+              ;; `dtache-shell-command' or `dtache-compile'
               (let ((kill-buffer-query-functions nil))
                 (when-let ((process (get-buffer-process (current-buffer))))
-                  (comint-simple-send process detached--dtach-detach-character)
-                  (message "[detached]"))
-                (setq detached--buffer-session nil)
+                  (comint-simple-send process dtache--dtach-detach-character)
+                  (message "[dtache]"))
+                (setq dtache--buffer-session nil)
                 (kill-buffer-and-window))
-            (if (eq 'active (detached--determine-session-state 
detached--buffer-session))
-                ;; `detached-eshell'
+            (if (eq 'active (dtache--determine-session-state 
dtache--buffer-session))
+                ;; `dtache-eshell'
                 (if-let ((process (and (eq major-mode 'eshell-mode)
-                                       (detached-eshell-get-dtach-process))))
+                                       (dtache-eshell-get-dtach-process))))
                     (progn
-                      (setq detached--buffer-session nil)
-                      (process-send-string process 
detached--dtach-detach-character))
-                  ;; `detached-shell'
+                      (setq dtache--buffer-session nil)
+                      (process-send-string process 
dtache--dtach-detach-character))
+                  ;; `dtache-shell'
                   (let ((process (get-buffer-process (current-buffer))))
-                    (comint-simple-send process 
detached--dtach-detach-character)
-                    (setq detached--buffer-session nil)))
-              (message "No active detached-session found in buffer."))))
-    (message "No detached-session found in buffer.")))
+                    (comint-simple-send process dtache--dtach-detach-character)
+                    (setq dtache--buffer-session nil)))
+              (message "No active dtache-session found in buffer."))))
+    (message "No dtache-session found in buffer.")))
 
 ;;;###autoload
-(defun detached-delete-sessions (&optional all-hosts)
-  "Delete `detached' sessions which belong to the current host, unless 
ALL-HOSTS."
+(defun dtache-delete-sessions (&optional all-hosts)
+  "Delete `dtache' sessions which belong to the current host, unless 
ALL-HOSTS."
   (interactive "P")
-  (let* ((host-name (car (detached--host)))
+  (let* ((host-name (car (dtache--host)))
          (sessions (if all-hosts
-                       (detached-get-sessions)
+                       (dtache-get-sessions)
                      (seq-filter (lambda (it)
-                                   (string= (car (detached--session-host it)) 
host-name))
-                                 (detached-get-sessions)))))
-    (seq-do #'detached--db-remove-entry sessions)))
+                                   (string= (car (dtache--session-host it)) 
host-name))
+                                 (dtache-get-sessions)))))
+    (seq-do #'dtache--db-remove-entry sessions)))
 
 ;;;###autoload
-(defun detached-quit-tail-session ()
-  "Quit `detached' tail session.
+(defun dtache-quit-tail-session ()
+  "Quit `dtache' tail session.
 
 The log can have been updated, but that is not done by the user but
 rather the tail mode.  To avoid a promtp `buffer-modified-p' is set to
 nil before closing."
   (interactive)
   (set-buffer-modified-p nil)
-  (setq detached--buffer-session nil)
+  (setq dtache--buffer-session nil)
   (kill-buffer-and-window))
 
 ;;;; Functions
 
 ;;;;; Session
 
-(defun detached-create-session (command)
-  "Create a `detached' session from COMMAND."
-  (detached-connection-local-variables
-   (detached--create-session-directory)
+(defun dtache-create-session (command)
+  "Create a `dtache' session from COMMAND."
+  (dtache-connection-local-variables
+   (dtache--create-session-directory)
    (let ((session
-          (detached--session-create :id (intern (detached--create-id command))
+          (dtache--session-create :id (intern (dtache--create-id command))
                                   :command command
-                                  :origin detached-session-origin
-                                  :action detached-session-action
-                                  :working-directory 
(detached--get-working-directory)
-                                  :attachable (detached-attachable-command-p 
command)
+                                  :origin dtache-session-origin
+                                  :action dtache-session-action
+                                  :working-directory 
(dtache--get-working-directory)
+                                  :attachable (dtache-attachable-command-p 
command)
                                   :time `(:start ,(time-to-seconds 
(current-time)) :end 0.0 :duration 0.0 :offset 0.0)
                                   :status '(unknown . 0)
                                   :size 0
-                                  :directory (if detached-local-session 
detached-session-directory
-                                               (concat (file-remote-p 
default-directory) detached-session-directory))
-                                  :env-mode (detached--env-mode command)
-                                  :host (detached--host)
-                                  :metadata (detached-metadata)
+                                  :directory (if dtache-local-session 
dtache-session-directory
+                                               (concat (file-remote-p 
default-directory) dtache-session-directory))
+                                  :env-mode (dtache--env-mode command)
+                                  :host (dtache--host)
+                                  :metadata (dtache-metadata)
                                   :state 'unknown)))
-     (detached--db-insert-entry session)
-     (detached--watch-session-directory (detached--session-directory session))
+     (dtache--db-insert-entry session)
+     (dtache--watch-session-directory (dtache--session-directory session))
      session)))
 
 ;;;###autoload
-(defun detached-start-session (command &optional suppress-output)
-  "Start a `detached' session running COMMAND.
+(defun dtache-start-session (command &optional suppress-output)
+  "Start a `dtache' session running COMMAND.
 
 Optionally SUPPRESS-OUTPUT."
   (let ((inhibit-message t)
-        (detached-enabled t)
-        (detached--current-session
-         (or detached--current-session
-             (detached-create-session command))))
+        (dtache-enabled t)
+        (dtache--current-session
+         (or dtache--current-session
+             (dtache-create-session command))))
     (if-let ((run-in-background
               (and (or suppress-output
-                       (eq detached-session-mode 'create)
-                       (not (detached--session-attachable 
detached--current-session)))))
-             (detached-session-mode 'create))
-        (progn (setq detached-enabled nil)
-               (if detached-local-session
+                       (eq dtache-session-mode 'create)
+                       (not (dtache--session-attachable 
dtache--current-session)))))
+             (dtache-session-mode 'create))
+        (progn (setq dtache-enabled nil)
+               (if dtache-local-session
                    (apply #'start-process-shell-command
-                          `("detached" nil ,(detached-dtach-command 
detached--current-session t)))
+                          `("dtache" nil ,(dtache-dtach-command 
dtache--current-session t)))
                  (apply #'start-file-process-shell-command
-                        `("detached" nil ,(detached-dtach-command 
detached--current-session t)))))
-      (cl-letf* ((detached-session-mode 'create-and-attach)
+                        `("dtache" nil ,(dtache-dtach-command 
dtache--current-session t)))))
+      (cl-letf* ((dtache-session-mode 'create-and-attach)
                  ((symbol-function #'set-process-sentinel) #'ignore)
-                 (buffer (get-buffer-create detached--shell-command-buffer)))
+                 (buffer (get-buffer-create dtache--shell-command-buffer)))
         (when (get-buffer-process buffer)
           (setq buffer (generate-new-buffer (buffer-name buffer))))
-        (setq detached-enabled nil)
-        (funcall #'async-shell-command (detached-dtach-command 
detached--current-session t) buffer)
-        (with-current-buffer buffer (setq detached--buffer-session 
detached--current-session))))))
+        (setq dtache-enabled nil)
+        (funcall #'async-shell-command (dtache-dtach-command 
dtache--current-session t) buffer)
+        (with-current-buffer buffer (setq dtache--buffer-session 
dtache--current-session))))))
 
-(defun detached-session-candidates (sessions)
+(defun dtache-session-candidates (sessions)
   "Return an alist of SESSIONS candidates."
   (when sessions
-    (setq detached--annotation-widths
-          (detached--annotation-widths sessions detached-annotation-format))
+    (setq dtache--annotation-widths
+          (dtache--annotation-widths sessions dtache-annotation-format))
     (let ((command-length
            (thread-last sessions
-                        (seq-map #'detached--session-command)
+                        (seq-map #'dtache--session-command)
                         (seq-map #'length)
                         (seq-max)
-                        (min (plist-get detached-command-format ':width)))))
-      (let ((command-fun (plist-get detached-command-format ':function)))
-        (setq detached--session-candidates
+                        (min (plist-get dtache-command-format ':width)))))
+      (let ((command-fun (plist-get dtache-command-format ':function)))
+        (setq dtache--session-candidates
               (thread-last sessions
                            (seq-map (lambda (it)
                                       `(,(apply command-fun `(,it 
,command-length))
                                         . ,it)))
-                           (detached--session-deduplicate)
+                           (dtache--session-deduplicate)
                            (seq-map (lambda (it)
                                       `(,(concat (car it)
-                                                 (make-string (plist-get 
detached-command-format :padding) ?\s))
+                                                 (make-string (plist-get 
dtache-command-format :padding) ?\s))
                                         . ,(cdr it))))))))))
 
-(defun detached-session-annotation (item)
+(defun dtache-session-annotation (item)
   "Associate ITEM to a session and return ts annotation."
-  (let ((session (cdr (assoc item detached--session-candidates))))
+  (let ((session (cdr (assoc item dtache--session-candidates))))
     (mapconcat
      #'identity
-     (cl-loop for annotation in detached-annotation-format
+     (cl-loop for annotation in dtache-annotation-format
               collect (let ((str (funcall (plist-get annotation :function) 
session))
-                            (width (alist-get (plist-get annotation :function) 
detached--annotation-widths)))
+                            (width (alist-get (plist-get annotation :function) 
dtache--annotation-widths)))
                         (when (> width 0)
                           (concat
                            (truncate-string-to-width
@@ -681,183 +681,183 @@ Optionally SUPPRESS-OUTPUT."
      "")))
 
 ;;;###autoload
-(defun detached-initialize-sessions ()
-  "Initialize `detached' sessions from the database."
+(defun dtache-initialize-sessions ()
+  "Initialize `dtache' sessions from the database."
 
   ;; Initialize sessions
-  (unless detached--sessions-initialized
-    (unless (file-exists-p detached-db-directory)
-      (make-directory detached-db-directory t))
-    (detached--db-initialize)
-    (setq detached--db-watch
-      (file-notify-add-watch detached-db-directory
+  (unless dtache--sessions-initialized
+    (unless (file-exists-p dtache-db-directory)
+      (make-directory dtache-db-directory t))
+    (dtache--db-initialize)
+    (setq dtache--db-watch
+      (file-notify-add-watch dtache-db-directory
                              '(change attribute-change)
-                             #'detached--db-directory-event))
-    (setq detached--sessions-initialized t)
+                             #'dtache--db-directory-event))
+    (setq dtache--sessions-initialized t)
 
     ;; Remove missing local sessions
-    (thread-last (detached--db-get-sessions)
-                 (seq-filter (lambda (it) (eq 'local (cdr 
(detached--session-host it)))))
-                 (seq-filter #'detached--session-missing-p)
-                 (seq-do #'detached--db-remove-entry))
+    (thread-last (dtache--db-get-sessions)
+                 (seq-filter (lambda (it) (eq 'local (cdr 
(dtache--session-host it)))))
+                 (seq-filter #'dtache--session-missing-p)
+                 (seq-do #'dtache--db-remove-entry))
 
     ;; Validate sessions with unknown state
-    (detached--validate-unknown-sessions)
+    (dtache--validate-unknown-sessions)
 
     ;; Update transitioned sessions
-    (thread-last (detached--db-get-sessions)
-                 (seq-filter (lambda (it) (eq 'active (detached--session-state 
it))))
-                 (seq-remove (lambda (it) (when (detached--session-missing-p 
it)
-                                       (detached--db-remove-entry it)
+    (thread-last (dtache--db-get-sessions)
+                 (seq-filter (lambda (it) (eq 'active (dtache--session-state 
it))))
+                 (seq-remove (lambda (it) (when (dtache--session-missing-p it)
+                                       (dtache--db-remove-entry it)
                                        t)))
-                 (seq-filter #'detached--state-transition-p)
-                 (seq-do #'detached--session-state-transition-update))
+                 (seq-filter #'dtache--state-transition-p)
+                 (seq-do #'dtache--session-state-transition-update))
 
     ;; Watch session directories with active sessions
-    (thread-last (detached--db-get-sessions)
-                 (seq-filter (lambda (it) (eq 'active (detached--session-state 
it))))
-                 (seq-map #'detached--session-directory)
+    (thread-last (dtache--db-get-sessions)
+                 (seq-filter (lambda (it) (eq 'active (dtache--session-state 
it))))
+                 (seq-map #'dtache--session-directory)
                  (seq-uniq)
-                 (seq-do #'detached--watch-session-directory))))
+                 (seq-do #'dtache--watch-session-directory))))
 
-(defun detached-valid-session (session)
+(defun dtache-valid-session (session)
   "Ensure that SESSION is valid.
 
 If session is not valid trigger an automatic cleanup on SESSION's host."
-  (when (detached-session-p session)
-    (if (not (detached--session-missing-p session))
+  (when (dtache-session-p session)
+    (if (not (dtache--session-missing-p session))
         t
-      (let ((host (detached--session-host session)))
+      (let ((host (dtache--session-host session)))
         (message "Session does not exist. Initiate sesion cleanup on host %s" 
(car host))
-        (detached--cleanup-host-sessions host)
+        (dtache--cleanup-host-sessions host)
         nil))))
 
-(defun detached-session-exit-code-status (session)
+(defun dtache-session-exit-code-status (session)
   "Return status based on exit-code in SESSION."
-  (if (null detached-env)
+  (if (null dtache-env)
       `(unknown . 0)
-    (let ((detached-env-message
+    (let ((dtache-env-message
            (with-temp-buffer
-             (insert-file-contents (detached--session-file session 'log))
+             (insert-file-contents (dtache--session-file session 'log))
              (goto-char (point-max))
              (thing-at-point 'line t)))
-          (success-message "Detached session finished")
-          (failure-message (rx "Detached session exited abnormally with code " 
(group (one-or-more digit)))))
-      (cond ((string-match success-message detached-env-message) `(success . 
0))
-            ((string-match failure-message detached-env-message)
-             `(failure . ,(string-to-number (match-string 1 
detached-env-message))))
+          (success-message "Dtache session finished")
+          (failure-message (rx "Dtache session exited abnormally with code " 
(group (one-or-more digit)))))
+      (cond ((string-match success-message dtache-env-message) `(success . 0))
+            ((string-match failure-message dtache-env-message)
+             `(failure . ,(string-to-number (match-string 1 
dtache-env-message))))
             (t `(unknown . 0))))))
 
-(defun detached-state-transitionion-echo-message (session)
+(defun dtache-state-transitionion-echo-message (session)
   "Issue a notification when SESSION transitions from active to inactive.
 This function uses the echo area."
-  (let ((status (pcase (car (detached--session-status session))
-                  ('success "Detached finished")
-                  ('failure "Detached failed")
-                  ('unknown "Detached finished"))))
-    (message "%s [%s]: %s" status (car (detached--session-host session)) 
(detached--session-command session))))
+  (let ((status (pcase (car (dtache--session-status session))
+                  ('success "Dtache finished")
+                  ('failure "Dtache failed")
+                  ('unknown "Dtache finished"))))
+    (message "%s [%s]: %s" status (car (dtache--session-host session)) 
(dtache--session-command session))))
 
-(defun detached-state-transition-notifications-message (session)
+(defun dtache-state-transition-notifications-message (session)
   "Issue a notification when SESSION transitions from active to inactive.
 This function uses the `notifications' library."
-  (let ((status (car (detached--session-status session)))
-        (host (car (detached--session-host session))))
+  (let ((status (car (dtache--session-status session)))
+        (host (car (dtache--session-host session))))
     (notifications-notify
      :title (pcase status
-              ('success (format "Detached finished [%s]" host))
-              ('failure (format "Detached failed [%s]" host))
-              ('unknown (format "Detached finished [%s]" host)))
-     :body (detached--session-command session)
+              ('success (format "Dtache finished [%s]" host))
+              ('failure (format "Dtache failed [%s]" host))
+              ('unknown (format "Dtache finished [%s]" host)))
+     :body (dtache--session-command session)
      :urgency (pcase status
                 ('success 'normal)
                 ('failure 'critical)
                 ('unknown 'normal)))))
 
-(defun detached-view-dwim (session)
+(defun dtache-view-dwim (session)
   "View SESSION in a do what I mean fashion."
-  (let ((status (car (detached--session-status session))))
+  (let ((status (car (dtache--session-status session))))
     (cond ((eq 'success status)
-           (detached-view-session session))
+           (dtache-view-session session))
           ((eq 'failure status)
-           (detached-compile-session session))
+           (dtache-compile-session session))
           ((eq 'unknown status)
-           (detached-view-session session))
-          (t (message "Detached session is in an unexpected state.")))))
+           (dtache-view-session session))
+          (t (message "Dtache session is in an unexpected state.")))))
 
-(defun detached-get-sessions ()
+(defun dtache-get-sessions ()
   "Return validated sessions."
-  (detached--validate-unknown-sessions)
-  (detached--db-get-sessions))
+  (dtache--validate-unknown-sessions)
+  (dtache--db-get-sessions))
 
-(defun detached-shell-command-attach-session (session)
+(defun dtache-shell-command-attach-session (session)
   "Attach to SESSION with `async-shell-command'."
-  (let* ((detached--current-session session)
-         (detached-session-mode 'attach)
+  (let* ((dtache--current-session session)
+         (dtache-session-mode 'attach)
          (inhibit-message t))
-    (if (not (detached--session-attachable session))
-        (detached-tail-session session)
+    (if (not (dtache--session-attachable session))
+        (dtache-tail-session session)
       (cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
-                 (buffer (get-buffer-create detached--shell-command-buffer))
-                 (default-directory (detached--session-working-directory 
session))
-                 (dtach-command (detached-dtach-command session t)))
+                 (buffer (get-buffer-create dtache--shell-command-buffer))
+                 (default-directory (dtache--session-working-directory 
session))
+                 (dtach-command (dtache-dtach-command session t)))
         (when (get-buffer-process buffer)
           (setq buffer (generate-new-buffer (buffer-name buffer))))
         (funcall #'async-shell-command dtach-command buffer)
-        (with-current-buffer buffer (setq detached--buffer-session 
detached--current-session))))))
+        (with-current-buffer buffer (setq dtache--buffer-session 
dtache--current-session))))))
 
 ;;;;; Other
 
-(cl-defgeneric detached-dtach-command (entity &optional concat)
+(cl-defgeneric dtache-dtach-command (entity &optional concat)
   "Return dtach command for ENTITY optionally CONCAT.")
 
-(cl-defgeneric detached-dtach-command ((command string) &optional concat)
+(cl-defgeneric dtache-dtach-command ((command string) &optional concat)
   "Return dtach command for COMMAND.
 
 Optionally CONCAT the command return command into a string."
-  (detached-dtach-command (detached-create-session command) concat))
+  (dtache-dtach-command (dtache-create-session command) concat))
 
-(cl-defgeneric detached-dtach-command ((session detached-session) &optional 
concat)
+(cl-defgeneric dtache-dtach-command ((session dtache-session) &optional concat)
   "Return dtach command for SESSION.
 
 Optionally CONCAT the command return command into a string."
-  (detached-connection-local-variables
-   (let* ((detached-session-mode (cond ((eq detached-session-mode 'attach) 
'attach)
-                                     ((not (detached--session-attachable 
session)) 'create)
-                                     (t detached-session-mode)))
-          (socket (detached--session-file session 'socket t))
-          (log (detached--session-file session 'log t))
-          (dtach-arg (detached--dtach-arg)))
-     (setq detached--buffer-session session)
-     (if (eq detached-session-mode 'attach)
+  (dtache-connection-local-variables
+   (let* ((dtache-session-mode (cond ((eq dtache-session-mode 'attach) 'attach)
+                                     ((not (dtache--session-attachable 
session)) 'create)
+                                     (t dtache-session-mode)))
+          (socket (dtache--session-file session 'socket t))
+          (log (dtache--session-file session 'log t))
+          (dtach-arg (dtache--dtach-arg)))
+     (setq dtache--buffer-session session)
+     (if (eq dtache-session-mode 'attach)
          (if concat
              (mapconcat #'identity
-                        `(,(when detached-show-output-on-attach
-                             (concat detached-show-output-command " " log ";"))
-                          ,detached-dtach-program
+                        `(,(when dtache-show-output-on-attach
+                             (concat dtache-show-output-command " " log ";"))
+                          ,dtache-dtach-program
                           ,dtach-arg
                           ,socket
                           "-r none")
                         " ")
            (append
-            (when detached-show-output-on-attach
-              `(,detached-show-output-command  ,(concat log ";")))
-            `(,detached-dtach-program ,dtach-arg ,socket "-r" "none")))
+            (when dtache-show-output-on-attach
+              `(,dtache-show-output-command  ,(concat log ";")))
+            `(,dtache-dtach-program ,dtach-arg ,socket "-r" "none")))
        (if concat
            (mapconcat #'identity
-                      `(,detached-dtach-program
+                      `(,dtache-dtach-program
                         ,dtach-arg
                         ,socket "-z"
-                        ,detached-shell-program "-c"
-                        ,(shell-quote-argument (detached--detached-command 
session)))
+                        ,dtache-shell-program "-c"
+                        ,(shell-quote-argument (dtache--dtache-command 
session)))
                       " ")
-         `(,detached-dtach-program
+         `(,dtache-dtach-program
            ,dtach-arg ,socket "-z"
-                      ,detached-shell-program "-c"
-                      ,(detached--detached-command session)))))))
+                      ,dtache-shell-program "-c"
+                      ,(dtache--dtache-command session)))))))
 
-(defun detached-attachable-command-p (command)
+(defun dtache-attachable-command-p (command)
   "Return t if COMMAND is attachable."
-  (if (thread-last detached-nonattachable-commands
+  (if (thread-last dtache-nonattachable-commands
                    (seq-filter (lambda (regexp)
                                  (string-match-p regexp command)))
                    (length)
@@ -865,52 +865,52 @@ Optionally CONCAT the command return command into a 
string."
       t
     nil))
 
-(defun detached-metadata ()
+(defun dtache-metadata ()
   "Return a property list with metadata."
   (let ((metadata '()))
-    (seq-doseq (annotator detached-metadata-annotators-alist)
+    (seq-doseq (annotator dtache-metadata-annotators-alist)
       (push `(,(car annotator) . ,(funcall (cdr annotator))) metadata))
     metadata))
 
-(defun detached-completing-read (sessions)
+(defun dtache-completing-read (sessions)
   "Select a session from SESSIONS through `completing-read'."
-  (let* ((candidates (detached-session-candidates sessions))
+  (let* ((candidates (dtache-session-candidates sessions))
          (metadata `(metadata
-                     (category . detached)
+                     (category . dtache)
                      (cycle-sort-function . identity)
                      (display-sort-function . identity)
-                     (annotation-function . detached-session-annotation)
+                     (annotation-function . dtache-session-annotation)
                      (affixation-function .
                                           ,(lambda (cands)
                                              (seq-map (lambda (s)
-                                                        `(,s nil 
,(detached-session-annotation s)))
+                                                        `(,s nil 
,(dtache-session-annotation s)))
                                                       cands)))))
          (collection (lambda (string predicate action)
                        (if (eq action 'metadata)
                            metadata
                          (complete-with-action action candidates string 
predicate))))
          (cand (completing-read "Select session: " collection nil t)))
-    (detached--decode-session cand)))
+    (dtache--decode-session cand)))
 
-(defun detached-command-str (session max-length)
+(defun dtache-command-str (session max-length)
   "Return SESSION's command as a string restrict it to MAX-LENGTH."
-  (let ((command (detached--session-command session)))
+  (let ((command (dtache--session-command session)))
     (if (<= (length command) max-length)
         (truncate-string-to-width
          command
          max-length
          0 ?\s)
-      (concat (substring (detached--session-command session) 0 (- max-length 
3)) "..."))))
+      (concat (substring (dtache--session-command session) 0 (- max-length 3)) 
"..."))))
 
 ;;;; Support functions
 
 ;;;;; Session
 
-(defun detached--session-pid (session)
+(defun dtache--session-pid (session)
   "Return SESSION's pid."
   (let* ((socket
           (expand-file-name
-           (concat (symbol-name (detached--session-id session)) ".socket")
+           (concat (symbol-name (dtache--session-id session)) ".socket")
            (or
             (file-remote-p default-directory 'localname)
             default-directory))))
@@ -921,42 +921,42 @@ Optionally CONCAT the command return command into a 
string."
         (buffer-string))
       "\n" t))))
 
-(defun detached--determine-session-state (session)
+(defun dtache--determine-session-state (session)
   "Return t if SESSION is active."
   (if (file-exists-p
-       (detached--session-file session 'socket))
+       (dtache--session-file session 'socket))
       'active
     'inactive))
 
-(defun detached--state-transition-p (session)
+(defun dtache--state-transition-p (session)
   "Return t if SESSION has transitioned from active to inactive."
   (and
-   (eq 'active (detached--session-state session))
-   (eq 'inactive (detached--determine-session-state session))))
+   (eq 'active (dtache--session-state session))
+   (eq 'inactive (dtache--determine-session-state session))))
 
-(defun detached--session-missing-p (session)
+(defun dtache--session-missing-p (session)
   "Return t if SESSION is missing."
   (not
    (file-exists-p
-    (detached--session-file session 'log))))
+    (dtache--session-file session 'log))))
 
-(defun detached--session-header (session)
+(defun dtache--session-header (session)
   "Return header for SESSION."
   (mapconcat
    #'identity
-   `(,(format "Command: %s" (detached--session-command session))
-     ,(format "Working directory: %s" (detached--working-dir-str session))
-     ,(format "Host: %s" (car (detached--session-host session)))
-     ,(format "Id: %s" (symbol-name (detached--session-id session)))
-     ,(format "Status: %s" (car (detached--session-status session)))
-     ,(format "Exit-code: %s" (cdr (detached--session-status session)))
-     ,(format "Metadata: %s" (detached--metadata-str session))
-     ,(format "Created at: %s" (detached--creation-str session))
-     ,(format "Duration: %s\n" (detached--duration-str session))
+   `(,(format "Command: %s" (dtache--session-command session))
+     ,(format "Working directory: %s" (dtache--working-dir-str session))
+     ,(format "Host: %s" (car (dtache--session-host session)))
+     ,(format "Id: %s" (symbol-name (dtache--session-id session)))
+     ,(format "Status: %s" (car (dtache--session-status session)))
+     ,(format "Exit-code: %s" (cdr (dtache--session-status session)))
+     ,(format "Metadata: %s" (dtache--metadata-str session))
+     ,(format "Created at: %s" (dtache--creation-str session))
+     ,(format "Duration: %s\n" (dtache--duration-str session))
      "")
    "\n"))
 
-(defun detached--session-deduplicate (sessions)
+(defun dtache--session-deduplicate (sessions)
   "Make car of SESSIONS unique by adding an identifier to it."
   (let* ((ht (make-hash-table :test #'equal :size (length sessions)))
          (occurences
@@ -972,74 +972,74 @@ Optionally CONCAT the command return command into a 
string."
       (if-let (count (gethash (car session) ht))
           (setcar session (format "%s%s" (car session)
                                   (truncate-string-to-width
-                                   (propertize (format " (%s)" (puthash (car 
session) (1+ count) ht)) 'face 'detached-identifier-face)
+                                   (propertize (format " (%s)" (puthash (car 
session) (1+ count) ht)) 'face 'dtache-identifier-face)
                                    identifier-width 0 ?\s)))
         (puthash (car session) 0 ht)
         (setcar session (format "%s%s" (car session) (make-string 
identifier-width ?\s)))))
     (seq-reverse reverse-sessions)))
 
-(defun detached--decode-session (item)
+(defun dtache--decode-session (item)
   "Return the session assicated with ITEM."
-  (cdr (assoc item detached--session-candidates)))
+  (cdr (assoc item dtache--session-candidates)))
 
-(defun detached--validate-unknown-sessions ()
-  "Validate `detached' sessions with state unknown."
-  (thread-last (detached--db-get-sessions)
-               (seq-filter (lambda (it) (eq 'unknown (detached--session-state 
it))))
+(defun dtache--validate-unknown-sessions ()
+  "Validate `dtache' sessions with state unknown."
+  (thread-last (dtache--db-get-sessions)
+               (seq-filter (lambda (it) (eq 'unknown (dtache--session-state 
it))))
                (seq-do (lambda (it)
-                         (if (detached--session-missing-p it)
-                             (detached--db-remove-entry it)
-                           (setf (detached--session-state it) 'active)
-                           (detached--db-update-entry it))))))
+                         (if (dtache--session-missing-p it)
+                             (dtache--db-remove-entry it)
+                           (setf (dtache--session-state it) 'active)
+                           (dtache--db-update-entry it))))))
 
-(defun detached--session-file (session file &optional local)
+(defun dtache--session-file (session file &optional local)
   "Return the full path to SESSION's FILE.
 
 Optionally make the path LOCAL to host."
   (let* ((file-name
           (concat
            (symbol-name
-            (detached--session-id session))
+            (dtache--session-id session))
            (pcase file
              ('socket ".socket")
              ('log ".log"))))
-         (remote-local-path (file-remote-p (expand-file-name file-name 
(detached--session-directory session)) 'localname))
-         (full-path (expand-file-name file-name (detached--session-directory 
session))))
+         (remote-local-path (file-remote-p (expand-file-name file-name 
(dtache--session-directory session)) 'localname))
+         (full-path (expand-file-name file-name (dtache--session-directory 
session))))
     (if (and local remote-local-path)
         remote-local-path
       full-path)))
 
-(defun detached--cleanup-host-sessions (host)
+(defun dtache--cleanup-host-sessions (host)
   "Run cleanuup on HOST sessions."
   (let ((host-name (car host)))
-    (thread-last (detached--db-get-sessions)
-                 (seq-filter (lambda (it) (string= host-name (car 
(detached--session-host it)))))
-                 (seq-filter #'detached--session-missing-p)
-                 (seq-do #'detached--db-remove-entry))))
+    (thread-last (dtache--db-get-sessions)
+                 (seq-filter (lambda (it) (string= host-name (car 
(dtache--session-host it)))))
+                 (seq-filter #'dtache--session-missing-p)
+                 (seq-do #'dtache--db-remove-entry))))
 
-(defun detached--session-output (session)
+(defun dtache--session-output (session)
   "Return content of SESSION's output."
-  (let* ((filename (detached--session-file session 'log))
-         (detached-message (rx (regexp "\n?\nDetached session ") (or 
"finished" "exited"))))
+  (let* ((filename (dtache--session-file session 'log))
+         (dtache-message (rx (regexp "\n?\nDtache session ") (or "finished" 
"exited"))))
     (with-temp-buffer
       (insert-file-contents filename)
       (goto-char (point-min))
       (let ((beginning (point))
-            (end (if (search-forward-regexp detached-message nil t)
+            (end (if (search-forward-regexp dtache-message nil t)
                      (match-beginning 0)
                    (point-max))))
         (buffer-substring beginning end)))))
 
-(defun detached--create-session-directory ()
+(defun dtache--create-session-directory ()
   "Create session directory if it doesn't exist."
   (let ((directory
          (concat
           (file-remote-p default-directory)
-          detached-session-directory)))
+          dtache-session-directory)))
     (unless (file-exists-p directory)
       (make-directory directory t))))
 
-(defun detached--get-working-directory ()
+(defun dtache--get-working-directory ()
   "Return an abbreviated working directory path."
   (if-let (remote (file-remote-p default-directory))
       (replace-regexp-in-string  (expand-file-name remote)
@@ -1049,100 +1049,100 @@ Optionally make the path LOCAL to host."
 
 ;;;;; Database
 
-(defun detached--db-initialize ()
+(defun dtache--db-initialize ()
   "Return all sessions stored in database."
-  (let ((db (expand-file-name "detached.db" detached-db-directory)))
+  (let ((db (expand-file-name "dtache.db" dtache-db-directory)))
     (when (file-exists-p db)
       (with-temp-buffer
         (insert-file-contents db)
         (cl-assert (bobp))
-        (when (string= (detached--db-session-version) detached-session-version)
-          (setq detached--sessions
+        (when (string= (dtache--db-session-version) dtache-session-version)
+          (setq dtache--sessions
                 (read (current-buffer))))))))
 
-(defun detached--db-session-version ()
-  "Return `detached-session-version' from database."
+(defun dtache--db-session-version ()
+  "Return `dtache-session-version' from database."
   (let ((header (thing-at-point 'line))
-        (regexp (rx "Detached Session Version: " (group (one-or-more (or digit 
punct))))))
+        (regexp (rx "Dtache Session Version: " (group (one-or-more (or digit 
punct))))))
     (string-match regexp header)
     (match-string 1 header)))
 
-(defun detached--db-insert-entry (session)
-  "Insert SESSION into `detached--sessions' and update database."
-  (detached-initialize-sessions)
-  (push `(,(detached--session-id session) . ,session) detached--sessions)
-  (detached--db-update-sessions))
+(defun dtache--db-insert-entry (session)
+  "Insert SESSION into `dtache--sessions' and update database."
+  (dtache-initialize-sessions)
+  (push `(,(dtache--session-id session) . ,session) dtache--sessions)
+  (dtache--db-update-sessions))
 
-(defun detached--db-remove-entry (session)
-  "Remove SESSION from `detached--sessions', delete log and update database."
-  (detached-initialize-sessions)
-  (let ((log (detached--session-file session 'log)))
+(defun dtache--db-remove-entry (session)
+  "Remove SESSION from `dtache--sessions', delete log and update database."
+  (dtache-initialize-sessions)
+  (let ((log (dtache--session-file session 'log)))
     (when (file-exists-p log)
       (delete-file log)))
-  (setq detached--sessions
-        (assq-delete-all (detached--session-id session) detached--sessions))
-  (detached--db-update-sessions))
-
-(defun detached--db-update-entry (session &optional update)
-  "Update SESSION in `detached--sessions' optionally UPDATE database."
-  (detached-initialize-sessions)
-  (setf (alist-get (detached--session-id session) detached--sessions) session)
+  (setq dtache--sessions
+        (assq-delete-all (dtache--session-id session) dtache--sessions))
+  (dtache--db-update-sessions))
+
+(defun dtache--db-update-entry (session &optional update)
+  "Update SESSION in `dtache--sessions' optionally UPDATE database."
+  (dtache-initialize-sessions)
+  (setf (alist-get (dtache--session-id session) dtache--sessions) session)
   (when update
-    (detached--db-update-sessions)))
+    (dtache--db-update-sessions)))
 
-(defun detached--db-get-session (id)
+(defun dtache--db-get-session (id)
   "Return session with ID."
-  (detached-initialize-sessions)
-  (alist-get id detached--sessions))
+  (dtache-initialize-sessions)
+  (alist-get id dtache--sessions))
 
-(defun detached--db-get-sessions ()
+(defun dtache--db-get-sessions ()
   "Return all sessions stored in the database."
-  (detached-initialize-sessions)
-  (seq-map #'cdr detached--sessions))
+  (dtache-initialize-sessions)
+  (seq-map #'cdr dtache--sessions))
 
-(defun detached--db-update-sessions ()
-  "Write `detached--sessions' to database."
-  (detached-initialize-sessions)
-  (let ((db (expand-file-name "detached.db" detached-db-directory)))
+(defun dtache--db-update-sessions ()
+  "Write `dtache--sessions' to database."
+  (dtache-initialize-sessions)
+  (let ((db (expand-file-name "dtache.db" dtache-db-directory)))
     (with-temp-file db
-      (insert (format ";; Detached Session Version: %s\n\n" 
detached-session-version))
-      (prin1 detached--sessions (current-buffer)))))
+      (insert (format ";; Dtache Session Version: %s\n\n" 
dtache-session-version))
+      (prin1 dtache--sessions (current-buffer)))))
 
 ;;;;; Other
 
-(defun detached--dtach-arg ()
-  "Return dtach argument based on `detached-session-mode'."
-  (pcase detached-session-mode
+(defun dtache--dtach-arg ()
+  "Return dtach argument based on `dtache-session-mode'."
+  (pcase dtache-session-mode
     ('create "-n")
     ('create-and-attach "-c")
     ('attach "-a")
-    (_ (error "`detached-session-mode' has an unknown value"))))
+    (_ (error "`dtache-session-mode' has an unknown value"))))
 
-(defun detached--session-state-transition-update (session)
+(defun dtache--session-state-transition-update (session)
   "Update SESSION due to state transition."
   ;; Update session
   (let ((session-size (file-attribute-size
                        (file-attributes
-                        (detached--session-file session 'log))))
-        (session-time (detached--update-session-time session) )
-        (status-fun (or (plist-get (detached--session-action session) :status)
-                        #'detached-session-exit-code-status)))
-    (setf (detached--session-size session) session-size)
-    (setf (detached--session-time session) session-time)
-    (setf (detached--session-state session) 'inactive)
-    (setf (detached--session-status session) (funcall status-fun session)))
+                        (dtache--session-file session 'log))))
+        (session-time (dtache--update-session-time session) )
+        (status-fun (or (plist-get (dtache--session-action session) :status)
+                        #'dtache-session-exit-code-status)))
+    (setf (dtache--session-size session) session-size)
+    (setf (dtache--session-time session) session-time)
+    (setf (dtache--session-state session) 'inactive)
+    (setf (dtache--session-status session) (funcall status-fun session)))
 
   ;; Send notification
-  (funcall detached-notification-function session)
+  (funcall dtache-notification-function session)
 
   ;; Update session in database
-  (detached--db-update-entry session t)
+  (dtache--db-update-entry session t)
 
   ;; Execute callback
-  (when-let ((callback (plist-get (detached--session-action session) 
:callback)))
+  (when-let ((callback (plist-get (dtache--session-action session) :callback)))
     (funcall callback session)))
 
-(defun detached--kill-processes (pid)
+(defun dtache--kill-processes (pid)
   "Kill PID and all of its children."
   (let ((child-processes
          (split-string
@@ -1150,96 +1150,96 @@ Optionally make the path LOCAL to host."
             (apply #'process-file `("pgrep" nil t nil "-P" ,pid))
             (buffer-string))
           "\n" t)))
-    (seq-do (lambda (pid) (detached--kill-processes pid)) child-processes)
+    (seq-do (lambda (pid) (dtache--kill-processes pid)) child-processes)
     (apply #'process-file `("kill" nil nil nil ,pid))))
 
-(defun detached--detached-command (session)
-  "Return the detached command for SESSION.
+(defun dtache--dtache-command (session)
+  "Return the dtache command for SESSION.
 
 If SESSION is nonattachable fallback to a command that doesn't rely on tee."
-  (let* ((log (detached--session-file session 'log t))
-         (begin-shell-group (if (string= "fish" (file-name-nondirectory 
detached-shell-program))
+  (let* ((log (dtache--session-file session 'log t))
+         (begin-shell-group (if (string= "fish" (file-name-nondirectory 
dtache-shell-program))
                                 "begin;"
                               "{"))
-         (end-shell-group (if (or (string= "fish" (file-name-nondirectory 
detached-shell-program)))
+         (end-shell-group (if (or (string= "fish" (file-name-nondirectory 
dtache-shell-program)))
                               "end"
                             "}"))
          (redirect
-          (if (detached--session-attachable session)
+          (if (dtache--session-attachable session)
               (format "2>&1 | tee %s" log)
             (format "&> %s" log)))
-         (env (if detached-env detached-env (format "%s -c" 
detached-shell-program)))
+         (env (if dtache-env dtache-env (format "%s -c" dtache-shell-program)))
          (command
-          (if detached-env
-              (concat (format "%s " (detached--session-env-mode session))
-                      (shell-quote-argument (detached--session-command 
session)))
-            (shell-quote-argument (detached--session-command session)))))
+          (if dtache-env
+              (concat (format "%s " (dtache--session-env-mode session))
+                      (shell-quote-argument (dtache--session-command session)))
+            (shell-quote-argument (dtache--session-command session)))))
     (format "%s %s %s; %s %s" begin-shell-group env command end-shell-group 
redirect)))
 
-(defun detached--env-mode (command)
-  "Return mode to run in `detached-env' based on COMMAND."
+(defun dtache--env-mode (command)
+  "Return mode to run in `dtache-env' based on COMMAND."
   (if (seq-find (lambda (regexp)
                   (string-match-p regexp command))
-                detached-env-plain-text-commands)
+                dtache-env-plain-text-commands)
       'plain-text
     'terminal-data))
 
-(defun detached--host ()
+(defun dtache--host ()
   "Return a cons with (host . type)."
   (let ((remote (file-remote-p default-directory)))
     `(,(if remote (file-remote-p default-directory 'host) (system-name)) . 
,(if remote 'remote 'local))))
 
-(defun detached--ansi-color-tail ()
+(defun dtache--ansi-color-tail ()
   "Apply `ansi-color' on tail output."
   (let ((inhibit-read-only t))
     (ansi-color-apply-on-region auto-revert-tail-pos (point-max))))
 
-(defun detached--update-session-time (session &optional approximate)
+(defun dtache--update-session-time (session &optional approximate)
   "Update SESSION's time property.
 
 If APPROXIMATE, use latest modification time of SESSION's
 log to deduce the end time."
-  (let* ((start-time (plist-get (detached--session-time session) :start))
+  (let* ((start-time (plist-get (dtache--session-time session) :start))
          (end-time))
     (if approximate
         (setq end-time
               (time-to-seconds
                (file-attribute-modification-time
                 (file-attributes
-                 (detached--session-file session 'log)))))
+                 (dtache--session-file session 'log)))))
       (setq end-time (time-to-seconds)))
     `(:start ,start-time :end ,end-time :duration ,(- end-time start-time))))
 
-(defun detached--create-id (command)
+(defun dtache--create-id (command)
   "Return a hash identifier for COMMAND."
   (let ((current-time (current-time-string)))
     (secure-hash 'md5 (concat command current-time))))
 
-(defun detached--detached-env-message-filter (str)
-  "Remove `detached-env' message in STR."
-  (replace-regexp-in-string "\n?Detached session.*\n?" "" str))
+(defun dtache--dtache-env-message-filter (str)
+  "Remove `dtache-env' message in STR."
+  (replace-regexp-in-string "\n?Dtache session.*\n?" "" str))
 
-(defun detached--dtach-eof-message-filter (str)
-  "Remove `detached--dtach-eof-message' in STR."
-  (replace-regexp-in-string (format "\n?%s\^M\n" detached--dtach-eof-message) 
"" str))
+(defun dtache--dtach-eof-message-filter (str)
+  "Remove `dtache--dtach-eof-message' in STR."
+  (replace-regexp-in-string (format "\n?%s\^M\n" dtache--dtach-eof-message) "" 
str))
 
-(defun detached--dtach-detached-message-filter (str)
-  "Remove `detached--dtach-detached-message' in STR."
-  (replace-regexp-in-string (format "\n?%s\n" 
detached--dtach-detached-message) "" str))
+(defun dtache--dtach-dtache-message-filter (str)
+  "Remove `dtache--dtach-dtache-message' in STR."
+  (replace-regexp-in-string (format "\n?%s\n" dtache--dtach-dtache-message) "" 
str))
 
-(defun detached--watch-session-directory (session-directory)
+(defun dtache--watch-session-directory (session-directory)
   "Watch for events in SESSION-DIRECTORY."
-  (unless (alist-get session-directory detached--watched-session-directories
+  (unless (alist-get session-directory dtache--watched-session-directories
                      nil nil #'string=)
     (push
      `(,session-directory . ,(file-notify-add-watch
                               session-directory
                               '(change)
-                              #'detached--session-directory-event))
-     detached--watched-session-directories)))
+                              #'dtache--session-directory-event))
+     dtache--watched-session-directories)))
 
-(defun detached--session-directory-event (event)
-  "Act on an EVENT in a directory in `detached--watched-session-directories'.
+(defun dtache--session-directory-event (event)
+  "Act on an EVENT in a directory in `dtache--watched-session-directories'.
 
 If event is caused by the deletion of a socket, locate the related
 session and trigger a state transition."
@@ -1247,41 +1247,41 @@ session and trigger a state transition."
     (when (and (eq action 'deleted)
                (string= "socket" (file-name-extension file)))
       (when-let* ((id (intern (file-name-base file)))
-                  (session (detached--db-get-session id))
-                  (session-directory (detached--session-directory session)))
+                  (session (dtache--db-get-session id))
+                  (session-directory (dtache--session-directory session)))
 
         ;; Update session
-        (detached--session-state-transition-update session)
+        (dtache--session-state-transition-update session)
 
-        ;; Remove session directory from `detached--watch-session-directory'
+        ;; Remove session directory from `dtache--watch-session-directory'
         ;; if there is no active session associated with the directory
         (unless
-            (thread-last (detached--db-get-sessions)
-                         (seq-filter (lambda (it) (eq 'active 
(detached--session-state it))))
-                         (seq-map #'detached--session-directory)
+            (thread-last (dtache--db-get-sessions)
+                         (seq-filter (lambda (it) (eq 'active 
(dtache--session-state it))))
+                         (seq-map #'dtache--session-directory)
                          (seq-uniq)
                          (seq-filter (lambda (it) (string= it 
session-directory))))
           (file-notify-rm-watch
-           (alist-get session-directory detached--watched-session-directories))
-          (setq detached--watched-session-directories
-                (assoc-delete-all session-directory 
detached--watched-session-directories)))))))
+           (alist-get session-directory dtache--watched-session-directories))
+          (setq dtache--watched-session-directories
+                (assoc-delete-all session-directory 
dtache--watched-session-directories)))))))
 
-(defun detached--db-directory-event (event)
-  "Act on EVENT in `detached-db-directory'.
+(defun dtache--db-directory-event (event)
+  "Act on EVENT in `dtache-db-directory'.
 
-If event is cased by an update to the `detached' database, re-initialize
-`detached--sessions'."
+If event is cased by an update to the `dtache' database, re-initialize
+`dtache--sessions'."
   (pcase-let* ((`(,_descriptor ,action ,file) event)
-               (database-updated  (and (string= "detached.db" file)
+               (database-updated  (and (string= "dtache.db" file)
                                        (eq 'attribute-changed action))))
     (when database-updated)
-    (detached--db-initialize)))
+    (dtache--db-initialize)))
 
-(defun detached--annotation-widths (sessions annotation-format)
+(defun dtache--annotation-widths (sessions annotation-format)
   "Return widths for ANNOTATION-FORMAT based on SESSIONS."
-  (seq-map (lambda (it) (detached--annotation-width sessions it)) 
annotation-format))
+  (seq-map (lambda (it) (dtache--annotation-width sessions it)) 
annotation-format))
 
-(defun detached--annotation-width (sessions annotation)
+(defun dtache--annotation-width (sessions annotation)
   "Determine width for ANNOTATION based on SESSIONS."
   (let ((annotation-fun (plist-get annotation ':function))
         (width (plist-get annotation ':width)))
@@ -1294,22 +1294,22 @@ If event is cased by an update to the `detached' 
database, re-initialize
 
 ;;;;; UI
 
-(defun detached--metadata-str (session)
+(defun dtache--metadata-str (session)
   "Return SESSION's metadata as a string."
   (string-join
-   (thread-last (detached--session-metadata session)
+   (thread-last (dtache--session-metadata session)
                 (seq-filter (lambda (it) (cdr it)))
                 (seq-map
                  (lambda (it)
                    (concat (symbol-name (car it)) ": " (cdr it)))))
    ""))
 
-(defun detached--duration-str (session)
+(defun dtache--duration-str (session)
   "Return SESSION's duration time."
-  (let* ((duration (if (eq 'active (detached--session-state session))
-                       (- (time-to-seconds) (plist-get (detached--session-time 
session) :start))
+  (let* ((duration (if (eq 'active (dtache--session-state session))
+                       (- (time-to-seconds) (plist-get (dtache--session-time 
session) :start))
                      (plist-get
-                      (detached--session-time session) :duration)))
+                      (dtache--session-time session) :duration)))
          (time (round duration))
          (hours (/ time 3600))
          (minutes (/ (mod time 3600) 60))
@@ -1318,92 +1318,92 @@ If event is cased by an update to the `detached' 
database, re-initialize
           ((> time 60) (format "%sm %ss" minutes seconds))
           (t (format "%ss" seconds)))))
 
-(defun detached--creation-str (session)
+(defun dtache--creation-str (session)
   "Return SESSION's creation time."
   (format-time-string
    "%b %d %H:%M"
    (plist-get
-    (detached--session-time session) :start)))
+    (dtache--session-time session) :start)))
 
-(defun detached--size-str (session)
+(defun dtache--size-str (session)
   "Return the size of SESSION's output."
-  (if (eq 'active (detached--session-state session))
+  (if (eq 'active (dtache--session-state session))
       ""
       (file-size-human-readable
-       (detached--session-size session))))
+       (dtache--session-size session))))
 
-(defun detached--status-str (session)
+(defun dtache--status-str (session)
   "Return string if SESSION has failed."
-  (pcase (car (detached--session-status session))
+  (pcase (car (dtache--session-status session))
     ('failure "!")
     ('success "")
     ('unknown "")))
 
-(defun detached--state-str (session)
+(defun dtache--state-str (session)
   "Return string based on SESSION state."
-  (if (eq 'active (detached--session-state session))
+  (if (eq 'active (dtache--session-state session))
       "*"
     ""))
 
-(defun detached--working-dir-str (session)
+(defun dtache--working-dir-str (session)
   "Return working directory of SESSION."
   (let ((working-directory
-         (detached--session-working-directory session)))
+         (dtache--session-working-directory session)))
     (if-let ((remote (file-remote-p working-directory)))
         (string-remove-prefix remote working-directory)
       working-directory)))
 
-(defun detached--host-str (session)
+(defun dtache--host-str (session)
   "Return host name of SESSION."
-  (car (detached--session-host session)))
+  (car (dtache--session-host session)))
 
 ;;;; Minor modes
 
-(defvar detached-shell-mode-map
+(defvar dtache-shell-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd detached-detach-key) #'detached-detach-session)
+    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
     map)
-  "Keymap for `detached-shell-mode'.")
+  "Keymap for `dtache-shell-mode'.")
 
 ;;;###autoload
-(define-minor-mode detached-shell-mode
-  "Integrate `detached' in `shell-mode'."
-  :lighter " detached-shell"
+(define-minor-mode dtache-shell-mode
+  "Integrate `dtache' in `shell-mode'."
+  :lighter " dtache-shell"
   :keymap (let ((map (make-sparse-keymap)))
             map)
-  (if detached-shell-mode
-      (dolist (filter detached-shell-mode-filter-functions)
+  (if dtache-shell-mode
+      (dolist (filter dtache-shell-mode-filter-functions)
         (add-hook 'comint-preoutput-filter-functions filter 0 t))
-     (dolist (filter detached-shell-mode-filter-functions)
+     (dolist (filter dtache-shell-mode-filter-functions)
         (remove-hook 'comint-preoutput-filter-functions filter t))))
 
 ;;;; Major modes
 
-(defvar detached-log-mode-map
+(defvar dtache-log-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd detached-detach-key) #'detached-detach-session)
+    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
     map)
-  "Keymap for `detached-log-mode'.")
+  "Keymap for `dtache-log-mode'.")
 
 ;;;###autoload
-(define-derived-mode detached-log-mode nil "Detached Log"
-  "Major mode for `detached' logs."
-  (when detached-filter-ansi-sequences
+(define-derived-mode dtache-log-mode nil "Dtache Log"
+  "Major mode for `dtache' logs."
+  (when dtache-filter-ansi-sequences
     (comint-carriage-motion (point-min) (point-max))
     (set-buffer-modified-p nil)
     (ansi-color-apply-on-region (point-min) (point-max)))
   (read-only-mode t))
 
-(defvar detached-tail-mode-map
+(defvar dtache-tail-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd detached-detach-key) #'detached-detach-session)
+    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
     map)
-  "Keymap for `detached-tail-mode'.")
+  "Keymap for `dtache-tail-mode'.")
 
 ;;;###autoload
-(define-derived-mode detached-tail-mode auto-revert-tail-mode "Detached Tail"
-  "Major mode to tail `detached' logs."
-  (setq-local auto-revert-interval detached-tail-interval)
+(define-derived-mode dtache-tail-mode auto-revert-tail-mode "Dtache Tail"
+  "Major mode to tail `dtache' logs."
+  (setq-local auto-revert-interval dtache-tail-interval)
   (setq-local tramp-verbose 1)
   (setq-local auto-revert-remote-files t)
   (defvar revert-buffer-preserve-modes)
@@ -1411,13 +1411,13 @@ If event is cased by an update to the `detached' 
database, re-initialize
   (auto-revert-set-timer)
   (setq-local auto-revert-verbose nil)
   (auto-revert-tail-mode)
-  (when detached-filter-ansi-sequences
+  (when dtache-filter-ansi-sequences
     (comint-carriage-motion (point-min) (point-max))
     (set-buffer-modified-p nil)
-    (add-hook 'after-revert-hook #'detached--ansi-color-tail nil t)
+    (add-hook 'after-revert-hook #'dtache--ansi-color-tail nil t)
     (ansi-color-apply-on-region (point-min) (point-max)))
   (read-only-mode t))
 
-(provide 'detached)
+(provide 'dtache)
 
-;;; detached.el ends here
+;;; dtache.el ends here
diff --git a/guix.scm b/guix.scm
index 30a1fb9459..b76838f33f 100644
--- a/guix.scm
+++ b/guix.scm
@@ -17,18 +17,18 @@
 (define %git-commit
   (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f2" 
OPEN_READ)))
 
-(define-public emacs-detached
+(define-public emacs-dtache
   (let ((branch "remote")
         (commit "220f93dfa710474b4f9c9db0349a6082374f80c0")
         (revision "0"))
     (package
-     (name "emacs-detached")
+     (name "emacs-dtache")
      (version (git-version "0.0" revision commit))
      (source
       (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://gitlab.com/niklaseklund/detached";)
+             (url "https://gitlab.com/niklaseklund/dtache";)
              (commit commit)))
        (sha256
         (base32
@@ -41,15 +41,15 @@
      (arguments
       `(#:tests? #t
         #:test-command '("ert-runner")))
-     (home-page "https://gitlab.com/niklaseklund/detached";)
+     (home-page "https://gitlab.com/niklaseklund/dtache";)
      (synopsis "Dtach Emacs")
-     (description "Detached allows a program to be seamlessly executed
+     (description "Dtache allows a program to be seamlessly executed
 in an environment that is isolated from Emacs.")
      (license license:gpl3+))))
 
 (package
-  (inherit emacs-detached)
-  (name "emacs-detached-git")
-  (version (git-version (package-version emacs-detached) "HEAD" %git-commit))
+  (inherit emacs-dtache)
+  (name "emacs-dtache-git")
+  (version (git-version (package-version emacs-dtache) "HEAD" %git-commit))
   (source (local-file %source-dir
                       #:recursive? #t)))
diff --git a/test/detached-test.el b/test/detached-test.el
index c177056a0a..ca11695d55 100644
--- a/test/detached-test.el
+++ b/test/detached-test.el
@@ -1,4 +1,4 @@
-;;; detached-test.el --- Tests for detached.el -*- lexical-binding: t; -*-
+;;; dtache-test.el --- Tests for dtache.el -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
@@ -17,286 +17,286 @@
 
 ;;; Commentary:
 
-;; Tests for `detached'.
+;; Tests for `dtache'.
 
 ;;; Code:
 
 ;;;; Requirements
 
 (require 'ert)
-(require 'detached)
+(require 'dtache)
 
 ;;;; Support
 
-(defmacro detached-test--with-temp-database (&rest body)
-  "Initialize a detached database and evaluate BODY."
-  `(let* ((temp-directory (make-temp-file "detached" t))
-          (detached-db-directory (expand-file-name "detached.db" 
temp-directory))
-          (detached-session-directory (expand-file-name "sessions" 
temp-directory))
-          (detached--sessions)
-          (detached--sessions-initialized)
-          (detached--remote-session-timer))
+(defmacro dtache-test--with-temp-database (&rest body)
+  "Initialize a dtache database and evaluate BODY."
+  `(let* ((temp-directory (make-temp-file "dtache" t))
+          (dtache-db-directory (expand-file-name "dtache.db" temp-directory))
+          (dtache-session-directory (expand-file-name "sessions" 
temp-directory))
+          (dtache--sessions)
+          (dtache--sessions-initialized)
+          (dtache--remote-session-timer))
      (unwind-protect
          (progn
-           (detached-initialize-sessions)
+           (dtache-initialize-sessions)
            ,@body)
        (delete-directory temp-directory t))))
 
-(cl-defun detached-test--create-session (&key command host)
+(cl-defun dtache-test--create-session (&key command host)
   "Create session with COMMAND running on HOST."
-  (cl-letf* (((symbol-function #'detached--host) (lambda () host))
-             ((symbol-function #'detached-metadata) (lambda () nil))
-             ((symbol-function #'detached--watch-session-directory) #'ignore)
-             (session (detached-create-session command)))
-    (detached-test--change-session-state session 'activate)
+  (cl-letf* (((symbol-function #'dtache--host) (lambda () host))
+             ((symbol-function #'dtache-metadata) (lambda () nil))
+             ((symbol-function #'dtache--watch-session-directory) #'ignore)
+             (session (dtache-create-session command)))
+    (dtache-test--change-session-state session 'activate)
     session))
 
-(defun detached-test--change-session-state (session state)
+(defun dtache-test--change-session-state (session state)
   "Set STATE of SESSION."
   (pcase state
     ('activate
      (dolist (type `(socket log))
-       (with-temp-file (detached--session-file session type))))
+       (with-temp-file (dtache--session-file session type))))
     ('deactivate
-     (delete-file (detached--session-file session 'socket)))
+     (delete-file (dtache--session-file session 'socket)))
     ('kill
-     (delete-file (detached--session-file session 'socket))
-     (delete-file (detached--session-file session 'log)))))
+     (delete-file (dtache--session-file session 'socket))
+     (delete-file (dtache--session-file session 'log)))))
 
 ;;;; Tests
 
-(ert-deftest detached-test-dtach-command ()
-  (detached-test--with-temp-database
-   (cl-letf* ((detached-dtach-program "dtach")
-              (detached-env "detached-env")
-              (detached-shell-program "bash")
-              (session (detached-create-session "ls -la"))
-              (detached-show-output-on-attach t)
-              (detached-show-output-command "/bin/cat")
-              ((symbol-function #'detached-create-session)
+(ert-deftest dtache-test-dtach-command ()
+  (dtache-test--with-temp-database
+   (cl-letf* ((dtache-dtach-program "dtach")
+              (dtache-env "dtache-env")
+              (dtache-shell-program "bash")
+              (session (dtache-create-session "ls -la"))
+              (dtache-show-output-on-attach t)
+              (dtache-show-output-command "/bin/cat")
+              ((symbol-function #'dtache-create-session)
                (lambda (_)
                  session)))
-     (let* ((detached-session-mode 'create-and-attach)
-            (expected `(,detached-dtach-program
-                        "-c" ,(detached--session-file session 'socket t)
-                        "-z" ,detached-shell-program
+     (let* ((dtache-session-mode 'create-and-attach)
+            (expected `(,dtache-dtach-program
+                        "-c" ,(dtache--session-file session 'socket t)
+                        "-z" ,dtache-shell-program
                         "-c"
-                        ,(format "{ detached-env terminal-data ls\\ -la; } 
2>&1 | tee %s"
-                                 (detached--session-file session 'log t))))
+                        ,(format "{ dtache-env terminal-data ls\\ -la; } 2>&1 
| tee %s"
+                                 (dtache--session-file session 'log t))))
             (expected-concat (format "%s -c %s -z %s -c %s"
-                                     detached-dtach-program
-                                     (detached--session-file session 'socket t)
-                                     detached-shell-program
+                                     dtache-dtach-program
+                                     (dtache--session-file session 'socket t)
+                                     dtache-shell-program
                                      (shell-quote-argument
-                                      (format "{ detached-env terminal-data 
ls\\ -la; } 2>&1 | tee %s"
-                                              (detached--session-file session 
'log t))))))
-       (should (equal expected (detached-dtach-command session)))
-       (should (equal expected-concat (detached-dtach-command session t))))
-     (let* ((detached-session-mode 'attach)
-            (expected `(,detached-show-output-command
-                        ,(format "%s;" (detached--session-file session 'log t))
-                        ,detached-dtach-program "-a" ,(detached--session-file 
session 'socket t) "-r" "none"))
+                                      (format "{ dtache-env terminal-data ls\\ 
-la; } 2>&1 | tee %s"
+                                              (dtache--session-file session 
'log t))))))
+       (should (equal expected (dtache-dtach-command session)))
+       (should (equal expected-concat (dtache-dtach-command session t))))
+     (let* ((dtache-session-mode 'attach)
+            (expected `(,dtache-show-output-command
+                        ,(format "%s;" (dtache--session-file session 'log t))
+                        ,dtache-dtach-program "-a" ,(dtache--session-file 
session 'socket t) "-r" "none"))
             (expected-concat (format "%s %s; %s -a %s -r none"
-                                     detached-show-output-command
-                                     (detached--session-file session 'log t)
-                                     detached-dtach-program
-                                     (detached--session-file session 'socket 
t))))
-       (should (equal expected (detached-dtach-command session)))
-       (should (equal expected-concat (detached-dtach-command session t)))))))
-
-(ert-deftest detached-test-metadata ()
+                                     dtache-show-output-command
+                                     (dtache--session-file session 'log t)
+                                     dtache-dtach-program
+                                     (dtache--session-file session 'socket 
t))))
+       (should (equal expected (dtache-dtach-command session)))
+       (should (equal expected-concat (dtache-dtach-command session t)))))))
+
+(ert-deftest dtache-test-metadata ()
   ;; No annotators
-  (let ((detached-metadata-annotators-alist '()))
-    (should (not (detached-metadata))))
+  (let ((dtache-metadata-annotators-alist '()))
+    (should (not (dtache-metadata))))
 
   ;; Two annotators
-  (let ((detached-metadata-annotators-alist
+  (let ((dtache-metadata-annotators-alist
          '((git-branch . (lambda () "foo"))
            (username . (lambda () "bar"))))
         (expected '((username . "bar")
                     (git-branch . "foo"))))
-    (should (equal (detached-metadata) expected))))
+    (should (equal (dtache-metadata) expected))))
 
-(ert-deftest detached-test-session-file ()
+(ert-deftest dtache-test-session-file ()
   ;; Local files
   (cl-letf* (((symbol-function #'expand-file-name) (lambda (file directory) 
(concat directory file)))
              ((symbol-function #'file-remote-p) (lambda (_directory 
_localname) "/home/user/tmp"))
-             (session (detached--session-create :id 's12345 :directory 
"/home/user/tmp/")))
-    (should (string= "/home/user/tmp/s12345.log" (detached--session-file 
session 'log)))
-    (should (string= "/home/user/tmp/s12345.socket" (detached--session-file 
session 'socket))))
+             (session (dtache--session-create :id 's12345 :directory 
"/home/user/tmp/")))
+    (should (string= "/home/user/tmp/s12345.log" (dtache--session-file session 
'log)))
+    (should (string= "/home/user/tmp/s12345.socket" (dtache--session-file 
session 'socket))))
 
   ;; Remote files
   (cl-letf* (((symbol-function #'expand-file-name) (lambda (file directory) 
(concat directory file)))
              ((symbol-function #'file-remote-p) (lambda (_directory 
_localname) "/ssh:foo:/home/user/tmp/"))
-             (session (detached--session-create :id 's12345 :directory 
"/ssh:foo:/home/user/tmp/")))
-    (should (string= "/ssh:foo:/home/user/tmp/s12345.log" 
(detached--session-file session 'log)))
-    (should (string= "/ssh:foo:/home/user/tmp/s12345.socket" 
(detached--session-file session 'socket)))))
+             (session (dtache--session-create :id 's12345 :directory 
"/ssh:foo:/home/user/tmp/")))
+    (should (string= "/ssh:foo:/home/user/tmp/s12345.log" 
(dtache--session-file session 'log)))
+    (should (string= "/ssh:foo:/home/user/tmp/s12345.socket" 
(dtache--session-file session 'socket)))))
 
-(ert-deftest detached-test-host ()
+(ert-deftest dtache-test-host ()
   (cl-letf (((symbol-function #'system-name) (lambda () "localhost")))
-    (should (equal '("localhost" . local) (detached--host))))
+    (should (equal '("localhost" . local) (dtache--host))))
   (let ((default-directory "/ssh:remotehost:/home/user/git"))
-    (should (equal '("remotehost" . remote) (detached--host)))))
-
-(ert-deftest detached-test-session-active-p ()
-  (detached-test--with-temp-database
-   (let ((session (detached-test--create-session :command "foo" :host '("bar" 
. local))))
-     (should (eq 'active (detached--determine-session-state session)))
-     (detached-test--change-session-state session 'deactivate)
-     (should (eq 'inactive (detached--determine-session-state session))))))
-
-(ert-deftest detached-test-session-dead-p ()
-  (detached-test--with-temp-database
-   (let ((session (detached-test--create-session :command "foo" :host '("bar" 
. local))))
-     (should (not (detached--session-missing-p session)))
-     (detached-test--change-session-state session 'deactivate)
-     (should (not (detached--session-missing-p session)))
-     (detached-test--change-session-state session 'kill)
-     (should (detached--session-missing-p session)))))
-
-(ert-deftest detached-test-cleanup-host-sessions ()
-  (detached-test--with-temp-database
-   (cl-letf* ((session1 (detached-test--create-session :command "foo" :host 
'("remotehost" . remote)))
-              (session2 (detached-test--create-session :command "bar" :host 
'("localhost" . local)))
-              (session3 (detached-test--create-session :command "baz" :host 
'("localhost" . local)))
+    (should (equal '("remotehost" . remote) (dtache--host)))))
+
+(ert-deftest dtache-test-session-active-p ()
+  (dtache-test--with-temp-database
+   (let ((session (dtache-test--create-session :command "foo" :host '("bar" . 
local))))
+     (should (eq 'active (dtache--determine-session-state session)))
+     (dtache-test--change-session-state session 'deactivate)
+     (should (eq 'inactive (dtache--determine-session-state session))))))
+
+(ert-deftest dtache-test-session-dead-p ()
+  (dtache-test--with-temp-database
+   (let ((session (dtache-test--create-session :command "foo" :host '("bar" . 
local))))
+     (should (not (dtache--session-missing-p session)))
+     (dtache-test--change-session-state session 'deactivate)
+     (should (not (dtache--session-missing-p session)))
+     (dtache-test--change-session-state session 'kill)
+     (should (dtache--session-missing-p session)))))
+
+(ert-deftest dtache-test-cleanup-host-sessions ()
+  (dtache-test--with-temp-database
+   (cl-letf* ((session1 (dtache-test--create-session :command "foo" :host 
'("remotehost" . remote)))
+              (session2 (dtache-test--create-session :command "bar" :host 
'("localhost" . local)))
+              (session3 (dtache-test--create-session :command "baz" :host 
'("localhost" . local)))
               (host '("localhost" . local))
-              ((symbol-function #'detached--host) (lambda () host)))
+              ((symbol-function #'dtache--host) (lambda () host)))
      ;; One inactive, one missing, one active
-     (detached-test--change-session-state session1 'deactivate)
-     (detached-test--change-session-state session2 'kill)
-     (detached--cleanup-host-sessions host)
-     (detached--db-get-sessions)
+     (dtache-test--change-session-state session1 'deactivate)
+     (dtache-test--change-session-state session2 'kill)
+     (dtache--cleanup-host-sessions host)
+     (dtache--db-get-sessions)
      (should (seq-set-equal-p
-              (detached--db-get-sessions)
+              (dtache--db-get-sessions)
               `(,session1 ,session3))))))
 
-(ert-deftest detached-test-dtach-arg ()
-  (let ((detached-session-mode 'create))
-    (should (string= "-n" (detached--dtach-arg))))
-  (let ((detached-session-mode 'create-and-attach))
-    (should (string= "-c" (detached--dtach-arg))))
-  (let ((detached-session-mode 'attach))
-    (should (string= "-a" (detached--dtach-arg))))
-  (let ((detached-session-mode nil))
-    (should-error (detached--dtach-arg))))
+(ert-deftest dtache-test-dtach-arg ()
+  (let ((dtache-session-mode 'create))
+    (should (string= "-n" (dtache--dtach-arg))))
+  (let ((dtache-session-mode 'create-and-attach))
+    (should (string= "-c" (dtache--dtach-arg))))
+  (let ((dtache-session-mode 'attach))
+    (should (string= "-a" (dtache--dtach-arg))))
+  (let ((dtache-session-mode nil))
+    (should-error (dtache--dtach-arg))))
 
 ;;;;; Database
 
-(ert-deftest detached-test-db-insert-session ()
-  (detached-test--with-temp-database
-   (let* ((session (detached-test--create-session :command "foo" :host 
'("localhost" . local))))
-     (should (equal (detached--db-get-sessions) `(,session))))))
+(ert-deftest dtache-test-db-insert-session ()
+  (dtache-test--with-temp-database
+   (let* ((session (dtache-test--create-session :command "foo" :host 
'("localhost" . local))))
+     (should (equal (dtache--db-get-sessions) `(,session))))))
 
-(ert-deftest detached-test-db-remove-session ()
-  (detached-test--with-temp-database
+(ert-deftest dtache-test-db-remove-session ()
+  (dtache-test--with-temp-database
    (let* ((host '(:type local :name "host"))
-          (session1 (detached-test--create-session :command "foo" :host 
'("host" . local)))
-          (session2 (detached-test--create-session :command "bar" :host 
'("host" . local))))
-     (should (seq-set-equal-p `(,session1 ,session2) 
(detached--db-get-sessions)))
-     (detached--db-remove-entry session1)
-     (should (seq-set-equal-p `(,session2) (detached--db-get-sessions))))))
-
-(ert-deftest detached-test-db-update-session ()
-  (detached-test--with-temp-database
-   (let* ((session (detached-test--create-session :command "foo" :host 
'("host" . local)))
-          (id (detached--session-id session))
+          (session1 (dtache-test--create-session :command "foo" :host '("host" 
. local)))
+          (session2 (dtache-test--create-session :command "bar" :host '("host" 
. local))))
+     (should (seq-set-equal-p `(,session1 ,session2) 
(dtache--db-get-sessions)))
+     (dtache--db-remove-entry session1)
+     (should (seq-set-equal-p `(,session2) (dtache--db-get-sessions))))))
+
+(ert-deftest dtache-test-db-update-session ()
+  (dtache-test--with-temp-database
+   (let* ((session (dtache-test--create-session :command "foo" :host '("host" 
. local)))
+          (id (dtache--session-id session))
           (copy))
-     (setq copy (copy-detached-session session))
-     (setf (detached--session-state copy) nil)
-     (should (not (equal copy (detached--db-get-session id))))
-     (detached--db-update-entry copy t)
-     (should (equal copy (car (detached--db-get-sessions)))))))
-
-(ert-deftest detached-test-detached-command ()
-  (let ((attachable-session (detached--session-create :directory 
"/tmp/detached/"
+     (setq copy (copy-dtache-session session))
+     (setf (dtache--session-state copy) nil)
+     (should (not (equal copy (dtache--db-get-session id))))
+     (dtache--db-update-entry copy t)
+     (should (equal copy (car (dtache--db-get-sessions)))))))
+
+(ert-deftest dtache-test-dtache-command ()
+  (let ((attachable-session (dtache--session-create :directory "/tmp/dtache/"
                                                 :working-directory 
"/home/user/"
                                                 :command "ls -la"
                                                 :attachable t
                                                 :env-mode 'terminal-data
                                                 :id 'foo123))
-        (nonattachable-session (detached--session-create :directory 
"/tmp/detached/"
+        (nonattachable-session (dtache--session-create :directory 
"/tmp/dtache/"
                                                 :working-directory 
"/home/user/"
                                                 :command "ls -la"
                                                 :attachable nil
                                                 :env-mode 'plain-text
                                                 :id 'foo123)))
-    ;; With detached-env
-    (let ((detached-env "detached-env"))
-      (should (string= "{ detached-env terminal-data ls\\ -la; } 2>&1 | tee 
/tmp/detached/foo123.log"
-                       (detached--detached-command attachable-session)))
-      (should (string= "{ detached-env plain-text ls\\ -la; } &> 
/tmp/detached/foo123.log"
-                       (detached--detached-command nonattachable-session))))
-
-    ;; Without detached-env
-    (let ((detached-env nil)
-          (detached-shell-program "bash"))
-      (should (string= "{ bash -c ls\\ -la; } 2>&1 | tee 
/tmp/detached/foo123.log"
-                       (detached--detached-command attachable-session)))
-      (should (string= "{ bash -c ls\\ -la; } &> /tmp/detached/foo123.log"
-                       (detached--detached-command nonattachable-session))))))
-
-(ert-deftest detached-test-attachable-command-p ()
-  (let ((detached-nonattachable-commands '("ls")))
-    (should (detached-attachable-command-p "cd"))
-    (should (not (detached-attachable-command-p "ls -la")))))
+    ;; With dtache-env
+    (let ((dtache-env "dtache-env"))
+      (should (string= "{ dtache-env terminal-data ls\\ -la; } 2>&1 | tee 
/tmp/dtache/foo123.log"
+                       (dtache--dtache-command attachable-session)))
+      (should (string= "{ dtache-env plain-text ls\\ -la; } &> 
/tmp/dtache/foo123.log"
+                       (dtache--dtache-command nonattachable-session))))
+
+    ;; Without dtache-env
+    (let ((dtache-env nil)
+          (dtache-shell-program "bash"))
+      (should (string= "{ bash -c ls\\ -la; } 2>&1 | tee 
/tmp/dtache/foo123.log"
+                       (dtache--dtache-command attachable-session)))
+      (should (string= "{ bash -c ls\\ -la; } &> /tmp/dtache/foo123.log"
+                       (dtache--dtache-command nonattachable-session))))))
+
+(ert-deftest dtache-test-attachable-command-p ()
+  (let ((dtache-nonattachable-commands '("ls")))
+    (should (dtache-attachable-command-p "cd"))
+    (should (not (dtache-attachable-command-p "ls -la")))))
 
 ;;;;; String representations
 
-(ert-deftest detached-test-duration-str ()
-  (should (string= "1s" (detached--duration-str (detached--session-create 
:time '(:duration 1)))))
-  (should (string= "1m 1s" (detached--duration-str (detached--session-create 
:time '(:duration 61)))))
-  (should (string= "1h 1m 1s" (detached--duration-str 
(detached--session-create :time '(:duration 3661))))))
+(ert-deftest dtache-test-duration-str ()
+  (should (string= "1s" (dtache--duration-str (dtache--session-create :time 
'(:duration 1)))))
+  (should (string= "1m 1s" (dtache--duration-str (dtache--session-create :time 
'(:duration 61)))))
+  (should (string= "1h 1m 1s" (dtache--duration-str (dtache--session-create 
:time '(:duration 3661))))))
 
-(ert-deftest detached-test-creation-str ()
+(ert-deftest dtache-test-creation-str ()
   ;; Make sure to set the TIMEZONE before executing the test to avoid
   ;; differences between machines
   (cl-letf* (((getenv "TZ") "UTC0")
-             (session (detached--session-create :time `(:start 
1620463748.7636228))))
-    (should (string= "May 08 08:49" (detached--creation-str session)))))
+             (session (dtache--session-create :time `(:start 
1620463748.7636228))))
+    (should (string= "May 08 08:49" (dtache--creation-str session)))))
 
-(ert-deftest detached-test-size-str ()
-  (should (string= "100" (detached--size-str (detached--session-create :size 
100 :state 'inactive))))
-  (should (string= "1k" (detached--size-str (detached--session-create :size 
1024 :state 'inactive)))))
+(ert-deftest dtache-test-size-str ()
+  (should (string= "100" (dtache--size-str (dtache--session-create :size 100 
:state 'inactive))))
+  (should (string= "1k" (dtache--size-str (dtache--session-create :size 1024 
:state 'inactive)))))
 
-(ert-deftest detached-test-status-str ()
-  (should (string= "!" (detached--status-str (detached--session-create :status 
'(failure . 127)))))
-  (should (string= "" (detached--status-str (detached--session-create :status 
'(success . 0)))))
-  (should (string= "" (detached--status-str (detached--session-create :status 
'(unknown . 0))))))
+(ert-deftest dtache-test-status-str ()
+  (should (string= "!" (dtache--status-str (dtache--session-create :status 
'(failure . 127)))))
+  (should (string= "" (dtache--status-str (dtache--session-create :status 
'(success . 0)))))
+  (should (string= "" (dtache--status-str (dtache--session-create :status 
'(unknown . 0))))))
 
-(ert-deftest detached-test-state-str ()
-  (should (string= "*" (detached--state-str (detached--session-create :state 
'active))))
-  (should (string= "" (detached--state-str (detached--session-create :state 
'inactive)))))
+(ert-deftest dtache-test-state-str ()
+  (should (string= "*" (dtache--state-str (dtache--session-create :state 
'active))))
+  (should (string= "" (dtache--state-str (dtache--session-create :state 
'inactive)))))
 
-(ert-deftest detached-test-working-dir-str ()
+(ert-deftest dtache-test-working-dir-str ()
   (should
    (string= "/home/user/repo"
-            (detached--working-dir-str
-             (detached--session-create :working-directory 
"/ssh:remote:/home/user/repo"))))
+            (dtache--working-dir-str
+             (dtache--session-create :working-directory 
"/ssh:remote:/home/user/repo"))))
   (should
    (string= "~/repo"
-            (detached--working-dir-str
-             (detached--session-create :working-directory "~/repo")))))
+            (dtache--working-dir-str
+             (dtache--session-create :working-directory "~/repo")))))
 
 ;;;;; Output filters
 
-(ert-deftest detached-test-dtach-eof-message-filter ()
+(ert-deftest dtache-test-dtach-eof-message-filter ()
   (let ((str "
 [EOF - dtach terminating]
 user@machine "))
     (should (string= "
user@machine " (detached--dtach-eof-message-filter str)))))
 
-(ert-deftest detached-test-dtach-detached-message-filter ()
+(ert-deftest dtache-test-dtach-dtache-message-filter ()
   (let ((str "
 [detached]
 user@machine "))
     (should (string= "
user@machine " (detached--dtach-detached-message-filter str)))))
 
-(ert-deftest detached-test-detached-env-message-filter ()
-  (let ((str "output\n\nDetached session exited abnormally with code 127"))
-    (should (string= "output\n" (detached--detached-env-message-filter str))))
-  (let ((str "output\n\nDetached session finished"))
-    (should (string= "output\n" (detached--detached-env-message-filter str)))))
+(ert-deftest dtache-test-dtache-env-message-filter ()
+  (let ((str "output\n\nDtache session exited abnormally with code 127"))
+    (should (string= "output\n" (dtache--dtache-env-message-filter str))))
+  (let ((str "output\n\nDtache session finished"))
+    (should (string= "output\n" (dtache--dtache-env-message-filter str)))))
 
-(provide 'detached-test)
+(provide 'dtache-test)
 
-;;; detached-test.el ends here
+;;; dtache-test.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]