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

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

[elpa] externals/dtache 2d33efdd9d 02/16: Rename dtache -> detached


From: ELPA Syncer
Subject: [elpa] externals/dtache 2d33efdd9d 02/16: Rename dtache -> detached
Date: Fri, 20 May 2022 05:57:38 -0400 (EDT)

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

    Rename dtache -> detached
---
 .build.yml          |    2 +-
 CHANGELOG.org       |   50 +--
 LICENSE             |    4 +-
 dtache-compile.el   |  142 +++---
 dtache-consult.el   |  178 ++++----
 dtache-dired.el     |   18 +-
 dtache-env          |   20 +-
 dtache-eshell.el    |  110 ++---
 dtache-extra.el     |   34 +-
 dtache-init.el      |  158 +++----
 dtache-org.el       |   42 +-
 dtache-shell.el     |  108 ++---
 dtache-vterm.el     |   68 +--
 dtache.el           | 1242 +++++++++++++++++++++++++--------------------------
 guix.scm            |   16 +-
 test/dtache-test.el |  366 +++++++--------
 16 files changed, 1279 insertions(+), 1279 deletions(-)

diff --git a/.build.yml b/.build.yml
index e1064d970d..d894686d5f 100644
--- a/.build.yml
+++ b/.build.yml
@@ -3,7 +3,7 @@ packages:
 - emacs-ert-runner
 - dtach
 environment:
-  project: dtache
+  project: detached
 tasks:
 - guix: |
     cd $project
diff --git a/CHANGELOG.org b/CHANGELOG.org
index fe88e29a57..5c6c8b1527 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -1,53 +1,53 @@
-#+title: dtache.el - Changelog
+#+title: detached.el - Changelog
 #+author: Niklas Eklund
 #+language: en
 
 *   Development
-- 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.
+- Introduce =detached-init.el= and move integration of other packages there. 
The integration now becomes even simpler for users of =detached=.
+- Rewrite =detached= 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=.
 - Improvements to =dtache-env=. The package will now control which mode 
=dtache-env= should be run in. The mode is either =plain-text= or 
=terminal-data=. The latter is enabled by default and allows =dtache= to 
capture control sequences for e.g. colored output. This update will require 
users to update their =dtache-env= scripts.
 - Add integration with =dired= through =dired-do-shell-command=
-- Add option to show a session's output when attaching to a it. This feature 
is enabled with =dtache-show-output-on-attach=.
+- Add option to show a session's output when attaching to a it. This feature 
is enabled with =detached-show-output-on-attach=.
 
 * Version 0.6 (2022-05-01)
 
-- Eshell integration has been updated. The package now supports expansion of 
=eshell= aliases. However =dtache= will no longer run if commands are =elisp= 
functions.
-- Example configuration for =dtache= integration with =vterm= added.
-- The package now uses =ansi-color= to handle ANSI escape sequences. This 
feature is enabled by default but can be turned of if 
=dtache-filter-ansi-sequences= is set to nil.
+- Eshell integration has been updated. The package now supports expansion of 
=eshell= aliases. However =detached= will no longer run if commands are =elisp= 
functions.
+- Example configuration for =detached= integration with =vterm= added.
+- The package now uses =ansi-color= to handle ANSI escape sequences. This 
feature is enabled by default but can be turned of if 
=detached-filter-ansi-sequences= is set to nil.
 
 * Version 0.5 (2022-02-02)
 
-- Add support for =org= through the =dtache-org= extension. This makes it 
possible to use =dtache= with =org-babel= (shell) source code blocks.
-- Support for multiple Emacs sessions. When a =dtache= session is created, it 
will now become visible in all active Emacs sessions.
+- Add support for =org= through the =detached-org= extension. This makes it 
possible to use =detached= with =org-babel= (shell) source code blocks.
+- Support for multiple Emacs sessions. When a =detached= session is created, 
it will now become visible in all active Emacs sessions.
 
 * Version 0.4 (2022-01-22)
 
-- =dtache= takes care of setting up the keybindings for its users. The detach 
key can be customized through =dtache-detach-key=
-- =dtache= now has full on macOS. The previous issue of not being able to 
utilize =filenotify= has been resolved.
-- =dtache= now uses =notifications= library to issue notifications by default.
-- =dtache= now uses =filenotify= for notifications except on local macOS hosts.
+- =detached= takes care of setting up the keybindings for its users. The 
detach key can be customized through =detached-detach-key=
+- =detached= now has full on macOS. The previous issue of not being able to 
utilize =filenotify= has been resolved.
+- =detached= now uses =notifications= library to issue notifications by 
default.
+- =detached= now uses =filenotify= for notifications except on local macOS 
hosts.
 
 * Version 0.3 (2022-01-15)
 
-- =dtache= now uses =filenotify= for both local and remote sessions. If run on 
=macOS= timers are used both for local as well as remote sessions.
-- Add version for =dtache-session= objects. This makes dtache not break 
whenever non-backwards compatible changes are made to the dtache-session object.
-- The commands for launching sessions are now renamed to resemble the non 
dtache commands. The commands are =dtache-shell-command=, 
=dtache-shell-send-input=, =dtache-eshell-send-input=, =dtache-compile=.
-- Add action value to a session. This value is set to dtache-session-action 
which is a property list optionally specifying attach, view and run properties. 
These properties are then used in dwim commands to improve their functionality.
-- Add a generic detach command, =dtache-detach-session=. This command is 
supposed to be used to detach from sessions in all supported modes.
-- Add =dtache-compile.el=. This library provides commands =dtache-compile= and 
=dtache-compile-recompile= which are supposed to be used instead of 
=compile=/=recompile=.
-- Improve =dtache-shell-command=, the command is now very similar to 
=async-shell-command= and can be considered a replacement of the latter.
-- Add integration with the =consult= package through =dtache-consult.el=.
-- Add support for =eshell= through the =dtache-eshell= package.
+- =detached= now uses =filenotify= for both local and remote sessions. If run 
on =macOS= timers are used both for local as well as remote sessions.
+- Add version for =detached-session= objects. This makes detached not break 
whenever non-backwards compatible changes are made to the detached-session 
object.
+- The commands for launching sessions are now renamed to resemble the non 
detached commands. The commands are =detached-shell-command=, 
=detached-shell-send-input=, =detached-eshell-send-input=, =detached-compile=.
+- Add action value to a session. This value is set to detached-session-action 
which is a property list optionally specifying attach, view and run properties. 
These properties are then used in dwim commands to improve their functionality.
+- Add a generic detach command, =detached-detach-session=. This command is 
supposed to be used to detach from sessions in all supported modes.
+- Add =detached-compile.el=. This library provides commands =detached-compile= 
and =detached-compile-recompile= which are supposed to be used instead of 
=compile=/=recompile=.
+- Improve =detached-shell-command=, the command is now very similar to 
=async-shell-command= and can be considered a replacement of the latter.
+- Add integration with the =consult= package through =detached-consult.el=.
+- Add support for =eshell= through the =detached-eshell= package.
 - macOS (monitor) support is added to the package.
 
 * Version 0.2 (2021-12-23)
 
-- With the recent improvements to =dtache-open-session=, the package is ready 
to harmonize the user interface. This means deprecating =dtache-list-sessions=.
+- With the recent improvements to =detached-open-session=, the package is 
ready to harmonize the user interface. This means deprecating 
=detached-list-sessions=.
 - Remove external dependency to =embark=. The package now implements an action 
map that can be used with/without embark.
 - Remove external dependency to =marginalia=. The package now provides 
annotations for all users.
-- Fix error in =dtache-env= usage. The integration wasn't correct which 
resulted in =dtache= failing to execute some commands properly
-- Make =dtache-env= optional rather than required. =Dtache= should be fine 
without it, just that automatic status labeling will not be run
+- Fix error in =detached-env= usage. The integration wasn't correct which 
resulted in =detached= failing to execute some commands properly
+- Make =detached-env= optional rather than required. =Detached= should be fine 
without it, just that automatic status labeling will not be run
 
 * Version 0.1 (2021-12-15)
 
diff --git a/LICENSE b/LICENSE
index f22c5a432a..b52c500f8a 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.
 
-    dtache
+    detached
     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:
 
-    dtache  Copyright (C) 2020-2022  Free Software Foundation, Inc.
+    detached  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/dtache-compile.el b/dtache-compile.el
index a1c7c64a5e..26a050340d 100644
--- a/dtache-compile.el
+++ b/dtache-compile.el
@@ -1,4 +1,4 @@
-;;; dtache-compile.el --- Dtache integration for compile -*- lexical-binding: 
t -*-
+;;; detached-compile.el --- Detached integration for compile -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,32 +19,32 @@
 
 ;;; Commentary:
 
-;; This is a `dtache' extension which provides integration for `compile'.
+;; This is a `detached' extension which provides integration for `compile'.
 
 ;;; Code:
 
 ;;;; Requirements
 
 (require 'compile)
-(require 'dtache)
+(require 'detached)
 
 (declare-function ansi-color-compilation-filter "ansi-color")
 
 ;;;; Variables
 
-(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
+(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
   :type 'plist)
 
 ;;;; Commands
 
 ;;;###autoload
-(defun dtache-compile (command &optional comint)
-  "Run COMMAND through `compile' but in a 'dtache' session.
+(defun detached-compile (command &optional comint)
+  "Run COMMAND through `compile' but in a 'detached' session.
 Optionally enable COMINT if prefix-argument is provided."
   (interactive
    (list
@@ -53,37 +53,37 @@ Optionally enable COMINT if prefix-argument is provided."
           (compilation-read-command command)
         command))
     (consp current-prefix-arg)))
-  (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))
+  (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))
     (compile command comint)))
 
 ;;;###autoload
-(defun dtache-compile-recompile (&optional edit-command)
-  "Re-compile by running `compile' but in a 'dtache' session.
+(defun detached-compile-recompile (&optional edit-command)
+  "Re-compile by running `compile' but in a 'detached' session.
 Optionally EDIT-COMMAND."
   (interactive "P")
-  (let* ((dtache-enabled t)
-         (dtache-session-action dtache-compile-session-action)
-         (dtache-session-origin 'compile)
-         (dtache-session-mode 'create-and-attach))
+  (let* ((detached-enabled t)
+         (detached-session-action detached-compile-session-action)
+         (detached-session-origin 'compile)
+         (detached-session-mode 'create-and-attach))
     (recompile edit-command)))
 
 ;;;;; Functions
 
 ;;;###autoload
-(defun dtache-compile-attach (session)
+(defun detached-compile-attach (session)
   "Attach to SESSION with `compile'."
-  (when (dtache-valid-session session)
-    (let* ((dtache-enabled t)
-           (dtache-session-mode 'attach)
-           (dtache--current-session session))
-      (compilation-start (dtache--session-command session))
-      (when dtache-show-output-on-attach
+  (when (detached-valid-session session)
+    (let* ((detached-enabled t)
+           (detached-session-mode 'attach)
+           (detached--current-session session))
+      (compilation-start (detached--session-command session))
+      (when detached-show-output-on-attach
         ;; HACK: When attaching to a detached process and
-        ;; `dtache-show-output-on-attach' is non-nil we need to switch
+        ;; `detached-show-output-on-attach' is non-nil we need to switch
         ;; to the compile buffer and go to the end. Otherwise it won't
         ;; properly update when new output is coming
         (other-window 1)
@@ -91,44 +91,44 @@ Optionally EDIT-COMMAND."
         (other-window 1)))))
 
 ;;;###autoload
-(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))))
+(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))))
 
 ;;;###autoload
-(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
+(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
       (add-hook 'compilation-filter-hook #'ansi-color-compilation-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)))
+    (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)))
 
 ;;;;; Support functions
 
-(defun dtache-compile--compilation-start (compilation-start &rest args)
-  "Optionally create a `dtache' session before running COMPILATION-START with 
ARGS."
-  (if dtache-enabled
+(defun detached-compile--compilation-start (compilation-start &rest args)
+  "Optionally create a `detached' session before running COMPILATION-START 
with ARGS."
+  (if detached-enabled
       (pcase-let ((`(,command ,mode ,_ ,highlight-regexp) args)
-                  (buffer-name "*dtache-compilation*"))
-        (if (and (not (eq dtache-session-mode 'attach))
-                 (not (dtache-attachable-command-p command)))
-            (dtache-start-session command t)
+                  (buffer-name "*detached-compilation*"))
+        (if (and (not (eq detached-session-mode 'attach))
+                 (not (detached-attachable-command-p command)))
+            (detached-start-session command t)
           (cl-letf* ((name-function (lambda (_) buffer-name))
-                     (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)
+                     (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)
                                        ,name-function
                                        ,highlight-regexp)))))
     (apply compilation-start args)))
 
-(defun dtache-compile--replace-modesetter ()
+(defun detached-compile--replace-modesetter ()
   "Replace the modsetter inserted by `compilation-start'."
   (save-excursion
     (let ((buffer-read-only nil)
@@ -136,42 +136,42 @@ Optionally EDIT-COMMAND."
       (goto-char (point-min))
       (when (re-search-forward regexp nil t)
         (kill-region (match-beginning 0) (match-end 0))
-        (insert (dtache--session-command dtache--current-session))))))
+        (insert (detached--session-command detached--current-session))))))
 
-(defun dtache-compile--compilation-dtache-filter ()
+(defun detached-compile--compilation-detached-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?Dtache session.*\n?" end t)
+      (when (re-search-forward "\n?Detached session.*\n?" end t)
         (delete-region (match-beginning 0) (match-end 0))))))
 
-(defun dtache-compile--compilation-eof-filter ()
+(defun detached-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" dtache--dtach-eof-message) 
end t)
+      (when (re-search-forward (format "\n?%s\n" detached--dtach-eof-message) 
end t)
         (delete-region (match-beginning 0) (match-end 0))))))
 
 ;;;;; Major modes
 
-(defvar dtache-compilation-mode-map
+(defvar detached-compilation-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
+    (define-key map (kbd detached-detach-key) #'detached-detach-session)
     map)
-  "Keymap for `dtache-compilation-mode'.")
+  "Keymap for `detached-compilation-mode'.")
 
 ;;;###autoload
-(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))
+(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))
 
-(advice-add #'compilation-start :around #'dtache-compile--compilation-start)
+(advice-add #'compilation-start :around #'detached-compile--compilation-start)
 
-(provide 'dtache-compile)
+(provide 'detached-compile)
 
-;;; dtache-compile.el ends here
+;;; detached-compile.el ends here
diff --git a/dtache-consult.el b/dtache-consult.el
index c3ff79318d..1e3860330a 100644
--- a/dtache-consult.el
+++ b/dtache-consult.el
@@ -1,4 +1,4 @@
-;;; dtache-consult.el --- Dtache interface using Consult multi sources -*- 
lexical-binding: t -*-
+;;; detached-consult.el --- Detached interface using Consult multi sources -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 
@@ -19,8 +19,8 @@
 
 ;;; Commentary:
 
-;; This package integrates `dtache' with `consult'[1].  The package
-;; provides a command `dtache-consult-session' which provides multiple session 
sources.
+;; This package integrates `detached' with `consult'[1].  The package
+;; provides a command `detached-consult-session' which provides multiple 
session sources.
 ;;
 ;; [1] https://github.com/minad/consult
 
@@ -28,37 +28,37 @@
 
 ;;;; Requirements
 
-(require 'dtache)
+(require 'detached)
 
 (declare-function consult--multi "consult")
 
 ;;;; Variables
 
-(defcustom dtache-consult-hidden-predicates nil
+(defcustom detached-consult-hidden-predicates nil
   "Predicates for sessions that should be hidden."
   :type '(repeat function)
-  :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'.
+  :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'.
 
 See `consult-multi' for a description of the source values."
   :type '(repeat symbol)
-  :group 'dtache)
+  :group 'detached)
 
-(defvar dtache-consult--source-session
-  `(:category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+(defvar detached-consult--source-session
+  `(:category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--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))))
-                         dtache-consult-hidden-predicates))
-                (dtache-session-candidates (dtache-get-sessions))))))
-  "All `dtache' sessions as a source for `consult'.")
+                         detached-consult-hidden-predicates))
+                (detached-session-candidates (detached-get-sessions))))))
+  "All `detached' sessions as a source for `consult'.")
 
