[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache 53cc38b385 137/158: Update Customization section
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache 53cc38b385 137/158: Update Customization section in README |
Date: |
Wed, 19 Jan 2022 18:58:06 -0500 (EST) |
branch: externals/dtache
commit 53cc38b385b5a3a3322e6898e32d51f56abe4320
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Update Customization section in README
---
README.org | 43 +++++++++++++++++++++++++++++++++----------
dtache.el | 4 ++--
2 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/README.org b/README.org
index f9f8dd24ab..a922c5d374 100644
--- a/README.org
+++ b/README.org
@@ -233,13 +233,36 @@ By default =dtache= uses the echo area to notify the user
when a session has fin
#+end_src
* Customization
-** TODO Customizable variables
-
-Add a table of all customizable variables, with explenations.
+** Customizable variables
+
+The package provides the following customizable variables.
+
+| Name | Description
|
+|-------------------------------+--------------------------------------------------------------|
+| dtache-session-directory | A host specific directory to store sessions
in |
+| dtache-db-directory | A localhost specific directory to store the
database |
+| dtache-dtach-program | Name or path to the =dtach= program
|
+| dtache-shell-program | Name or path to the =shell= that =dtache=
should use |
+| dtache-timer-configuration | Configuration of the timer that runs on
remote hosts |
+| dtache-env | Name or path to the =dtache-env= script
|
+| dtache-annotation-format | A list of annotations that should be present
in completion |
+| dtache-max-command-length | How many characters should be used when
displaying a command |
+| dtache-tail-interval | How often =dtache= should refresh the output
when tailing |
+| dtache-nonattachable-commands | A list of commands that should be considered
nonattachable |
+| dtache-notification-function | Specifies which function to issue
notifications with |
+
+Apart from those variables there is also the different =action= variables,
which can be configured differently depending on the origin of the session.
+
+| Name | Description
|
+|-------------------------------------+---------------------------------------------------------------|
+| dtache-shell-command-session-action | Actions for sessions launched with
=dtache-shell-command= |
+| dtache-eshell-session-action | Actions for sessions launched with
=dtache-eshell-send-input= |
+| dtache-shell-session-action | Actions for sessions launched with
=dtache-shell-send-input= |
+| dtache-compile--session-action | Actions for sessions launched with
=dtache-compile= |
** Completion annotations
-The user can customize the appearance of annotations in =dtache-open-session=
by modifying the =dtache-annotation-format=. The default annotation format is
the following.
+Users can customize the appearance of annotations in =dtache-open-session= by
modifying the =dtache-annotation-format=. The default annotation format is the
following.
#+begin_src elisp :results none
(defvar dtache-annotation-format
@@ -256,7 +279,7 @@ The user can customize the appearance of annotations in
=dtache-open-session= by
** Status deduction
-The users are encouraged to define the =dtache-env= variable. It should point
to the =dtache-env= script, which is provided in the repository. This script
allows sessions to communicate the status of a session when it transitions to
inactive. When configured properly =dtache= will be able to set the status of a
session to either =success= or =failure=.
+Users are encouraged to define the =dtache-env= variable. It should point to
the =dtache-env= script, which is provided in the repository. This script
allows sessions to communicate the status of a session when it transitions to
inactive. When configured properly =dtache= will be able to set the status of a
session to either =success= or =failure=.
#+begin_src elisp :lexical t :results none
(setq dtache-env "/path/to/repo/dtache-env")
@@ -283,18 +306,18 @@ Next add the annotation function to the
=dtache-metadata-annotators-alist= toget
(setq dtache-metadata-annotators-alist '((branch .
my/dtache--session-git-branch))
#+end_src
-** TODO Redirect only
+** Nonattachable commands
+
+To be able to both attach to a dtach session as well as logging its output
=dtache= relies on the usage of =tee=. However it is possible that the user
tries to run a command which involves a program that doesn't integrate well
with tee. In those situations the output could be delayed until the session
ends, which is not preferable.
-Some programs doesn't play well with =tee=, which =dtache= relies upon to
redirect the output both to standard out as well as to file. If you encounter a
situation where output from a session is only visible once it has become
inactive, the command you launched should instead be using =redirect only=. To
list a command to run with redirect only can be done by adding a regexp to
=dtache-redirect-only-regexps=.
+For these situations =dtache= provides the =dtache-nonattachable-commands=
variable. This is a list of regular expressions. Any command that matches any
of the strings will be getting the property =attachable= set to false.
#+begin_src elisp :lexical t :results none
(setq dtache-nonattachable-commands '("^ls"))
#+end_src
-Here a command beginning with =ls= would from now on be using redirect only.
+Here a command beginning with =ls= would from now on be considered
nonattachable.
-This should be renamed =not attachable= or similar.
-* Tips & Tricks
** Remote support
The =dtache= package supports
[[https://www.gnu.org/software/emacs/manual/html_node/elisp/Connection-Local-Variables.html][Connection
Local Variables]] which allows the user to customize the variables used by
=dtache= when running on a remote host. This example shows how the following
variables are customized for all remote hosts.
diff --git a/dtache.el b/dtache.el
index 35f6d19fa9..b00a356f70 100644
--- a/dtache.el
+++ b/dtache.el
@@ -106,7 +106,7 @@
:type 'integer
:group 'dtache)
-(defcustom dtache-shell-command-action
+(defcustom dtache-shell-command-session-action
'(:attach dtache-attach
:view dtache-view-dwim
:run dtache-shell-command)
@@ -263,7 +263,7 @@ Optionally SUPPRESS-OUTPUT."
nil 'dtache-shell-command-history)
current-prefix-arg))
(let* ((dtache-session-origin 'shell-command)
- (dtache-session-action dtache-shell-command-action)
+ (dtache-session-action dtache-shell-command-session-action)
(dtache--current-session (dtache-create-session command)))
(dtache-start-session command suppress-output)))
- [elpa] externals/dtache 3029774325 093/158: Update README, (continued)
- [elpa] externals/dtache 3029774325 093/158: Update README, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache b779e7071b 104/158: Improve dtache-detach-dwim, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 051968ec99 111/158: Update dtache extension headers, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache e1ebc053bb 116/158: Avoid saving history file for dtache-shell-command, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 561f67d075 121/158: Make remove entry delete session log, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache b285ac5a0f 128/158: Update version schema for sessions, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 0e0e8c6394 126/158: Update docstring, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 31d7ffd5f7 131/158: Rename redirect-only to attachable, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3da7747fa1 130/158: Update Versions/Contributions/Credits, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 2337bb132f 132/158: Update mode symbols, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 53cc38b385 137/158: Update Customization section in README,
ELPA Syncer <=
- [elpa] externals/dtache 02ee0a9487 140/158: Utilize filenotify for remote sessions, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 90c3d1dd90 147/158: Indent all package files, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 89df9371db 145/158: Use timer only on local macOS host, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache c91ce5fd9a 151/158: Fix error on remote hosts with dtache-attach, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 3d89804c20 155/158: Improve dtache--update-session, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 6037219c0a 018/158: Update documentation, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 199c4cffaa 070/158: Update incorrect regexp for dtache-message, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache b2b2b6ecd1 138/158: Fix error in dtache-attach, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 28cb384d96 143/158: Update attach with fallback, ELPA Syncer, 2022/01/19
- [elpa] externals/dtache 7ddd1e29ef 146/158: Fix error on remote hosts, ELPA Syncer, 2022/01/19