-(defvar dtache-consult--source-hidden-session
+(defvar detached-consult--source-hidden-session
   `(:narrow (?\s . "Hidden")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--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))))
-                         dtache-consult-hidden-predicates))
-                (dtache-session-candidates (dtache-get-sessions))))))
-  "Active `dtache' sessions as a source for `consult'.")
+                         detached-consult-hidden-predicates))
+                (detached-session-candidates (detached-get-sessions))))))
+  "Active `detached' sessions as a source for `consult'.")
 
-(defvar dtache-consult--source-active-session
+(defvar detached-consult--source-active-session
   `(:narrow (?a . "Active")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--decode-session x)))
     :items
     ,(lambda ()
        (mapcar #'car
                (seq-filter
                 (lambda (x)
-                  (eq 'active (dtache--session-state (cdr x))))
-                (dtache-session-candidates (dtache-get-sessions))))))
-  "Active `dtache' sessions as a source for `consult'.")
+                  (eq 'active (detached--session-state (cdr x))))
+                (detached-session-candidates (detached-get-sessions))))))
+  "Active `detached' sessions as a source for `consult'.")
 
-(defvar dtache-consult--source-inactive-session
+(defvar detached-consult--source-inactive-session
   `(:narrow (?i . "Inactive")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--decode-session x)))
     :items
     ,(lambda ()
        (mapcar #'car
                (seq-filter
                 (lambda (x)
-                  (eq 'inactive (dtache--session-state (cdr x))))
-                (dtache-session-candidates (dtache-get-sessions))))))
-  "Inactive `dtache' sessions as a source for `consult'.")
+                  (eq 'inactive (detached--session-state (cdr x))))
+                (detached-session-candidates (detached-get-sessions))))))
+  "Inactive `detached' sessions as a source for `consult'.")
 
-(defvar dtache-consult--source-failure-session
+(defvar detached-consult--source-failure-session
   `(:narrow (?f . "Failure")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--decode-session x)))
     :items
     ,(lambda ()
        (mapcar #'car
                (seq-filter
                 (lambda (x)
-                  (eq 'failure (car (dtache--session-status (cdr x)))))
-                (dtache-session-candidates (dtache-get-sessions))))))
-  "Failed `dtache' sessions as a source for `consult'.")
+                  (eq 'failure (car (detached--session-status (cdr x)))))
+                (detached-session-candidates (detached-get-sessions))))))
+  "Failed `detached' sessions as a source for `consult'.")
 
-(defvar dtache-consult--source-success-session
+(defvar detached-consult--source-success-session
   `(:narrow (?s . "Success")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--decode-session x)))
     :items
     ,(lambda ()
        (mapcar #'car
                (seq-filter
                 (lambda (x)
-                  (eq 'success (car (dtache--session-status (cdr x)))))
-                (dtache-session-candidates (dtache-get-sessions))))))
-  "Successful `dtache' sessions as a source for `consult'.")
+                  (eq 'success (car (detached--session-status (cdr x)))))
+                (detached-session-candidates (detached-get-sessions))))))
+  "Successful `detached' sessions as a source for `consult'.")
 
-(defvar dtache-consult--source-local-session
+(defvar detached-consult--source-local-session
   `(:narrow (?l . "Local Host")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--decode-session x)))
     :items
     ,(lambda ()
        (mapcar #'car
                (seq-filter
                 (lambda (x)
-                  (eq 'local (cdr (dtache--session-host (cdr x)))))
-                (dtache-session-candidates (dtache-get-sessions)))))
-    "Local host `dtache' sessions as a source for `consult'."))
+                  (eq 'local (cdr (detached--session-host (cdr x)))))
+                (detached-session-candidates (detached-get-sessions)))))
+    "Local host `detached' sessions as a source for `consult'."))
 
-(defvar dtache-consult--source-remote-session
+(defvar detached-consult--source-remote-session
   `(:narrow (?r . "Remote Host")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--decode-session x)))
     :items
     ,(lambda ()
        (mapcar #'car
                (seq-filter
                 (lambda (x)
-                  (eq 'remote (cdr (dtache--session-host (cdr x)))))
-                (dtache-session-candidates (dtache-get-sessions))))))
-  "Remote host `dtache' sessions as a source for `consult'.")
+                  (eq 'remote (cdr (detached--session-host (cdr x)))))
+                (detached-session-candidates (detached-get-sessions))))))
+  "Remote host `detached' sessions as a source for `consult'.")
 
-(defvar dtache-consult--source-current-session
+(defvar detached-consult--source-current-session
   `(:narrow (?c . "Current Host")
     :hidden t
-    :category dtache
-    :annotate dtache-session-annotation
-    :action (lambda (x) (dtache-open-session (dtache--decode-session x)))
+    :category detached
+    :annotate detached-session-annotation
+    :action (lambda (x) (detached-open-session (detached--decode-session x)))
     :items
     ,(lambda ()
-       (let ((host-name (car (dtache--host))))
+       (let ((host-name (car (detached--host))))
          (mapcar #'car (seq-filter
                         (lambda (x)
-                          (string= (car (dtache--session-host (cdr x))) 
host-name))
-                        (dtache-session-candidates (dtache-get-sessions)))))))
-  "Current host `dtache' sessions as a source for `consult'.")
+                          (string= (car (detached--session-host (cdr x))) 
host-name))
+                        (detached-session-candidates 
(detached-get-sessions)))))))
+  "Current host `detached' sessions as a source for `consult'.")
 
 ;;;; Commands
 
 ;;;###autoload
-(defun dtache-consult-session ()
-  "Enhanced `dtache-open-session' command."
+(defun detached-consult-session ()
+  "Enhanced `detached-open-session' command."
   (interactive)
   (unless (require 'consult nil 'noerror)
-    (error "Install Consult to use dtache-consult"))
-  (consult--multi dtache-consult-sources
+    (error "Install Consult to use detached-consult"))
+  (consult--multi detached-consult-sources
                   :prompt "Select session: "
                   :require-match t
                   :sort nil))
 
-(provide 'dtache-consult)
+(provide 'detached-consult)
 
-;;; dtache-consult.el ends here
+;;; detached-consult.el ends here
diff --git a/dtache-dired.el b/dtache-dired.el
index 098692d918..673b1321d9 100644
--- a/dtache-dired.el
+++ b/dtache-dired.el
@@ -1,4 +1,4 @@
-;;; dtache-dired.el --- Dtache integration for dired -*- lexical-binding: t -*-
+;;; detached-dired.el --- Detached integration for dired -*- lexical-binding: 
t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,27 +19,27 @@
 
 ;;; Commentary:
 
-;; This package integrates `dtache' with `dired'.
+;; This package integrates `detached' with `dired'.
 
 ;;; Code:
 
 ;;;; Requirements
 
 (require 'dired)
-(require 'dtache)
+(require 'detached)
 
 ;;;; Functions
 
 ;;;###autoload
-(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)
+(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)
              ((symbol-function #'dired-run-shell-command)
               (lambda (command)
-                (dtache-start-session command)
+                (detached-start-session command)
                 nil)))
     (apply dired-do-shell-command args)))
 
-(provide 'dtache-dired)
+(provide 'detached-dired)
 
-;;; dtache-dired.el ends here
+;;; detached-dired.el ends here
diff --git a/dtache-env b/dtache-env
index 2427d3a342..0db3e69615 100755
--- a/dtache-env
+++ b/dtache-env
@@ -1,30 +1,30 @@
 #!/usr/bin/env bash
 
-# dtache-env is a script which purpose is to run a dtache command, and
+# detached-env is a script which purpose is to run a detached command, and
 # issue to stdout, based on the exit code.
 
 mode="$1"
 shift
-dtache_command="$*"
+detached_command="$*"
 
-# dtache-env features two different modes:
+# detached-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 dtache_command
+#    colored outputs from the detached_command
 
 if [ "$mode" = "plain-text" ]; then
-    if eval "$dtache_command"; then
-        echo -e "\nDtache session finished"
+    if eval "$detached_command"; then
+        echo -e "\nDetached session finished"
     else
-        echo -e "\nDtache session exited abnormally with code $?"
+        echo -e "\nDetached session exited abnormally with code $?"
     fi
 elif [ "$mode" = "terminal-data" ]; then
     TERM="eterm-color"
-    if eval script --quiet --flush --return --command "\"$dtache_command\"" 
/dev/null; then
-        echo -e "\nDtache session finished"
+    if eval script --quiet --flush --return --command "\"$detached_command\"" 
/dev/null; then
+        echo -e "\nDetached session finished"
     else
-        echo -e "\nDtache session exited abnormally with code $?"
+        echo -e "\nDetached session exited abnormally with code $?"
     fi
 fi
diff --git a/dtache-eshell.el b/dtache-eshell.el
index 7e7e493a94..fc8cdc1903 100644
--- a/dtache-eshell.el
+++ b/dtache-eshell.el
@@ -1,4 +1,4 @@
-;;; dtache-eshell.el --- Dtache integration for eshell -*- lexical-binding: t 
-*-
+;;; detached-eshell.el --- Detached integration for eshell -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2021-2022  Free Software Foundation, Inc.
 
@@ -19,13 +19,13 @@
 
 ;;; Commentary:
 
-;; This is a `dtache' extension which provides integration for `eshell'.
+;; This is a `detached' extension which provides integration for `eshell'.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'dtache)
+(require 'detached)
 (require 'eshell)
 (require 'esh-mode)
 (require 'esh-ext)
@@ -33,28 +33,28 @@
 
 ;;;; Variables
 
-(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
+(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
   :type 'plist)
 
 ;;;; Functions
 
-(defun dtache-eshell-select-session ()
+(defun detached-eshell-select-session ()
   "Return selected session."
-  (let* ((host-name (car (dtache--host)))
+  (let* ((host-name (car (detached--host)))
          (sessions
-          (thread-last (dtache-get-sessions)
+          (thread-last (detached-get-sessions)
                        (seq-filter (lambda (it)
-                                     (string= (car (dtache--session-host it)) 
host-name)))
-                       (seq-filter (lambda (it) (eq 'active 
(dtache--determine-session-state it)))))))
-    (dtache-completing-read sessions)))
+                                     (string= (car (detached--session-host 
it)) host-name)))
+                       (seq-filter (lambda (it) (eq 'active 
(detached--determine-session-state it)))))))
+    (detached-completing-read sessions)))
 
-(defun dtache-eshell-get-dtach-process ()
-  "Return `eshell' process if `dtache' is running."
+(defun detached-eshell-get-dtach-process ()
+  "Return `eshell' process if `detached' 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 dtache-eshell-send-input (&optional detach)
+(defun detached-eshell-send-input (&optional detach)
   "Create a session and attach to it.
 
 If prefix-argument directly DETACH from the session."
   (interactive "P")
-  (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)
+  (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)
     (call-interactively #'eshell-send-input)))
 
 ;;;###autoload
-(defun dtache-eshell-attach-session (session)
+(defun detached-eshell-attach-session (session)
   "Attach to SESSION."
   (interactive
-   (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)
+   (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)
                    (input
-                    (dtache-dtach-command session t))
+                    (detached-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 dtache--buffer-session session)
+          (setq detached--buffer-session session)
           (call-interactively #'eshell-send-input))
-      (dtache-open-session session))))
+      (detached-open-session session))))
 
 ;;;; Support functions
 
 ;;;###autoload
-(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)
+(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)
          (command (string-trim-right
                    (mapconcat #'identity
                               (flatten-list args)
                               " ")))
-         (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)
+         (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)
     (apply orig-fun `(,(seq-first command) ,(seq-rest command)))))
 
 ;;;; Minor mode
 
-(defvar dtache-eshell-mode-map
+(defvar detached-eshell-mode-map
   (let ((map (make-sparse-keymap)))
-    (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)
+    (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)
     map)
-  "Keymap for `dtache-eshell-mode'.")
+  "Keymap for `detached-eshell-mode'.")
 
 ;;;###autoload
-(define-minor-mode dtache-eshell-mode
-  "Integrate `dtache' in `eshell-mode'."
-  :lighter " dtache-eshell"
+(define-minor-mode detached-eshell-mode
+  "Integrate `detached' in `eshell-mode'."
+  :lighter " detached-eshell"
   :keymap (let ((map (make-sparse-keymap)))
             map)
   (make-local-variable 'eshell-preoutput-filter-functions)
-  (if dtache-eshell-mode
+  (if detached-eshell-mode
       (progn
-        (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)))
+        (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)))
 
-(provide 'dtache-eshell)
+(provide 'detached-eshell)
 
-;;; dtache-eshell.el ends here
+;;; detached-eshell.el ends here
diff --git a/dtache-extra.el b/dtache-extra.el
index 350f63ac0d..6b4d2079ef 100644
--- a/dtache-extra.el
+++ b/dtache-extra.el
@@ -1,4 +1,4 @@
-;;; dtache-extra.el --- Dtache integration for external packages -*- 
lexical-binding: t -*-
+;;; detached-extra.el --- Detached integration for external packages -*- 
lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,35 +19,35 @@
 
 ;;; Commentary:
 
-;; This package provides a collection of functionality to integrate `dtache' 
with external packages.
+;; This package provides a collection of functionality to integrate `detached' 
with external packages.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(declare-function dtache-compile "dtache")
-(declare-function dtache-start-session "dtache")
+(declare-function detached-compile "detached")
+(declare-function detached-start-session "detached")
 
-(defvar dtache-session-origin)
-(defvar dtache-local-session)
+(defvar detached-session-origin)
+(defvar detached-local-session)
 
 ;;;; Functions
 
 ;;;###autoload
-(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."
+(defun detached-extra-projectile-run-compilation (cmd &optional 
use-comint-mode)
+  "If CMD is a string execute it with `detached-compile', optionally 
USE-COMINT-MODE."
   (if (functionp cmd)
       (funcall cmd)
-    (let ((dtache-session-origin 'projectile))
-      (dtache-compile cmd use-comint-mode))))
+    (let ((detached-session-origin 'projectile))
+      (detached-compile cmd use-comint-mode))))
 
 ;;;###autoload
-(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)))
+(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)))
 
-(provide 'dtache-extra)
+(provide 'detached-extra)
 
-;;; dtache-extra.el ends here
+;;; detached-extra.el ends here
diff --git a/dtache-init.el b/dtache-init.el
index a303ef5696..e36d92907a 100644
--- a/dtache-init.el
+++ b/dtache-init.el
@@ -1,4 +1,4 @@
-;;; dtache-init.el --- Initialize dtache -*- lexical-binding: t -*-
+;;; detached-init.el --- Initialize detached -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,7 +19,7 @@
 
 ;;; Commentary:
 
-;; This is intended to aid users in configuring `dtache's integration with 
other packages.
+;; This is intended to aid users in configuring `detached's integration with 
other packages.
 
 ;;; Code:
 
@@ -27,28 +27,28 @@
 
 (require 'subr-x)
 
-(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 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 org-babel-sh-evaluate "ob-shell")
 (declare-function dired-rsync--do-run "dired-rsync")
@@ -61,108 +61,108 @@
 
 ;;;; Variables
 
-(defcustom dtache-init-block-list nil
+(defcustom detached-init-block-list nil
   "A list of blocked packages."
-  :group 'dtache
+  :group 'detached
   :type 'list)
 
-(defcustom dtache-init-allow-list
+(defcustom detached-init-allow-list
   '(compile dired dired-rsync embark eshell org projectile shell vterm)
   "A list of allowed packages."
-  :group 'dtache
+  :group 'detached
   :type 'list)
 
-(defvar dtache-action-map
+(defvar detached-action-map
   (let ((map (make-sparse-keymap)))
-    (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)
+    (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)
     map))
 
 ;;;; Support functions
 
-(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))
+(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))
   "Alist which contain names of packages and their initialization function.")
 
 ;;;; Functions
 
 ;;;###autoload
-(defun dtache-init ()
-  "Initialize `dtache' integration with all packages."
+(defun detached-init ()
+  "Initialize `detached' integration with all packages."
 
-  ;; Required for `dtache-shell-command' which is always provided
-  (add-hook 'shell-mode-hook #'dtache-shell-mode)
+  ;; Required for `detached-shell-command' which is always provided
+  (add-hook 'shell-mode-hook #'detached-shell-mode)
 
   (let ((init-functions
-         (thread-last dtache-init--package-integration
+         (thread-last detached-init--package-integration
                       (seq-filter (lambda (it)
-                                    (member (car it) dtache-init-allow-list)))
+                                    (member (car it) 
detached-init-allow-list)))
                       (seq-remove (lambda (it)
-                                    (member (car it) dtache-init-block-list)))
+                                    (member (car it) 
detached-init-block-list)))
                       (seq-map #'cdr))))
     (dolist (init-function init-functions)
             (funcall init-function))))
 
-(defun dtache-init-shell ()
+(defun detached-init-shell ()
   "Initialize integration with `shell'."
-  (advice-add #'shell :around #'dtache-shell-override-history)
-  (add-hook 'shell-mode-hook #'dtache-shell-save-history-on-kill))
+  (advice-add #'shell :around #'detached-shell-override-history)
+  (add-hook 'shell-mode-hook #'detached-shell-save-history-on-kill))
 
-(defun dtache-init-compile ()
+(defun detached-init-compile ()
   "Initialize integration with `compile'."
-  (add-hook 'compilation-start-hook #'dtache-compile-start)
-  (add-hook 'compilation-shell-minor-mode-hook #'dtache-shell-mode))
+  (add-hook 'compilation-start-hook #'detached-compile-start)
+  (add-hook 'compilation-shell-minor-mode-hook #'detached-shell-mode))
 
-(defun dtache-init-eshell ()
+(defun detached-init-eshell ()
   "Initialize integration with `eshell'."
-  (add-hook 'eshell-mode-hook #'dtache-eshell-mode))
+  (add-hook 'eshell-mode-hook #'detached-eshell-mode))
 
-(defun dtache-init-org ()
+(defun detached-init-org ()
   "Initialize integration with `org'."
-  (advice-add #'org-babel-sh-evaluate :around #'dtache-org-babel-sh))
+  (advice-add #'org-babel-sh-evaluate :around #'detached-org-babel-sh))
 
-(defun dtache-init-dired ()
+(defun detached-init-dired ()
   "Initialize integration with `dired'."
-  (advice-add 'dired-do-shell-command :around #'dtache-dired-do-shell-command))
+  (advice-add 'dired-do-shell-command :around 
#'detached-dired-do-shell-command))
 
-(defun dtache-init-dired-rsync ()
+(defun detached-init-dired-rsync ()
   "Initialize integration with `dired-rsync'."
   (when (functionp #'dired-rsync)
-    (advice-add #'dired-rsync--do-run :override #'dtache-extra-dired-rsync)))
+    (advice-add #'dired-rsync--do-run :override #'detached-extra-dired-rsync)))
 
-(defun dtache-init-projectile ()
+(defun detached-init-projectile ()
   "Initialize integration with `projectile'."
   (when (functionp #'projectile)
     (advice-add 'projectile-run-compilation
-                :override #'dtache-extra-projectile-run-compilation)))
+                :override #'detached-extra-projectile-run-compilation)))
 
-(defun dtache-init-vterm ()
+(defun detached-init-vterm ()
   "Initialize integration with `vterm'."
   (when (functionp #'vterm)
-    (add-hook 'vterm-mode-hook #'dtache-vterm-mode)))
+    (add-hook 'vterm-mode-hook #'detached-vterm-mode)))
 
-(defun dtache-init-embark ()
+(defun detached-init-embark ()
   "Initialize integration with `embark'."
   (with-eval-after-load 'embark
-    (defvar embark-dtache-map (make-composed-keymap dtache-action-map 
embark-general-map))
-    (add-to-list 'embark-keymap-alist '(dtache . embark-dtache-map))))
+    (defvar embark-detached-map (make-composed-keymap detached-action-map 
embark-general-map))
+    (add-to-list 'embark-keymap-alist '(detached . embark-detached-map))))
 
-(provide 'dtache-init)
+(provide 'detached-init)
 
-;;; dtache-init.el ends here
+;;; detached-init.el ends here
diff --git a/dtache-org.el b/dtache-org.el
index c42e38694c..77bd642122 100644
--- a/dtache-org.el
+++ b/dtache-org.el
@@ -1,4 +1,4 @@
-;;; dtache-org.el --- Dtache integration for org -*- lexical-binding: t -*-
+;;; detached-org.el --- Detached integration for org -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,52 +19,52 @@
 
 ;;; Commentary:
 
-;; This package integrates `dtache' with `org'.  In particular it
+;; This package integrates `detached' with `org'.  In particular it
 ;; integrates with `ob-shell' in order to detach babel src blocks.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'dtache)
+(require 'detached)
 (require 'ob-shell)
 
 ;;;; Variables
 
-(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
+(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
   :type 'plist)
 
 ;;;; Functions
 
 ;;;###autoload
-(defun dtache-org-babel-sh (org-babel-sh-evaluate-fun &rest args)
+(defun detached-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
-`dtache' command.  The functionality is enabled by setting a header
-property of :dtache t in the org babel src block."
+`detached' command.  The functionality is enabled by setting a header
+property of :detached t in the org babel src block."
   (pcase-let* ((`(,session ,full-body ,params ,stdin ,cmdline) args))
-    (if (alist-get :dtache params)
-        (cl-letf* ((dtache-session-origin 'org)
-                   (dtache-session-action dtache-org-session-action)
-                   (dtache-session-mode 'create)
+    (if (alist-get :detached params)
+        (cl-letf* ((detached-session-origin 'org)
+                   (detached-session-action detached-org-session-action)
+                   (detached-session-mode 'create)
                    (new-command (replace-regexp-in-string "\n" " && " 
full-body))
                    (dtach-command
                     (if (string= "none" (alist-get :session params))
-                        (dtache-dtach-command new-command t)
-                      (format "%s\necho \"[detached]\"" (dtache-dtach-command 
new-command t))))
+                        (detached-dtach-command new-command t)
+                      (format "%s\necho \"[detached]\"" 
(detached-dtach-command new-command t))))
                    ((symbol-function #'org-babel-eval)
                     (lambda (_ command)
-                      (start-file-process-shell-command "dtache-org" nil 
command)
+                      (start-file-process-shell-command "detached-org" nil 
command)
                       "[detached]")))
           (apply org-babel-sh-evaluate-fun `(,session ,dtach-command ,params 
,stdin ,cmdline)))
       (apply org-babel-sh-evaluate-fun args))))
 
-(provide 'dtache-org)
+(provide 'detached-org)
 
-;;; dtache-org.el ends here
+;;; detached-org.el ends here
diff --git a/dtache-shell.el b/dtache-shell.el
index 54cbcd33f9..089f7c1bac 100644
--- a/dtache-shell.el
+++ b/dtache-shell.el
@@ -1,4 +1,4 @@
-;;; dtache-shell.el --- Dtache integration for shell -*- lexical-binding: t -*-
+;;; detached-shell.el --- Detached integration for shell -*- lexical-binding: 
t -*-
 
 ;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
@@ -19,130 +19,130 @@
 
 ;;; Commentary:
 
-;; This is a `dtache' extension which provides integration for `shell'.
+;; This is a `detached' extension which provides integration for `shell'.
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'dtache)
+(require 'detached)
 
 ;;;; Variables
 
-(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
+(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
   :type 'plist)
 
-(defcustom dtache-shell-history-file nil
+(defcustom detached-shell-history-file nil
   "File to store history."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
 ;;;; Functions
 
-(defun dtache-shell-select-session ()
+(defun detached-shell-select-session ()
   "Return selected session."
-  (let* ((host-name (car (dtache--host)))
+  (let* ((host-name (car (detached--host)))
          (sessions
-          (thread-last (dtache-get-sessions)
+          (thread-last (detached-get-sessions)
                        (seq-filter (lambda (it)
-                                     (string= (car (dtache--session-host it)) 
host-name)))
-                       (seq-filter (lambda (it) (eq 'active 
(dtache--determine-session-state it)))))))
-    (dtache-completing-read sessions)))
+                                     (string= (car (detached--session-host 
it)) host-name)))
+                       (seq-filter (lambda (it) (eq 'active 
(detached--determine-session-state it)))))))
+    (detached-completing-read sessions)))
 
 ;;;; Commands
 
 ;;;###autoload
-(defun dtache-shell-send-input (&optional detach)
+(defun detached-shell-send-input (&optional detach)
   "Create a session and attach to it unless DETACH."
   (interactive "P")
-  (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))
+  (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))
     (comint-send-input)))
 
 ;;;###autoload
-(defun dtache-shell-attach-session (session)
+(defun detached-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 (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)
+   (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)
                   ((symbol-function 'comint-add-to-input-history) (lambda (_) 
t)))
-          (setq dtache--buffer-session session)
+          (setq detached--buffer-session session)
           (comint-kill-input)
           (insert "[attached]")
           (comint-send-input))
-      (dtache-open-session session))))
+      (detached-open-session session))))
 
 ;;;; Support functions
 
-(defun dtache-shell--attach-input-sender (proc _string)
-  "Attach to `dtache--session' and send the attach command to PROC."
-  (let* ((dtache-session-mode 'attach)
+(defun detached-shell--attach-input-sender (proc _string)
+  "Attach to `detached--session' and send the attach command to PROC."
+  (let* ((detached-session-mode 'attach)
          (input
-          (dtache-dtach-command dtache--current-session t)))
+          (detached-dtach-command detached--current-session t)))
     (comint-simple-send proc input)))
 
-(defun dtache-shell--create-input-sender (proc string)
-  "Create a dtache session based on STRING and send to PROC."
+(defun detached-shell--create-input-sender (proc string)
+  "Create a detached session based on STRING and send to PROC."
   (with-connection-local-variables
    (let* ((command (substring-no-properties string))
-          (dtach-command (dtache-dtach-command command t)))
+          (dtach-command (detached-dtach-command command t)))
      (comint-simple-send proc dtach-command))))
 
-(defun dtache-shell--comint-read-input-ring-advice (orig-fun &rest args)
+(defun detached-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)
-           dtache-shell-history-file)))
+           detached-shell-history-file)))
      (apply orig-fun args)
-     (advice-remove 'comint-read-input-ring 
#'dtache-shell--comint-read-input-ring-advice))))
+     (advice-remove 'comint-read-input-ring 
#'detached-shell--comint-read-input-ring-advice))))
 
-(defun dtache-shell--save-history ()
+(defun detached-shell--save-history ()
   "Save `shell' history."
   (with-connection-local-variables
-   (unless (string-prefix-p dtache--shell-command-buffer (buffer-name))
+   (unless (string-prefix-p detached--shell-command-buffer (buffer-name))
      (let* ((inhibit-message t)
             (comint-input-ring-file-name
              (concat
               (file-remote-p default-directory)
-              dtache-shell-history-file)))
+              detached-shell-history-file)))
        (comint-write-input-ring)))))
 
 ;;;###autoload
-(defun dtache-shell-override-history (orig-fun &rest args)
-  "Override history to read `dtache-shell-history-file' in ORIG-FUN with ARGS.
+(defun detached-shell-override-history (orig-fun &rest args)
+  "Override history to read `detached-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 
#'dtache-shell--comint-read-input-ring-advice)
+    (advice-add 'comint-read-input-ring :around 
#'detached-shell--comint-read-input-ring-advice)
     (apply orig-fun args)))
 
 ;;;###autoload
-(defun dtache-shell-save-history-on-kill ()
+(defun detached-shell-save-history-on-kill ()
   "Add hook to save history when killing `shell' buffer."
-  (add-hook 'kill-buffer-hook #'dtache-shell--save-history 0 t))
+  (add-hook 'kill-buffer-hook #'detached-shell--save-history 0 t))
 
 ;;;; Minor mode
 
-(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))
+(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))
 
-(provide 'dtache-shell)
+(provide 'detached-shell)
 
-;;; dtache-shell.el ends here
+;;; detached-shell.el ends here
diff --git a/dtache-vterm.el b/dtache-vterm.el
index fc1e27db93..b9217fd59e 100644
--- a/dtache-vterm.el
+++ b/dtache-vterm.el
@@ -1,4 +1,4 @@
-;;; dtache-vterm.el --- Dtache integration with vterm -*- lexical-binding: t 
-*-
+;;; detached-vterm.el --- Detached integration with vterm -*- lexical-binding: 
t -*-
 
 ;; Copyright (C) 2022  Free Software Foundation, Inc.
 
@@ -19,13 +19,13 @@
 
 ;;; Commentary:
 
-;; This package integrates `dtache' with `vterm'
+;; This package integrates `detached' with `vterm'
 
 ;;; Code:
 
 ;;;; Requirements
 
-(require 'dtache)
+(require 'detached)
 
 (declare-function vterm-send-C-a "vterm")
 (declare-function vterm-send-C-k "vterm")
@@ -38,64 +38,64 @@
 ;;;; Commands
 
 ;;;###autoload
-(defun dtache-vterm-send-input (&optional detach)
-  "Create a `dtache' session.
+(defun detached-vterm-send-input (&optional detach)
+  "Create a `detached' session.
 
 Optionally DETACH from it."
   (interactive)
   (vterm-send-C-a)
   (let* ((input (buffer-substring-no-properties (point) (vterm-end-of-line)))
-         (dtache-session-origin 'vterm)
-         (dtache-session-action
-          '(:attach dtache-shell-command-attach-session
-                    :view dtache-view-dwim
-                    :run dtache-shell-command))
-         (dtache-session-mode
+         (detached-session-origin 'vterm)
+         (detached-session-action
+          '(:attach detached-shell-command-attach-session
+                    :view detached-view-dwim
+                    :run detached-shell-command))
+         (detached-session-mode
           (if detach 'create 'create-and-attach)))
     (vterm-send-C-k)
-    (process-send-string vterm--process (dtache-dtach-command input t))
+    (process-send-string vterm--process (detached-dtach-command input t))
     (vterm-send-C-e)
     (vterm-send-return)))
 
 ;;;###autoload
-(defun dtache-vterm-attach (session)
-  "Attach to an active `dtache' SESSION."
+(defun detached-vterm-attach (session)
+  "Attach to an active `detached' SESSION."
   (interactive
    (list
-    (let* ((host-name (car (dtache--host)))
+    (let* ((host-name (car (detached--host)))
            (sessions
-            (thread-last (dtache-get-sessions)
+            (thread-last (detached-get-sessions)
                          (seq-filter (lambda (it)
-                                       (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))
+                                       (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))
     (vterm-send-return)))
 
 ;;;###autoload
-(defun dtache-vterm-detach ()
-  "Detach from a `dtache' session."
+(defun detached-vterm-detach ()
+  "Detach from a `detached' session."
   (interactive)
-  (process-send-string vterm--process dtache--dtach-detach-character))
+  (process-send-string vterm--process detached--dtach-detach-character))
 
 ;;;; Minor mode
 
-(defvar dtache-vterm-mode-map
+(defvar detached-vterm-mode-map
   (let ((map (make-sparse-keymap)))
-    (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)
+    (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)
     map)
-  "Keymap for `dtache-vterm-mode'.")
+  "Keymap for `detached-vterm-mode'.")
 
 ;;;###autoload
-(define-minor-mode dtache-vterm-mode
-  "Integrate `dtache' in `vterm'."
-  :lighter " dtache-vterm"
+(define-minor-mode detached-vterm-mode
+  "Integrate `detached' in `vterm'."
+  :lighter " detached-vterm"
   :keymap (let ((map (make-sparse-keymap)))
             map))
 
-(provide 'dtache-vterm)
+(provide 'detached-vterm)
 
-;;; dtache-vterm.el ends here
+;;; detached-vterm.el ends here
diff --git a/dtache.el b/dtache.el
index ead719122f..3c7ea8357d 100644
--- a/dtache.el
+++ b/dtache.el
@@ -1,10 +1,10 @@
-;;; dtache.el --- Run and interact with detached shell commands -*- 
lexical-binding: t -*-
+;;; detached.el --- Run and interact with detached shell commands -*- 
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://www.gitlab.com/niklaseklund/dtache.git
+;; URL: https://www.gitlab.com/niklaseklund/detached.git
 ;; Version: 0.6
 ;; Package-Requires: ((emacs "27.1"))
 ;; Keywords: convenience processes
@@ -26,15 +26,15 @@
 
 ;;; Commentary:
 
-;; The dtache package allows users to run shell commands detached from
+;; The detached package allows users to run shell commands detached from
 ;; Emacs.  These commands are launched in sessions, using the program
 ;; dtach[1].  These sessions can be easily created through the command
-;; `dtache-shell-command', or any of the commands provided by the
-;; `dtache-shell', `dtache-eshell' and `dtache-compile' extensions.
+;; `detached-shell-command', or any of the commands provided by the
+;; `detached-shell', `detached-eshell' and `detached-compile' extensions.
 
-;; When a session is created, dtache makes sure that Emacs is attached
+;; When a session is created, detached makes sure that Emacs is attached
 ;; to it the same time, which makes it a seamless experience for the
-;; users.  The `dtache' package internally creates a `dtache-session'
+;; users.  The `detached' package internally creates a `detached-session'
 ;; for all commands.
 
 ;; [1] https://github.com/crigler/dtach
@@ -51,229 +51,229 @@
 (require 'simple)
 (require 'tramp)
 
-(declare-function dtache-eshell-get-dtach-process "dtache-eshell")
+(declare-function detached-eshell-get-dtach-process "detached-eshell")
 
 ;;;; Variables
 
 ;;;;; Customizable
 
-(defcustom dtache-session-directory (expand-file-name "dtache" 
(temporary-file-directory))
+(defcustom detached-session-directory (expand-file-name "detached" 
(temporary-file-directory))
   "The directory to store sessions."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-db-directory user-emacs-directory
-  "The directory to store the `dtache' database."
+(defcustom detached-db-directory user-emacs-directory
+  "The directory to store the `detached' database."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-dtach-program "dtach"
+(defcustom detached-dtach-program "dtach"
   "The name of the `dtach' program."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-shell-program shell-file-name
+(defcustom detached-shell-program shell-file-name
   "Path to the shell to run the dtach command in."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-show-output-on-attach nil
+(defcustom detached-show-output-on-attach nil
   "If set to t show the session output when attaching to it."
   :type 'bool
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-show-output-command (executable-find "cat")
+(defcustom detached-show-output-command (executable-find "cat")
   "The command to be run to show a sessions output."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-env nil
-  "The name of, or path to, the `dtache' environment script."
+(defcustom detached-env nil
+  "The name of, or path to, the `detached' environment script."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-env-plain-text-commands nil
+(defcustom detached-env-plain-text-commands nil
   "A list of regexps for commands to run in plain-text mode."
   :type 'list
-  :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))
+  :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))
   "The format of the annotations."
   :type '(repeat symbol)
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-command-format
-  '(:width 90 :padding 4 :function dtache-command-str)
+(defcustom detached-command-format
+  '(:width 90 :padding 4 :function detached-command-str)
   "The format for displaying the command."
   :type 'integer
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-tail-interval 2
+(defcustom detached-tail-interval 2
   "Interval in seconds for the update rate when tailing a session."
   :type 'integer
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-open-active-session-action 'attach
+(defcustom detached-open-active-session-action 'attach
   "How to open an active session, allowed values are `attach' and `tail'."
   :type 'symbol
-  :group 'dtache)
+  :group 'detached)
 
-(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'."
+(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'."
   :type 'plist
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-shell-command-initial-input t
-  "Variable to control initial command input for `dtache-shell-command'.
+(defcustom detached-shell-command-initial-input t
+  "Variable to control initial command input for `detached-shell-command'.
 If set to a non nil value the latest entry to
-`dtache-shell-command-history' will be used as the initial input in
-`dtache-shell-command' when it is used as a command."
+`detached-shell-command-history' will be used as the initial input in
+`detached-shell-command' when it is used as a command."
   :type 'bool
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-nonattachable-commands nil
-  "A list of commands which `dtache' should consider nonattachable."
+(defcustom detached-nonattachable-commands nil
+  "A list of commands which `detached' should consider nonattachable."
   :type '(repeat (regexp :format "%v"))
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-notification-function 
#'dtache-state-transition-notifications-message
+(defcustom detached-notification-function 
#'detached-state-transition-notifications-message
   "Variable to set which function to use to issue a notification."
   :type 'function
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-detach-key "C-c C-d"
+(defcustom detached-detach-key "C-c C-d"
   "Variable to set the keybinding for detaching."
   :type 'string
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-filter-ansi-sequences t
-  "Variable to instruct `dtache' to use `ansi-filter'."
+(defcustom detached-filter-ansi-sequences t
+  "Variable to instruct `detached' to use `ansi-filter'."
   :type 'bool
-  :group 'dtache)
+  :group 'detached)
 
-(defcustom dtache-log-mode-hook '()
-  "Hook for customizing `dtache-log' mode."
+(defcustom detached-log-mode-hook '()
+  "Hook for customizing `detached-log' mode."
   :type 'hook
-  :group 'dtache)
+  :group 'detached)
 
-(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'."
+(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'."
   :type 'list
-  :group 'dtache)
+  :group 'detached)
 
 ;;;;; Public
 
-(defvar dtache-enabled nil)
-(defvar dtache-session-mode nil
+(defvar detached-enabled nil)
+(defvar detached-session-mode nil
   "Mode of operation for session.
 Valid values are: create, new and attach")
-(defvar dtache-session-origin nil
+(defvar detached-session-origin nil
   "Variable to specify the origin of the session.")
-(defvar dtache-session-action nil
+(defvar detached-session-action nil
   "A property list of actions for a session.")
-(defvar dtache-shell-command-history nil
-  "History of commands run with `dtache-shell-command'.")
-(defvar dtache-local-session nil
+(defvar detached-shell-command-history nil
+  "History of commands run with `detached-shell-command'.")
+(defvar detached-local-session nil
   "If set to t enforces a local session.")
 
-(defvar dtache-compile-session-hooks nil
+(defvar detached-compile-session-hooks nil
   "Hooks to run when compiling a session.")
-(defvar dtache-metadata-annotators-alist nil
+(defvar detached-metadata-annotators-alist nil
   "An alist of annotators for metadata.")
 
-(defconst dtache-session-version "0.6.1"
-  "The version of `dtache-session'.
+(defconst detached-session-version "0.6.1"
+  "The version of `detached-session'.
 This version is encoded as [package-version].[revision].")
 
 ;;;;; Faces
 
-(defgroup dtache-faces nil
-  "Faces used by `dtache'."
-  :group 'dtache
+(defgroup detached-faces nil
+  "Faces used by `detached'."
+  :group 'detached
   :group 'faces)
 
-(defface dtache-metadata-face
+(defface detached-metadata-face
   '((t :inherit font-lock-builtin-face))
-  "Face used to highlight metadata in `dtache'.")
+  "Face used to highlight metadata in `detached'.")
 
-(defface dtache-failure-face
+(defface detached-failure-face
   '((t :inherit error))
-  "Face used to highlight failure in `dtache'.")
+  "Face used to highlight failure in `detached'.")
 
-(defface dtache-state-face
+(defface detached-state-face
   '((t :inherit success))
-  "Face used to highlight state in `dtache'.")
+  "Face used to highlight state in `detached'.")
 
-(defface dtache-duration-face
+(defface detached-duration-face
   '((t :inherit font-lock-builtin-face))
-  "Face used to highlight duration in `dtache'.")
+  "Face used to highlight duration in `detached'.")
 
-(defface dtache-size-face
+(defface detached-size-face
   '((t :inherit font-lock-function-name-face))
-  "Face used to highlight size in `dtache'.")
+  "Face used to highlight size in `detached'.")
 
-(defface dtache-creation-face
+(defface detached-creation-face
   '((t :inherit font-lock-comment-face))
-  "Face used to highlight date in `dtache'.")
+  "Face used to highlight date in `detached'.")
 
-(defface dtache-working-dir-face
+(defface detached-working-dir-face
   '((t :inherit font-lock-variable-name-face))
-  "Face used to highlight working directory in `dtache'.")
+  "Face used to highlight working directory in `detached'.")
 
-(defface dtache-host-face
+(defface detached-host-face
   '((t :inherit font-lock-constant-face))
-  "Face used to highlight host in `dtache'.")
+  "Face used to highlight host in `detached'.")
 
-(defface dtache-identifier-face
+(defface detached-identifier-face
   '((t :inherit font-lock-comment-face))
-  "Face used to highlight identifier in `dtache'.")
+  "Face used to highlight identifier in `detached'.")
 
 ;;;;; Private
 
-(defvar dtache--sessions-initialized nil
+(defvar detached--sessions-initialized nil
   "Sessions are initialized.")
-(defvar dtache--sessions nil
+(defvar detached--sessions nil
   "A list of sessions.")
-(defvar dtache--watched-session-directories nil
+(defvar detached--watched-session-directories nil
   "An alist where values are a (directory . descriptor).")
-(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
+(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
   "The current session.")
-(make-variable-buffer-local 'dtache--buffer-session)
-(defvar dtache--session-candidates nil
+(make-variable-buffer-local 'detached--buffer-session)
+(defvar detached--session-candidates nil
   "An alist of session candidates.")
-(defvar dtache--annotation-widths nil
+(defvar detached--annotation-widths nil
   "An alist of widths to use for annotation.")
 
-(defconst dtache--shell-command-buffer "*Dtache Shell Command*"
-  "Name of the `dtache-shell-command' buffer.")
-(defconst dtache--dtach-eof-message "\\[EOF - dtach terminating\\]"
+(defconst detached--shell-command-buffer "*Detached Shell Command*"
+  "Name of the `detached-shell-command' buffer.")
+(defconst detached--dtach-eof-message "\\[EOF - dtach terminating\\]"
   "Message printed when `dtach' terminates.")
-(defconst dtache--dtach-detached-message "\\[detached\\]\^M"
+(defconst detached--dtach-detached-message "\\[detached\\]\^M"
   "Message printed when detaching from `dtach'.")
-(defconst dtache--dtach-detach-character "\C-\\"
+(defconst detached--dtach-detach-character "\C-\\"
   "Character used to detach from a session.")
 
 ;;;; Data structures
 
-(cl-defstruct (dtache-session (:constructor dtache--session-create)
-                              (:conc-name dtache--session-))
+(cl-defstruct (detached-session (:constructor detached--session-create)
+                              (:conc-name detached--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 dtache-connection-local-variables (&rest body)
+(defmacro detached-connection-local-variables (&rest body)
   "A macro that conditionally use `connection-local-variables' when executing 
BODY."
-  `(if dtache-local-session
+  `(if detached-local-session
        (progn
          ,@body)
      (with-connection-local-variables
@@ -303,373 +303,373 @@ This version is encoded as 
[package-version].[revision].")
 ;;;; Commands
 
 ;;;###autoload
-(defun dtache-shell-command (command &optional suppress-output)
-  "Execute COMMAND with `dtache'.
+(defun detached-shell-command (command &optional suppress-output)
+  "Execute COMMAND with `detached'.
 
 Optionally SUPPRESS-OUTPUT if prefix-argument is provided."
   (interactive
    (list
     (read-shell-command (if shell-command-prompt-show-cwd
-                            (format-message "Dtache shell command in `%s': "
+                            (format-message "Detached shell command in `%s': "
                                             (abbreviate-file-name
                                              default-directory))
-                          "Dtache shell command: ")
-                        (when dtache-shell-command-initial-input
-                          (car dtache-shell-command-history))
-                        'dtache-shell-command-history)
+                          "Detached shell command: ")
+                        (when detached-shell-command-initial-input
+                          (car detached-shell-command-history))
+                        'detached-shell-command-history)
     current-prefix-arg))
-  (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)))
+  (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)))
 
 ;;;###autoload
-(defun dtache-open-session (session)
-  "Open a `dtache' SESSION."
+(defun detached-open-session (session)
+  "Open a `detached' SESSION."
   (interactive
-   (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)))
+   (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)))
           (funcall view-fun session)
-        (dtache-view-dwim session)))))
+        (detached-view-dwim session)))))
 
 ;;;###autoload
-(defun dtache-compile-session (session)
+(defun detached-compile-session (session)
   "Compile SESSION.
 
 The session is compiled by opening its output and enabling
 `compilation-minor-mode'."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
-    (let ((buffer-name "*dtache-session-output*")
+   (list (detached-completing-read (detached-get-sessions))))
+  (when (detached-valid-session session)
+    (let ((buffer-name "*detached-session-output*")
           (file
-           (dtache--session-file session 'log))
+           (detached--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 (dtache--session-output session))
+          (insert (detached--session-output session))
           (setq-local default-directory
-                      (dtache--session-working-directory session))
-          (run-hooks 'dtache-compile-session-hooks)
-          (dtache-log-mode)
+                      (detached--session-working-directory session))
+          (run-hooks 'detached-compile-session-hooks)
+          (detached-log-mode)
           (compilation-minor-mode)
-          (setq dtache--buffer-session session)
+          (setq detached--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 dtache-rerun-session (session &optional suppress-output)
+(defun detached-rerun-session (session &optional suppress-output)
   "Rerun SESSION, optionally SUPPRESS-OUTPUT."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))
+   (list (detached-completing-read (detached-get-sessions))
          current-prefix-arg))
-  (when (dtache-valid-session session)
+  (when (detached-valid-session session)
     (let* ((default-directory
-            (dtache--session-working-directory session))
-           (dtache-session-action (dtache--session-action session))
-           (command (dtache--session-command session)))
+            (detached--session-working-directory session))
+           (detached-session-action (detached--session-action session))
+           (command (detached--session-command session)))
       (if suppress-output
-          (dtache-start-session command suppress-output)
-        (if-let ((run-fun (plist-get (dtache--session-action session) :run)))
+          (detached-start-session command suppress-output)
+        (if-let ((run-fun (plist-get (detached--session-action session) :run)))
             (funcall run-fun command)
-          (dtache-start-session command))))))
+          (detached-start-session command))))))
 
 ;;;###autoload
-(defun dtache-attach-session (session)
+(defun detached-attach-session (session)
   "Attach to SESSION."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
-    (if (or (eq 'inactive (dtache--session-state session))
-            (not (dtache--session-attachable session)))
-        (dtache-open-session session)
-      (if-let ((attach-fun (plist-get (dtache--session-action session) 
:attach)))
+   (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)))
           (funcall attach-fun session)
-        (dtache-shell-command-attach-session session)))))
+        (detached-shell-command-attach-session session)))))
 
 ;;;###autoload
-(defun dtache-copy-session (session)
+(defun detached-copy-session (session)
   "Copy SESSION's output."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
+   (list (detached-completing-read (detached-get-sessions))))
+  (when (detached-valid-session session)
     (with-temp-buffer
-      (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))
+      (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))
       (kill-new (buffer-string)))))
 
 ;;;###autoload
-(defun dtache-copy-session-command (session)
+(defun detached-copy-session-command (session)
   "Copy SESSION's command."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
-    (kill-new (dtache--session-command session))))
+   (list (detached-completing-read (detached-get-sessions))))
+  (when (detached-valid-session session)
+    (kill-new (detached--session-command session))))
 
 ;;;###autoload
-(defun dtache-insert-session-command (session)
+(defun detached-insert-session-command (session)
   "Insert SESSION's command."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
-    (insert (dtache--session-command session))))
+   (list (detached-completing-read (detached-get-sessions))))
+  (when (detached-valid-session session)
+    (insert (detached--session-command session))))
 
 ;;;###autoload
-(defun dtache-delete-session (session)
+(defun detached-delete-session (session)
   "Delete SESSION."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
-    (if (eq 'active (dtache--determine-session-state session))
+   (list (detached-completing-read (detached-get-sessions))))
+  (when (detached-valid-session session)
+    (if (eq 'active (detached--determine-session-state session))
         (message "Kill session first before removing it.")
-      (dtache--db-remove-entry session))))
+      (detached--db-remove-entry session))))
 
 ;;;###autoload
-(defun dtache-kill-session (session &optional delete)
+(defun detached-kill-session (session &optional delete)
   "Send a TERM signal to SESSION.
 
 Optionally DELETE the session if prefix-argument is provided."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))
+   (list (detached-completing-read (detached-get-sessions))
          current-prefix-arg))
-  (when (dtache-valid-session session)
-    (when-let* ((default-directory (dtache--session-directory session))
-                (pid (dtache--session-pid session)))
-      (dtache--kill-processes pid))
+  (when (detached-valid-session session)
+    (when-let* ((default-directory (detached--session-directory session))
+                (pid (detached--session-pid session)))
+      (detached--kill-processes pid))
     (when delete
-      (dtache--db-remove-entry session))))
+      (detached--db-remove-entry session))))
 
 ;;;###autoload
-(defun dtache-view-session (session)
+(defun detached-view-session (session)
   "View the SESSION."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
-    (let* ((buffer-name "*dtache-session-output*")
+   (list (detached-completing-read (detached-get-sessions))))
+  (when (detached-valid-session session)
+    (let* ((buffer-name "*detached-session-output*")
            (file-path
-            (dtache--session-file session 'log))
+            (detached--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 (dtache--session-output session))
-              (setq-local default-directory (dtache--session-working-directory 
session))
-              (dtache-log-mode)
-              (setq dtache--buffer-session session)
+              (insert (detached--session-output session))
+              (setq-local default-directory 
(detached--session-working-directory session))
+              (detached-log-mode)
+              (setq detached--buffer-session session)
               (goto-char (point-max)))
             (pop-to-buffer buffer-name))
-        (message "Dtache can't find file: %s" file-path)))))
+        (message "Detached can't find file: %s" file-path)))))
 
 ;;;###autoload
-(defun dtache-tail-session (session)
+(defun detached-tail-session (session)
   "Tail the SESSION."
   (interactive
-   (list (dtache-completing-read (dtache-get-sessions))))
-  (when (dtache-valid-session session)
-    (if (eq 'active (dtache--determine-session-state session))
+   (list (detached-completing-read (detached-get-sessions))))
+  (when (detached-valid-session session)
+    (if (eq 'active (detached--determine-session-state session))
         (let* ((file-path
-                (dtache--session-file session 'log))
+                (detached--session-file session 'log))
                (tramp-verbose 1))
           (when (file-exists-p file-path)
             (find-file-other-window file-path)
-            (setq dtache--buffer-session session)
-            (dtache-tail-mode)
+            (setq detached--buffer-session session)
+            (detached-tail-mode)
             (goto-char (point-max))))
-      (dtache-view-session session))))
+      (detached-view-session session))))
 
 ;;;###autoload
-(defun dtache-diff-session (session1 session2)
+(defun detached-diff-session (session1 session2)
   "Diff SESSION1 with SESSION2."
   (interactive
-   (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*"))
+   (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*"))
       (with-current-buffer (get-buffer-create buffer1)
         (erase-buffer)
-        (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)))
+        (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)))
       (with-current-buffer (get-buffer-create buffer2)
         (erase-buffer)
-        (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)))
+        (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)))
       (ediff-buffers buffer1 buffer2))))
 
 ;;;###autoload
-(defun dtache-detach-session ()
+(defun detached-detach-session ()
   "Detach from session in current buffer.
 
-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."
+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."
   (interactive)
-  (if (dtache-session-p dtache--buffer-session)
-      (if (eq major-mode 'dtache-tail-mode)
-          (dtache-quit-tail-session)
+  (if (detached-session-p detached--buffer-session)
+      (if (eq major-mode 'detached-tail-mode)
+          (detached-quit-tail-session)
           (if-let ((command-or-compile
-                    (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)
+                    (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)
                           (t nil))))
-              ;; `dtache-shell-command' or `dtache-compile'
+              ;; `detached-shell-command' or `detached-compile'
               (let ((kill-buffer-query-functions nil))
                 (when-let ((process (get-buffer-process (current-buffer))))
-                  (comint-simple-send process dtache--dtach-detach-character)
+                  (comint-simple-send process detached--dtach-detach-character)
                   (message "[detached]"))
-                (setq dtache--buffer-session nil)
+                (setq detached--buffer-session nil)
                 (kill-buffer-and-window))
-            (if (eq 'active (dtache--determine-session-state 
dtache--buffer-session))
-                ;; `dtache-eshell'
+            (if (eq 'active (detached--determine-session-state 
detached--buffer-session))
+                ;; `detached-eshell'
                 (if-let ((process (and (eq major-mode 'eshell-mode)
-                                       (dtache-eshell-get-dtach-process))))
+                                       (detached-eshell-get-dtach-process))))
                     (progn
-                      (setq dtache--buffer-session nil)
-                      (process-send-string process 
dtache--dtach-detach-character))
-                  ;; `dtache-shell'
+                      (setq detached--buffer-session nil)
+                      (process-send-string process 
detached--dtach-detach-character))
+                  ;; `detached-shell'
                   (let ((process (get-buffer-process (current-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.")))
+                    (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.")))
 
 ;;;###autoload
-(defun dtache-delete-sessions (&optional all-hosts)
-  "Delete `dtache' sessions which belong to the current host, unless 
ALL-HOSTS."
+(defun detached-delete-sessions (&optional all-hosts)
+  "Delete `detached' sessions which belong to the current host, unless 
ALL-HOSTS."
   (interactive "P")
-  (let* ((host-name (car (dtache--host)))
+  (let* ((host-name (car (detached--host)))
          (sessions (if all-hosts
-                       (dtache-get-sessions)
+                       (detached-get-sessions)
                      (seq-filter (lambda (it)
-                                   (string= (car (dtache--session-host it)) 
host-name))
-                                 (dtache-get-sessions)))))
-    (seq-do #'dtache--db-remove-entry sessions)))
+                                   (string= (car (detached--session-host it)) 
host-name))
+                                 (detached-get-sessions)))))
+    (seq-do #'detached--db-remove-entry sessions)))
 
 ;;;###autoload
-(defun dtache-quit-tail-session ()
-  "Quit `dtache' tail session.
+(defun detached-quit-tail-session ()
+  "Quit `detached' 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 dtache--buffer-session nil)
+  (setq detached--buffer-session nil)
   (kill-buffer-and-window))
 
 ;;;; Functions
 
 ;;;;; Session
 
-(defun dtache-create-session (command)
-  "Create a `dtache' session from COMMAND."
-  (dtache-connection-local-variables
-   (dtache--create-session-directory)
+(defun detached-create-session (command)
+  "Create a `detached' session from COMMAND."
+  (detached-connection-local-variables
+   (detached--create-session-directory)
    (let ((session
-          (dtache--session-create :id (intern (dtache--create-id command))
+          (detached--session-create :id (intern (detached--create-id command))
                                   :command command
-                                  :origin dtache-session-origin
-                                  :action dtache-session-action
-                                  :working-directory 
(dtache--get-working-directory)
-                                  :attachable (dtache-attachable-command-p 
command)
+                                  :origin detached-session-origin
+                                  :action detached-session-action
+                                  :working-directory 
(detached--get-working-directory)
+                                  :attachable (detached-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 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)
+                                  :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)
                                   :state 'unknown)))
-     (dtache--db-insert-entry session)
-     (dtache--watch-session-directory (dtache--session-directory session))
+     (detached--db-insert-entry session)
+     (detached--watch-session-directory (detached--session-directory session))
      session)))
 
 ;;;###autoload
-(defun dtache-start-session (command &optional suppress-output)
-  "Start a `dtache' session running COMMAND.
+(defun detached-start-session (command &optional suppress-output)
+  "Start a `detached' session running COMMAND.
 
 Optionally SUPPRESS-OUTPUT."
   (let ((inhibit-message t)
-        (dtache-enabled t)
-        (dtache--current-session
-         (or dtache--current-session
-             (dtache-create-session command))))
+        (detached-enabled t)
+        (detached--current-session
+         (or detached--current-session
+             (detached-create-session command))))
     (if-let ((run-in-background
               (and (or suppress-output
-                       (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
+                       (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
                    (apply #'start-process-shell-command
-                          `("dtache" nil ,(dtache-dtach-command 
dtache--current-session t)))
+                          `("detached" nil ,(detached-dtach-command 
detached--current-session t)))
                  (apply #'start-file-process-shell-command
-                        `("dtache" nil ,(dtache-dtach-command 
dtache--current-session t)))))
-      (cl-letf* ((dtache-session-mode 'create-and-attach)
+                        `("detached" nil ,(detached-dtach-command 
detached--current-session t)))))
+      (cl-letf* ((detached-session-mode 'create-and-attach)
                  ((symbol-function #'set-process-sentinel) #'ignore)
-                 (buffer (get-buffer-create dtache--shell-command-buffer)))
+                 (buffer (get-buffer-create detached--shell-command-buffer)))
         (when (get-buffer-process buffer)
           (setq buffer (generate-new-buffer (buffer-name buffer))))
-        (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))))))
+        (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))))))
 
-(defun dtache-session-candidates (sessions)
+(defun detached-session-candidates (sessions)
   "Return an alist of SESSIONS candidates."
   (when sessions
-    (setq dtache--annotation-widths
-          (dtache--annotation-widths sessions dtache-annotation-format))
+    (setq detached--annotation-widths
+          (detached--annotation-widths sessions detached-annotation-format))
     (let ((command-length
            (thread-last sessions
-                        (seq-map #'dtache--session-command)
+                        (seq-map #'detached--session-command)
                         (seq-map #'length)
                         (seq-max)
-                        (min (plist-get dtache-command-format ':width)))))
-      (let ((command-fun (plist-get dtache-command-format ':function)))
-        (setq dtache--session-candidates
+                        (min (plist-get detached-command-format ':width)))))
+      (let ((command-fun (plist-get detached-command-format ':function)))
+        (setq detached--session-candidates
               (thread-last sessions
                            (seq-map (lambda (it)
                                       `(,(apply command-fun `(,it 
,command-length))
                                         . ,it)))
-                           (dtache--session-deduplicate)
+                           (detached--session-deduplicate)
                            (seq-map (lambda (it)
                                       `(,(concat (car it)
-                                                 (make-string (plist-get 
dtache-command-format :padding) ?\s))
+                                                 (make-string (plist-get 
detached-command-format :padding) ?\s))
                                         . ,(cdr it))))))))))
 
-(defun dtache-session-annotation (item)
+(defun detached-session-annotation (item)
   "Associate ITEM to a session and return ts annotation."
-  (let ((session (cdr (assoc item dtache--session-candidates))))
+  (let ((session (cdr (assoc item detached--session-candidates))))
     (mapconcat
      #'identity
-     (cl-loop for annotation in dtache-annotation-format
+     (cl-loop for annotation in detached-annotation-format
               collect (let ((str (funcall (plist-get annotation :function) 
session))
-                            (width (alist-get (plist-get annotation :function) 
dtache--annotation-widths)))
+                            (width (alist-get (plist-get annotation :function) 
detached--annotation-widths)))
                         (when (> width 0)
                           (concat
                            (truncate-string-to-width
@@ -681,184 +681,184 @@ Optionally SUPPRESS-OUTPUT."
      "")))
 
 ;;;###autoload
-(defun dtache-initialize-sessions ()
-  "Initialize `dtache' sessions from the database."
+(defun detached-initialize-sessions ()
+  "Initialize `detached' sessions from the database."
 
   ;; Initialize sessions
-  (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
+  (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
                              '(change attribute-change)
-                             #'dtache--db-directory-event))
-    (setq dtache--sessions-initialized t)
+                             #'detached--db-directory-event))
+    (setq detached--sessions-initialized t)
 
     ;; Remove missing local sessions
-    (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))
+    (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))
 
     ;; Validate sessions with unknown state
-    (dtache--validate-unknown-sessions)
+    (detached--validate-unknown-sessions)
 
     ;; Update transitioned sessions
-    (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)
+    (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)
                                        t)))
-                 (seq-filter #'dtache--state-transition-p)
-                 (seq-do #'dtache--session-state-transition-update))
+                 (seq-filter #'detached--state-transition-p)
+                 (seq-do #'detached--session-state-transition-update))
 
     ;; Watch session directories with active sessions
-    (thread-last (dtache--db-get-sessions)
-                 (seq-filter (lambda (it) (eq 'active (dtache--session-state 
it))))
-                 (seq-map #'dtache--session-directory)
+    (thread-last (detached--db-get-sessions)
+                 (seq-filter (lambda (it) (eq 'active (detached--session-state 
it))))
+                 (seq-map #'detached--session-directory)
                  (seq-uniq)
-                 (seq-do #'dtache--watch-session-directory))))
+                 (seq-do #'detached--watch-session-directory))))
 
-(defun dtache-valid-session (session)
+(defun detached-valid-session (session)
   "Ensure that SESSION is valid.
 
 If session is not valid trigger an automatic cleanup on SESSION's host."
-  (when (dtache-session-p session)
-    (if (not (dtache--session-missing-p session))
+  (when (detached-session-p session)
+    (if (not (detached--session-missing-p session))
         t
-      (let ((host (dtache--session-host session)))
+      (let ((host (detached--session-host session)))
         (message "Session does not exist. Initiate sesion cleanup on host %s" 
(car host))
-        (dtache--cleanup-host-sessions host)
+        (detached--cleanup-host-sessions host)
         nil))))
 
-(defun dtache-session-exit-code-status (session)
+(defun detached-session-exit-code-status (session)
   "Return status based on exit-code in SESSION."
-  (if (null dtache-env)
+  (if (null detached-env)
       `(unknown . 0)
-    (let ((dtache-env-message
+    (let ((detached-env-message
            (with-temp-buffer
-             (insert-file-contents (dtache--session-file session 'log))
+             (insert-file-contents (detached--session-file session 'log))
              (goto-char (point-max))
              (thing-at-point 'line t)))
-          (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))))
+          (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))))
             (t `(unknown . 0))))))
 
-(defun dtache-state-transitionion-echo-message (session)
+(defun detached-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 (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))))
+  (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))))
 
-(defun dtache-state-transition-notifications-message (session)
+(defun detached-state-transition-notifications-message (session)
   "Issue a notification when SESSION transitions from active to inactive.
 This function uses the `notifications' library."
-  (let ((status (car (dtache--session-status session)))
-        (host (car (dtache--session-host session))))
+  (let ((status (car (detached--session-status session)))
+        (host (car (detached--session-host session))))
     (notifications-notify
      :title (pcase status
-              ('success (format "Dtache finished [%s]" host))
-              ('failure (format "Dtache failed [%s]" host))
-              ('unknown (format "Dtache finished [%s]" host)))
-     :body (dtache--session-command session)
+              ('success (format "Detached finished [%s]" host))
+              ('failure (format "Detached failed [%s]" host))
+              ('unknown (format "Detached finished [%s]" host)))
+     :body (detached--session-command session)
      :urgency (pcase status
                 ('success 'normal)
                 ('failure 'critical)
                 ('unknown 'normal)))))
 
-(defun dtache-view-dwim (session)
+(defun detached-view-dwim (session)
   "View SESSION in a do what I mean fashion."
-  (let ((status (car (dtache--session-status session))))
+  (let ((status (car (detached--session-status session))))
     (cond ((eq 'success status)
-           (dtache-view-session session))
+           (detached-view-session session))
           ((eq 'failure status)
-           (dtache-compile-session session))
+           (detached-compile-session session))
           ((eq 'unknown status)
-           (dtache-view-session session))
-          (t (message "Dtache session is in an unexpected state.")))))
+           (detached-view-session session))
+          (t (message "Detached session is in an unexpected state.")))))
 
-(defun dtache-get-sessions ()
+(defun detached-get-sessions ()
   "Return validated sessions."
-  (dtache-initialize-sessions)
-  (dtache--validate-unknown-sessions)
-  (dtache--db-get-sessions))
+  (detached-initialize-sessions)
+  (detached--validate-unknown-sessions)
+  (detached--db-get-sessions))
 
-(defun dtache-shell-command-attach-session (session)
+(defun detached-shell-command-attach-session (session)
   "Attach to SESSION with `async-shell-command'."
-  (let* ((dtache--current-session session)
-         (dtache-session-mode 'attach)
+  (let* ((detached--current-session session)
+         (detached-session-mode 'attach)
          (inhibit-message t))
-    (if (not (dtache--session-attachable session))
-        (dtache-tail-session session)
+    (if (not (detached--session-attachable session))
+        (detached-tail-session session)
       (cl-letf* (((symbol-function #'set-process-sentinel) #'ignore)
-                 (buffer (get-buffer-create dtache--shell-command-buffer))
-                 (default-directory (dtache--session-working-directory 
session))
-                 (dtach-command (dtache-dtach-command session t)))
+                 (buffer (get-buffer-create detached--shell-command-buffer))
+                 (default-directory (detached--session-working-directory 
session))
+                 (dtach-command (detached-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 dtache--buffer-session 
dtache--current-session))))))
+        (with-current-buffer buffer (setq detached--buffer-session 
detached--current-session))))))
 
 ;;;;; Other
 
-(cl-defgeneric dtache-dtach-command (entity &optional concat)
+(cl-defgeneric detached-dtach-command (entity &optional concat)
   "Return dtach command for ENTITY optionally CONCAT.")
 
-(cl-defgeneric dtache-dtach-command ((command string) &optional concat)
+(cl-defgeneric detached-dtach-command ((command string) &optional concat)
   "Return dtach command for COMMAND.
 
 Optionally CONCAT the command return command into a string."
-  (dtache-dtach-command (dtache-create-session command) concat))
+  (detached-dtach-command (detached-create-session command) concat))
 
-(cl-defgeneric dtache-dtach-command ((session dtache-session) &optional concat)
+(cl-defgeneric detached-dtach-command ((session detached-session) &optional 
concat)
   "Return dtach command for SESSION.
 
 Optionally CONCAT the command return command into a string."
-  (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)
+  (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)
          (if concat
              (mapconcat #'identity
-                        `(,(when dtache-show-output-on-attach
-                             (concat dtache-show-output-command " " log ";"))
-                          ,dtache-dtach-program
+                        `(,(when detached-show-output-on-attach
+                             (concat detached-show-output-command " " log ";"))
+                          ,detached-dtach-program
                           ,dtach-arg
                           ,socket
                           "-r none")
                         " ")
            (append
-            (when dtache-show-output-on-attach
-              `(,dtache-show-output-command  ,(concat log ";")))
-            `(,dtache-dtach-program ,dtach-arg ,socket "-r" "none")))
+            (when detached-show-output-on-attach
+              `(,detached-show-output-command  ,(concat log ";")))
+            `(,detached-dtach-program ,dtach-arg ,socket "-r" "none")))
        (if concat
            (mapconcat #'identity
-                      `(,dtache-dtach-program
+                      `(,detached-dtach-program
                         ,dtach-arg
                         ,socket "-z"
-                        ,dtache-shell-program "-c"
-                        ,(shell-quote-argument (dtache--dtache-command 
session)))
+                        ,detached-shell-program "-c"
+                        ,(shell-quote-argument (detached--detached-command 
session)))
                       " ")
-         `(,dtache-dtach-program
+         `(,detached-dtach-program
            ,dtach-arg ,socket "-z"
-                      ,dtache-shell-program "-c"
-                      ,(dtache--dtache-command session)))))))
+                      ,detached-shell-program "-c"
+                      ,(detached--detached-command session)))))))
 
-(defun dtache-attachable-command-p (command)
+(defun detached-attachable-command-p (command)
   "Return t if COMMAND is attachable."
-  (if (thread-last dtache-nonattachable-commands
+  (if (thread-last detached-nonattachable-commands
                    (seq-filter (lambda (regexp)
                                  (string-match-p regexp command)))
                    (length)
@@ -866,49 +866,49 @@ Optionally CONCAT the command return command into a 
string."
       t
     nil))
 
-(defun dtache-metadata ()
+(defun detached-metadata ()
   "Return a property list with metadata."
   (let ((metadata '()))
-    (seq-doseq (annotator dtache-metadata-annotators-alist)
+    (seq-doseq (annotator detached-metadata-annotators-alist)
       (push `(,(car annotator) . ,(funcall (cdr annotator))) metadata))
     metadata))
 
-(defun dtache-completing-read (sessions)
+(defun detached-completing-read (sessions)
   "Select a session from SESSIONS through `completing-read'."
-  (let* ((candidates (dtache-session-candidates sessions))
+  (let* ((candidates (detached-session-candidates sessions))
          (metadata `(metadata
-                     (category . dtache)
+                     (category . detached)
                      (cycle-sort-function . identity)
                      (display-sort-function . identity)
-                     (annotation-function . dtache-session-annotation)
+                     (annotation-function . detached-session-annotation)
                      (affixation-function .
                                           ,(lambda (cands)
                                              (seq-map (lambda (s)
-                                                        `(,s nil 
,(dtache-session-annotation s)))
+                                                        `(,s nil 
,(detached-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)))
-    (dtache--decode-session cand)))
+    (detached--decode-session cand)))
 
-(defun dtache-command-str (session max-length)
+(defun detached-command-str (session max-length)
   "Return SESSION's command as a string restrict it to MAX-LENGTH."
-  (let ((command (dtache--session-command session)))
+  (let ((command (detached--session-command session)))
     (if (<= (length command) max-length)
         command
-      (concat (substring (dtache--session-command session) 0 (- max-length 3)) 
"..."))))
+      (concat (substring (detached--session-command session) 0 (- max-length 
3)) "..."))))
 
 ;;;; Support functions
 
 ;;;;; Session
 
-(defun dtache--session-pid (session)
+(defun detached--session-pid (session)
   "Return SESSION's pid."
   (let* ((socket
           (expand-file-name
-           (concat (symbol-name (dtache--session-id session)) ".socket")
+           (concat (symbol-name (detached--session-id session)) ".socket")
            (or
             (file-remote-p default-directory 'localname)
             default-directory))))
@@ -919,42 +919,42 @@ Optionally CONCAT the command return command into a 
string."
         (buffer-string))
       "\n" t))))
 
-(defun dtache--determine-session-state (session)
+(defun detached--determine-session-state (session)
   "Return t if SESSION is active."
   (if (file-exists-p
-       (dtache--session-file session 'socket))
+       (detached--session-file session 'socket))
       'active
     'inactive))
 
-(defun dtache--state-transition-p (session)
+(defun detached--state-transition-p (session)
   "Return t if SESSION has transitioned from active to inactive."
   (and
-   (eq 'active (dtache--session-state session))
-   (eq 'inactive (dtache--determine-session-state session))))
+   (eq 'active (detached--session-state session))
+   (eq 'inactive (detached--determine-session-state session))))
 
-(defun dtache--session-missing-p (session)
+(defun detached--session-missing-p (session)
   "Return t if SESSION is missing."
   (not
    (file-exists-p
-    (dtache--session-file session 'log))))
+    (detached--session-file session 'log))))
 
-(defun dtache--session-header (session)
+(defun detached--session-header (session)
   "Return header for SESSION."
   (mapconcat
    #'identity
-   `(,(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))
+   `(,(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))
      "")
    "\n"))
 
-(defun dtache--session-deduplicate (sessions)
+(defun detached--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
@@ -970,74 +970,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 'dtache-identifier-face)
+                                   (propertize (format " (%s)" (puthash (car 
session) (1+ count) ht)) 'face 'detached-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 dtache--decode-session (item)
+(defun detached--decode-session (item)
   "Return the session assicated with ITEM."
-  (cdr (assoc item dtache--session-candidates)))
+  (cdr (assoc item detached--session-candidates)))
 
-(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))))
+(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))))
                (seq-do (lambda (it)
-                         (if (dtache--session-missing-p it)
-                             (dtache--db-remove-entry it)
-                           (setf (dtache--session-state it) 'active)
-                           (dtache--db-update-entry it))))))
+                         (if (detached--session-missing-p it)
+                             (detached--db-remove-entry it)
+                           (setf (detached--session-state it) 'active)
+                           (detached--db-update-entry it))))))
 
-(defun dtache--session-file (session file &optional local)
+(defun detached--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
-            (dtache--session-id session))
+            (detached--session-id session))
            (pcase file
              ('socket ".socket")
              ('log ".log"))))
-         (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))))
+         (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))))
     (if (and local remote-local-path)
         remote-local-path
       full-path)))
 
-(defun dtache--cleanup-host-sessions (host)
+(defun detached--cleanup-host-sessions (host)
   "Run cleanuup on HOST sessions."
   (let ((host-name (car host)))
-    (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))))
+    (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))))
 
-(defun dtache--session-output (session)
+(defun detached--session-output (session)
   "Return content of SESSION's output."
-  (let* ((filename (dtache--session-file session 'log))
-         (dtache-message (rx (regexp "\n?\nDtache session ") (or "finished" 
"exited"))))
+  (let* ((filename (detached--session-file session 'log))
+         (detached-message (rx (regexp "\n?\nDetached session ") (or 
"finished" "exited"))))
     (with-temp-buffer
       (insert-file-contents filename)
       (goto-char (point-min))
       (let ((beginning (point))
-            (end (if (search-forward-regexp dtache-message nil t)
+            (end (if (search-forward-regexp detached-message nil t)
                      (match-beginning 0)
                    (point-max))))
         (buffer-substring beginning end)))))
 
-(defun dtache--create-session-directory ()
+(defun detached--create-session-directory ()
   "Create session directory if it doesn't exist."
   (let ((directory
          (concat
           (file-remote-p default-directory)
-          dtache-session-directory)))
+          detached-session-directory)))
     (unless (file-exists-p directory)
       (make-directory directory t))))
 
-(defun dtache--get-working-directory ()
+(defun detached--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)
@@ -1047,94 +1047,94 @@ Optionally make the path LOCAL to host."
 
 ;;;;; Database
 
-(defun dtache--db-initialize ()
+(defun detached--db-initialize ()
   "Return all sessions stored in database."
-  (let ((db (expand-file-name "dtache.db" dtache-db-directory)))
+  (let ((db (expand-file-name "detached.db" detached-db-directory)))
     (when (file-exists-p db)
       (with-temp-buffer
         (insert-file-contents db)
         (cl-assert (bobp))
-        (when (string= (dtache--db-session-version) dtache-session-version)
-          (setq dtache--sessions
+        (when (string= (detached--db-session-version) detached-session-version)
+          (setq detached--sessions
                 (read (current-buffer))))))))
 
-(defun dtache--db-session-version ()
-  "Return `dtache-session-version' from database."
+(defun detached--db-session-version ()
+  "Return `detached-session-version' from database."
   (let ((header (thing-at-point 'line))
-        (regexp (rx "Dtache Session Version: " (group (one-or-more (or digit 
punct))))))
+        (regexp (rx "Detached Session Version: " (group (one-or-more (or digit 
punct))))))
     (string-match regexp header)
     (match-string 1 header)))
 
-(defun dtache--db-insert-entry (session)
-  "Insert SESSION into `dtache--sessions' and update database."
-  (push `(,(dtache--session-id session) . ,session) dtache--sessions)
-  (dtache--db-update-sessions))
+(defun detached--db-insert-entry (session)
+  "Insert SESSION into `detached--sessions' and update database."
+  (push `(,(detached--session-id session) . ,session) detached--sessions)
+  (detached--db-update-sessions))
 
-(defun dtache--db-remove-entry (session)
-  "Remove SESSION from `dtache--sessions', delete log and update database."
-  (let ((log (dtache--session-file session 'log)))
+(defun detached--db-remove-entry (session)
+  "Remove SESSION from `detached--sessions', delete log and update database."
+  (let ((log (detached--session-file session 'log)))
     (when (file-exists-p log)
       (delete-file log)))
-  (setq dtache--sessions
-        (assq-delete-all (dtache--session-id session) dtache--sessions ))
-  (dtache--db-update-sessions))
+  (setq detached--sessions
+        (assq-delete-all (detached--session-id session) detached--sessions ))
+  (detached--db-update-sessions))
 
-(defun dtache--db-update-entry (session &optional update)
-  "Update SESSION in `dtache--sessions' optionally UPDATE database."
-  (setf (alist-get (dtache--session-id session) dtache--sessions) session)
+(defun detached--db-update-entry (session &optional update)
+  "Update SESSION in `detached--sessions' optionally UPDATE database."
+  (setf (alist-get (detached--session-id session) detached--sessions) session)
   (when update
-    (dtache--db-update-sessions)))
+    (detached--db-update-sessions)))
 
-(defun dtache--db-get-session (id)
+(defun detached--db-get-session (id)
   "Return session with ID."
-  (alist-get id dtache--sessions))
+  (alist-get id detached--sessions))
 
-(defun dtache--db-get-sessions ()
+(defun detached--db-get-sessions ()
   "Return all sessions stored in the database."
-  (seq-map #'cdr dtache--sessions))
+  (seq-map #'cdr detached--sessions))
 
-(defun dtache--db-update-sessions ()
-  "Write `dtache--sessions' to database."
-  (let ((db (expand-file-name "dtache.db" dtache-db-directory)))
+(defun detached--db-update-sessions ()
+  "Write `detached--sessions' to database."
+  (let ((db (expand-file-name "detached.db" detached-db-directory)))
     (with-temp-file db
-      (insert (format ";; Dtache Session Version: %s\n\n" 
dtache-session-version))
-      (prin1 dtache--sessions (current-buffer)))))
+      (insert (format ";; Detached Session Version: %s\n\n" 
detached-session-version))
+      (prin1 detached--sessions (current-buffer)))))
 
 ;;;;; Other
 
-(defun dtache--dtach-arg ()
-  "Return dtach argument based on `dtache-session-mode'."
-  (pcase dtache-session-mode
+(defun detached--dtach-arg ()
+  "Return dtach argument based on `detached-session-mode'."
+  (pcase detached-session-mode
     ('create "-n")
     ('create-and-attach "-c")
     ('attach "-a")
-    (_ (error "`dtache-session-mode' has an unknown value"))))
+    (_ (error "`detached-session-mode' has an unknown value"))))
 
-(defun dtache--session-state-transition-update (session)
+(defun detached--session-state-transition-update (session)
   "Update SESSION due to state transition."
   ;; Update session
   (let ((session-size (file-attribute-size
                        (file-attributes
-                        (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)))
+                        (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)))
 
   ;; Send notification
-  (funcall dtache-notification-function session)
+  (funcall detached-notification-function session)
 
   ;; Update session in database
-  (dtache--db-update-entry session t)
+  (detached--db-update-entry session t)
 
   ;; Execute callback
-  (when-let ((callback (plist-get (dtache--session-action session) :callback)))
+  (when-let ((callback (plist-get (detached--session-action session) 
:callback)))
     (funcall callback session)))
 
-(defun dtache--kill-processes (pid)
+(defun detached--kill-processes (pid)
   "Kill PID and all of its children."
   (let ((child-processes
          (split-string
@@ -1142,96 +1142,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) (dtache--kill-processes pid)) child-processes)
+    (seq-do (lambda (pid) (detached--kill-processes pid)) child-processes)
     (apply #'process-file `("kill" nil nil nil ,pid))))
 
-(defun dtache--dtache-command (session)
-  "Return the dtache command for SESSION.
+(defun detached--detached-command (session)
+  "Return the detached command for SESSION.
 
 If SESSION is nonattachable fallback to a command that doesn't rely on tee."
-  (let* ((log (dtache--session-file session 'log t))
-         (begin-shell-group (if (string= "fish" (file-name-nondirectory 
dtache-shell-program))
+  (let* ((log (detached--session-file session 'log t))
+         (begin-shell-group (if (string= "fish" (file-name-nondirectory 
detached-shell-program))
                                 "begin;"
                               "{"))
-         (end-shell-group (if (or (string= "fish" (file-name-nondirectory 
dtache-shell-program)))
+         (end-shell-group (if (or (string= "fish" (file-name-nondirectory 
detached-shell-program)))
                               "end"
                             "}"))
          (redirect
-          (if (dtache--session-attachable session)
+          (if (detached--session-attachable session)
               (format "2>&1 | tee %s" log)
             (format "&> %s" log)))
-         (env (if dtache-env dtache-env (format "%s -c" dtache-shell-program)))
+         (env (if detached-env detached-env (format "%s -c" 
detached-shell-program)))
          (command
-          (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)))))
+          (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)))))
     (format "%s %s %s; %s %s" begin-shell-group env command end-shell-group 
redirect)))
 
-(defun dtache--env-mode (command)
-  "Return mode to run in `dtache-env' based on COMMAND."
+(defun detached--env-mode (command)
+  "Return mode to run in `detached-env' based on COMMAND."
   (if (seq-find (lambda (regexp)
                   (string-match-p regexp command))
-                dtache-env-plain-text-commands)
+                detached-env-plain-text-commands)
       'plain-text
     'terminal-data))
 
-(defun dtache--host ()
+(defun detached--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 dtache--ansi-color-tail ()
+(defun detached--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 dtache--update-session-time (session &optional approximate)
+(defun detached--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 (dtache--session-time session) :start))
+  (let* ((start-time (plist-get (detached--session-time session) :start))
          (end-time))
     (if approximate
         (setq end-time
               (time-to-seconds
                (file-attribute-modification-time
                 (file-attributes
-                 (dtache--session-file session 'log)))))
+                 (detached--session-file session 'log)))))
       (setq end-time (time-to-seconds)))
     `(:start ,start-time :end ,end-time :duration ,(- end-time start-time))))
 
-(defun dtache--create-id (command)
+(defun detached--create-id (command)
   "Return a hash identifier for COMMAND."
   (let ((current-time (current-time-string)))
     (secure-hash 'md5 (concat command current-time))))
 
-(defun dtache--dtache-env-message-filter (str)
-  "Remove `dtache-env' message in STR."
-  (replace-regexp-in-string "\n?Dtache session.*\n?" "" str))
+(defun detached--detached-env-message-filter (str)
+  "Remove `detached-env' message in STR."
+  (replace-regexp-in-string "\n?Detached session.*\n?" "" 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-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-detached-message-filter (str)
-  "Remove `dtache--dtach-detached-message' in STR."
-  (replace-regexp-in-string (format "\n?%s\n" dtache--dtach-detached-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--watch-session-directory (session-directory)
+(defun detached--watch-session-directory (session-directory)
   "Watch for events in SESSION-DIRECTORY."
-  (unless (alist-get session-directory dtache--watched-session-directories
+  (unless (alist-get session-directory detached--watched-session-directories
                      nil nil #'string=)
     (push
      `(,session-directory . ,(file-notify-add-watch
                               session-directory
                               '(change)
-                              #'dtache--session-directory-event))
-     dtache--watched-session-directories)))
+                              #'detached--session-directory-event))
+     detached--watched-session-directories)))
 
-(defun dtache--session-directory-event (event)
-  "Act on an EVENT in a directory in `dtache--watched-session-directories'.
+(defun detached--session-directory-event (event)
+  "Act on an EVENT in a directory in `detached--watched-session-directories'.
 
 If event is caused by the deletion of a socket, locate the related
 session and trigger a state transition."
@@ -1239,41 +1239,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 (dtache--db-get-session id))
-                  (session-directory (dtache--session-directory session)))
+                  (session (detached--db-get-session id))
+                  (session-directory (detached--session-directory session)))
 
         ;; Update session
-        (dtache--session-state-transition-update session)
+        (detached--session-state-transition-update session)
 
-        ;; Remove session directory from `dtache--watch-session-directory'
+        ;; Remove session directory from `detached--watch-session-directory'
         ;; if there is no active session associated with the directory
         (unless
-            (thread-last (dtache--db-get-sessions)
-                         (seq-filter (lambda (it) (eq 'active 
(dtache--session-state it))))
-                         (seq-map #'dtache--session-directory)
+            (thread-last (detached--db-get-sessions)
+                         (seq-filter (lambda (it) (eq 'active 
(detached--session-state it))))
+                         (seq-map #'detached--session-directory)
                          (seq-uniq)
                          (seq-filter (lambda (it) (string= it 
session-directory))))
           (file-notify-rm-watch
-           (alist-get session-directory dtache--watched-session-directories))
-          (setq dtache--watched-session-directories
-                (assoc-delete-all session-directory 
dtache--watched-session-directories)))))))
+           (alist-get session-directory detached--watched-session-directories))
+          (setq detached--watched-session-directories
+                (assoc-delete-all session-directory 
detached--watched-session-directories)))))))
 
-(defun dtache--db-directory-event (event)
-  "Act on EVENT in `dtache-db-directory'.
+(defun detached--db-directory-event (event)
+  "Act on EVENT in `detached-db-directory'.
 
-If event is cased by an update to the `dtache' database, re-initialize
-`dtache--sessions'."
+If event is cased by an update to the `detached' database, re-initialize
+`detached--sessions'."
   (pcase-let* ((`(,_descriptor ,action ,file) event)
-               (database-updated  (and (string= "dtache.db" file)
+               (database-updated  (and (string= "detached.db" file)
                                        (eq 'attribute-changed action))))
     (when database-updated)
-    (dtache--db-initialize)))
+    (detached--db-initialize)))
 
-(defun dtache--annotation-widths (sessions annotation-format)
+(defun detached--annotation-widths (sessions annotation-format)
   "Return widths for ANNOTATION-FORMAT based on SESSIONS."
-  (seq-map (lambda (it) (dtache--annotation-width sessions it)) 
annotation-format))
+  (seq-map (lambda (it) (detached--annotation-width sessions it)) 
annotation-format))
 
-(defun dtache--annotation-width (sessions annotation)
+(defun detached--annotation-width (sessions annotation)
   "Determine width for ANNOTATION based on SESSIONS."
   (let ((annotation-fun (plist-get annotation ':function))
         (width (plist-get annotation ':width)))
@@ -1286,22 +1286,22 @@ If event is cased by an update to the `dtache' 
database, re-initialize
 
 ;;;;; UI
 
-(defun dtache--metadata-str (session)
+(defun detached--metadata-str (session)
   "Return SESSION's metadata as a string."
   (string-join
-   (thread-last (dtache--session-metadata session)
+   (thread-last (detached--session-metadata session)
                 (seq-filter (lambda (it) (cdr it)))
                 (seq-map
                  (lambda (it)
                    (concat (symbol-name (car it)) ": " (cdr it)))))
    ""))
 
-(defun dtache--duration-str (session)
+(defun detached--duration-str (session)
   "Return SESSION's duration time."
-  (let* ((duration (if (eq 'active (dtache--session-state session))
-                       (- (time-to-seconds) (plist-get (dtache--session-time 
session) :start))
+  (let* ((duration (if (eq 'active (detached--session-state session))
+                       (- (time-to-seconds) (plist-get (detached--session-time 
session) :start))
                      (plist-get
-                      (dtache--session-time session) :duration)))
+                      (detached--session-time session) :duration)))
          (time (round duration))
          (hours (/ time 3600))
          (minutes (/ (mod time 3600) 60))
@@ -1310,92 +1310,92 @@ If event is cased by an update to the `dtache' 
database, re-initialize
           ((> time 60) (format "%sm %ss" minutes seconds))
           (t (format "%ss" seconds)))))
 
-(defun dtache--creation-str (session)
+(defun detached--creation-str (session)
   "Return SESSION's creation time."
   (format-time-string
    "%b %d %H:%M"
    (plist-get
-    (dtache--session-time session) :start)))
+    (detached--session-time session) :start)))
 
-(defun dtache--size-str (session)
+(defun detached--size-str (session)
   "Return the size of SESSION's output."
-  (if (eq 'active (dtache--session-state session))
+  (if (eq 'active (detached--session-state session))
       ""
       (file-size-human-readable
-       (dtache--session-size session))))
+       (detached--session-size session))))
 
-(defun dtache--status-str (session)
+(defun detached--status-str (session)
   "Return string if SESSION has failed."
-  (pcase (car (dtache--session-status session))
+  (pcase (car (detached--session-status session))
     ('failure "!")
     ('success "")
     ('unknown "")))
 
-(defun dtache--state-str (session)
+(defun detached--state-str (session)
   "Return string based on SESSION state."
-  (if (eq 'active (dtache--session-state session))
+  (if (eq 'active (detached--session-state session))
       "*"
     ""))
 
-(defun dtache--working-dir-str (session)
+(defun detached--working-dir-str (session)
   "Return working directory of SESSION."
   (let ((working-directory
-         (dtache--session-working-directory session)))
+         (detached--session-working-directory session)))
     (if-let ((remote (file-remote-p working-directory)))
         (string-remove-prefix remote working-directory)
       working-directory)))
 
-(defun dtache--host-str (session)
+(defun detached--host-str (session)
   "Return host name of SESSION."
-  (car (dtache--session-host session)))
+  (car (detached--session-host session)))
 
 ;;;; Minor modes
 
-(defvar dtache-shell-mode-map
+(defvar detached-shell-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
+    (define-key map (kbd detached-detach-key) #'detached-detach-session)
     map)
-  "Keymap for `dtache-shell-mode'.")
+  "Keymap for `detached-shell-mode'.")
 
 ;;;###autoload
-(define-minor-mode dtache-shell-mode
-  "Integrate `dtache' in `shell-mode'."
-  :lighter " dtache-shell"
+(define-minor-mode detached-shell-mode
+  "Integrate `detached' in `shell-mode'."
+  :lighter " detached-shell"
   :keymap (let ((map (make-sparse-keymap)))
             map)
-  (if dtache-shell-mode
-      (dolist (filter dtache-shell-mode-filter-functions)
+  (if detached-shell-mode
+      (dolist (filter detached-shell-mode-filter-functions)
         (add-hook 'comint-preoutput-filter-functions filter 0 t))
-     (dolist (filter dtache-shell-mode-filter-functions)
+     (dolist (filter detached-shell-mode-filter-functions)
         (remove-hook 'comint-preoutput-filter-functions filter t))))
 
 ;;;; Major modes
 
-(defvar dtache-log-mode-map
+(defvar detached-log-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
+    (define-key map (kbd detached-detach-key) #'detached-detach-session)
     map)
-  "Keymap for `dtache-log-mode'.")
+  "Keymap for `detached-log-mode'.")
 
 ;;;###autoload
-(define-derived-mode dtache-log-mode nil "Dtache Log"
-  "Major mode for `dtache' logs."
-  (when dtache-filter-ansi-sequences
+(define-derived-mode detached-log-mode nil "Detached Log"
+  "Major mode for `detached' logs."
+  (when detached-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 dtache-tail-mode-map
+(defvar detached-tail-mode-map
   (let ((map (make-sparse-keymap)))
-    (define-key map (kbd dtache-detach-key) #'dtache-detach-session)
+    (define-key map (kbd detached-detach-key) #'detached-detach-session)
     map)
-  "Keymap for `dtache-tail-mode'.")
+  "Keymap for `detached-tail-mode'.")
 
 ;;;###autoload
-(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)
+(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)
   (setq-local tramp-verbose 1)
   (setq-local auto-revert-remote-files t)
   (defvar revert-buffer-preserve-modes)
@@ -1403,13 +1403,13 @@ If event is cased by an update to the `dtache' 
database, re-initialize
   (auto-revert-set-timer)
   (setq-local auto-revert-verbose nil)
   (auto-revert-tail-mode)
-  (when dtache-filter-ansi-sequences
+  (when detached-filter-ansi-sequences
     (comint-carriage-motion (point-min) (point-max))
     (set-buffer-modified-p nil)
-    (add-hook 'after-revert-hook #'dtache--ansi-color-tail nil t)
+    (add-hook 'after-revert-hook #'detached--ansi-color-tail nil t)
     (ansi-color-apply-on-region (point-min) (point-max)))
   (read-only-mode t))
 
-(provide 'dtache)
+(provide 'detached)
 
-;;; dtache.el ends here
+;;; detached.el ends here
diff --git a/guix.scm b/guix.scm
index b76838f33f..30a1fb9459 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-dtache
+(define-public emacs-detached
   (let ((branch "remote")
         (commit "220f93dfa710474b4f9c9db0349a6082374f80c0")
         (revision "0"))
     (package
-     (name "emacs-dtache")
+     (name "emacs-detached")
      (version (git-version "0.0" revision commit))
      (source
       (origin
        (method git-fetch)
        (uri (git-reference
-             (url "https://gitlab.com/niklaseklund/dtache";)
+             (url "https://gitlab.com/niklaseklund/detached";)
              (commit commit)))
        (sha256
         (base32
@@ -41,15 +41,15 @@
      (arguments
       `(#:tests? #t
         #:test-command '("ert-runner")))
-     (home-page "https://gitlab.com/niklaseklund/dtache";)
+     (home-page "https://gitlab.com/niklaseklund/detached";)
      (synopsis "Dtach Emacs")
-     (description "Dtache allows a program to be seamlessly executed
+     (description "Detached allows a program to be seamlessly executed
 in an environment that is isolated from Emacs.")
      (license license:gpl3+))))
 
 (package
-  (inherit emacs-dtache)
-  (name "emacs-dtache-git")
-  (version (git-version (package-version emacs-dtache) "HEAD" %git-commit))
+  (inherit emacs-detached)
+  (name "emacs-detached-git")
+  (version (git-version (package-version emacs-detached) "HEAD" %git-commit))
   (source (local-file %source-dir
                       #:recursive? #t)))
diff --git a/test/dtache-test.el b/test/dtache-test.el
index 4f09fe0e31..7ad2c4abf3 100644
--- a/test/dtache-test.el
+++ b/test/dtache-test.el
@@ -1,4 +1,4 @@
-;;; dtache-test.el --- Tests for dtache.el -*- lexical-binding: t; -*-
+;;; detached-test.el --- Tests for detached.el -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 2020-2022  Free Software Foundation, Inc.
 
@@ -17,286 +17,286 @@
 
 ;;; Commentary:
 
-;; Tests for `dtache'.
+;; Tests for `detached'.
 
 ;;; Code:
 
 ;;;; Requirements
 
 (require 'ert)
-(require 'dtache)
+(require 'detached)
 
 ;;;; Support
 
-(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))
+(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))
      (unwind-protect
          (progn
-           (dtache-initialize-sessions)
+           (detached-initialize-sessions)
            ,@body)
        (delete-directory temp-directory t))))
 
-(cl-defun dtache-test--create-session (&key command host)
+(cl-defun detached-test--create-session (&key command host)
   "Create session with COMMAND running on HOST."
-  (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)
+  (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)
     session))
 
-(defun dtache-test--change-session-state (session state)
+(defun detached-test--change-session-state (session state)
   "Set STATE of SESSION."
   (pcase state
     ('activate
      (dolist (type `(socket log))
-       (with-temp-file (dtache--session-file session type))))
+       (with-temp-file (detached--session-file session type))))
     ('deactivate
-     (delete-file (dtache--session-file session 'socket)))
+     (delete-file (detached--session-file session 'socket)))
     ('kill
-     (delete-file (dtache--session-file session 'socket))
-     (delete-file (dtache--session-file session 'log)))))
+     (delete-file (detached--session-file session 'socket))
+     (delete-file (detached--session-file session 'log)))))
 
 ;;;; Tests
 
-(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)
+(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)
                (lambda (_)
                  session)))
-     (let* ((dtache-session-mode 'create-and-attach)
-            (expected `(,dtache-dtach-program
-                        "-c" ,(dtache--session-file session 'socket t)
-                        "-z" ,dtache-shell-program
+     (let* ((detached-session-mode 'create-and-attach)
+            (expected `(,detached-dtach-program
+                        "-c" ,(detached--session-file session 'socket t)
+                        "-z" ,detached-shell-program
                         "-c"
-                        ,(format "{ dtache-env terminal-data ls\\ -la; } 2>&1 
| tee %s"
-                                 (dtache--session-file session 'log t))))
+                        ,(format "{ detached-env terminal-data ls\\ -la; } 
2>&1 | tee %s"
+                                 (detached--session-file session 'log t))))
             (expected-concat (format "%s -c %s -z %s -c %s"
-                                     dtache-dtach-program
-                                     (dtache--session-file session 'socket t)
-                                     dtache-shell-program
+                                     detached-dtach-program
+                                     (detached--session-file session 'socket t)
+                                     detached-shell-program
                                      (shell-quote-argument
-                                      (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"))
+                                      (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"))
             (expected-concat (format "%s %s; %s -a %s -r none"
-                                     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 ()
+                                     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 ()
   ;; No annotators
-  (let ((dtache-metadata-annotators-alist '()))
-    (should (not (dtache-metadata))))
+  (let ((detached-metadata-annotators-alist '()))
+    (should (not (detached-metadata))))
 
   ;; Two annotators
-  (let ((dtache-metadata-annotators-alist
+  (let ((detached-metadata-annotators-alist
          '((git-branch . (lambda () "foo"))
            (username . (lambda () "bar"))))
         (expected '((username . "bar")
                     (git-branch . "foo"))))
-    (should (equal (dtache-metadata) expected))))
+    (should (equal (detached-metadata) expected))))
 
-(ert-deftest dtache-test-session-file ()
+(ert-deftest detached-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 (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))))
+             (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))))
 
   ;; 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 (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)))))
+             (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)))))
 
-(ert-deftest dtache-test-host ()
+(ert-deftest detached-test-host ()
   (cl-letf (((symbol-function #'system-name) (lambda () "localhost")))
-    (should (equal '("localhost" . local) (dtache--host))))
+    (should (equal '("localhost" . local) (detached--host))))
   (let ((default-directory "/ssh:remotehost:/home/user/git"))
-    (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)))
+    (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)))
               (host '("localhost" . local))
-              ((symbol-function #'dtache--host) (lambda () host)))
+              ((symbol-function #'detached--host) (lambda () host)))
      ;; One inactive, one missing, one active
-     (dtache-test--change-session-state session1 'deactivate)
-     (dtache-test--change-session-state session2 'kill)
-     (dtache--cleanup-host-sessions host)
-     (dtache--db-get-sessions)
+     (detached-test--change-session-state session1 'deactivate)
+     (detached-test--change-session-state session2 'kill)
+     (detached--cleanup-host-sessions host)
+     (detached--db-get-sessions)
      (should (seq-set-equal-p
-              (dtache--db-get-sessions)
+              (detached--db-get-sessions)
               `(,session1 ,session3))))))
 
-(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))))
+(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))))
 
 ;;;;; Database
 
-(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-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-remove-session ()
-  (dtache-test--with-temp-database
+(ert-deftest detached-test-db-remove-session ()
+  (detached-test--with-temp-database
    (let* ((host '(:type local :name "host"))
-          (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))
+          (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))
           (copy))
-     (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/"
+     (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/"
                                                 :working-directory 
"/home/user/"
                                                 :command "ls -la"
                                                 :attachable t
                                                 :env-mode 'terminal-data
                                                 :id 'foo123))
-        (nonattachable-session (dtache--session-create :directory 
"/tmp/dtache/"
+        (nonattachable-session (detached--session-create :directory 
"/tmp/detached/"
                                                 :working-directory 
"/home/user/"
                                                 :command "ls -la"
                                                 :attachable nil
                                                 :env-mode 'plain-text
                                                 :id 'foo123)))
-    ;; 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")))))
+    ;; 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")))))
 
 ;;;;; String representations
 
-(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-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-creation-str ()
+(ert-deftest detached-test-creation-str ()
   ;; Make sure to set the TIMEZONE before executing the test to avoid
   ;; differences between machines
   (cl-letf* (((getenv "TZ") "UTC0")
-             (session (dtache--session-create :time `(:start 
1620463748.7636228))))
-    (should (string= "May 08 08:49" (dtache--creation-str session)))))
+             (session (detached--session-create :time `(:start 
1620463748.7636228))))
+    (should (string= "May 08 08:49" (detached--creation-str session)))))
 
-(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-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-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-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-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-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-working-dir-str ()
+(ert-deftest detached-test-working-dir-str ()
   (should
    (string= "/home/user/repo"
-            (dtache--working-dir-str
-             (dtache--session-create :working-directory 
"/ssh:remote:/home/user/repo"))))
+            (detached--working-dir-str
+             (detached--session-create :working-directory 
"/ssh:remote:/home/user/repo"))))
   (should
    (string= "~/repo"
-            (dtache--working-dir-str
-             (dtache--session-create :working-directory "~/repo")))))
+            (detached--working-dir-str
+             (detached--session-create :working-directory "~/repo")))))
 
 ;;;;; Output filters
 
-(ert-deftest dtache-test-dtach-eof-message-filter ()
+(ert-deftest detached-test-dtach-eof-message-filter ()
   (let ((str "
 [EOF - dtach terminating]
 user@machine "))
     (should (string= "
user@machine " (dtache--dtach-eof-message-filter str)))))
 
-(ert-deftest dtache-test-dtach-detached-message-filter ()
+(ert-deftest detached-test-dtach-detached-message-filter ()
   (let ((str "
 [detached]
 user@machine "))
     (should (string= "
user@machine " (dtache--dtach-detached-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)))))
+(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)))))
 
-(provide 'dtache-test)
+(provide 'detached-test)
 
-;;; dtache-test.el ends here
+;;; detached-test.el ends here



reply via email to

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