#+title: detached.el - Changelog
#+author: Niklas Eklund
#+language: en

* Development

- Add =edit-and-run= command, which is convenient when a session command needs to be tweaked before re-running.
- Fix bug caused by incorrect adaptation to detached-local-session
- Implement mean and std duration for sessions
- Make tail commands work on macOS
- Rewrite core code related to creating, starting, and attaching to sessions.

* Version 0.9.2 (2022-11-01)

- Use =display-buffer= in =detached-list= in order for users to more easily customize the display of the buffer.
- Add concept of =filters= to quickly apply a set of narrow criteria.
- Speed up initialization of sessions.
- Narrow criteria are persistent and applied when resuming detached list sessions.
- Add narrow criterion which searches through the output of all sessions in detached list which matches a regexp.
- Add database hook in order for detached list to update automatically when a session is updated.
- Add annotation property to session. This allows users to add a custom annotation to a session, see it as a possibility to document a session for the future.
- Implement mode-line indicator for criteria in =detached-list=
- Add command for initializing a session directory
- Add integration with =nano-modeline=
- Add =detached-describe-session= command
- Add unique narrow criteria
  
* Version 0.9.1 (2022-09-22)

- Fix bug with detaching in =shell=

* Version 0.9.0 (2022-09-16)

- Add =detached-list= user interface. It is an alternative user interface where it is easier to manage the =detached= sessions. Commands to mark, toggle, and narrow based on different criteria are available.
- Rework session initialization and validation. This also improves the way Emacsen co-operates in term of updating sessions that become inactive. The new approach is described under =architecture= in =notes.org=.
- Improved handling of remote sessions. The package will only try to initialize sessions that are accessible when package loads. Other active sessions it will wait until a remote connection has been established before they are being watched.

* Version 0.8.1 (2022-09-08)

- Adjust default location for sessions, from a directory under =temporary-file-directory= to =user-emacs-directory=. This change is for security reasons in case the user shares the computer with other users. By default sessions will not be removed on reboots, the user can use =M-x detached-delete-sessions= to clear old sessions manually.
- Fix bug when initializing =detached-session-directory=, this worked incorrectly when users initialized =detached= while being on a remote host.
- Add an =initial-mode= property to a session. This enables sessions that were created using =create= mode instead of =create-and-attach= to inherit this property when a session is being rerun.

* Version 0.8.0 (2022-09-02)

- Change to semantic versioning
- Update expectations on =detached-terminal-data-command= command, user should now set it manually. This approach works better since it doesn't cause any conflict when remote host and local host operating system differs.
- Improved handling of remote sessions. The package will not eagerly try to watch sessions, it waits until user requests or that it finds an open connection to the remote host.
- Detached tries to guess the =detached-terimal-data-command= based on operating system, if that's not possible the user needs to set it manually. Currently detection of =gnu/linux= and =darwin= is supported.
- Detached now relies on the tool =tail= in order to attach to degraded sessions. That means that =dtach= and =tail= are required to properly use the package.
- Rename non-attachable sessions to degraded sessions.
- Remove tail command, favor using =attach= or =view=.
- Improve support for Emacsen. The PID of all detached Emacsen are registered, this is done to be able to promote one Emacs to primary, which has the responsibility to update the database.
- Add command to open a session's log file in =dired=.
- Remove the need for =detached-shell-history-file=, the advice is updated to figure out the history file based on the shell program.
- Remove the need for external =detached-env= script, the logic of the script is moved into the package instead.
- Add =detached-terminal-data-command= which makes it possible for users to tweak the command used to run =script=.
- Bug fix: Since the inception of the package there had been a bug which only occurred on remote hosts, and which was caused by =shell= not properly handling being adviced.
- The package makes sure to let-bind the kill-ring before killing input in different modes, previously the killed text unintentionally ended up in users kill-ring.
- Notification using the =alert= package is now present in the =detached-extra.el= and therefore doesn't need to be manually added by users

*  Version 0.7 (2022-05-21)

- Rename =dtache= to =detached.el=, source code has been moved to https://git.sr.ht/~niklaseklund/detached.el
- Introduce =dtache-init.el= and move integration of other packages there. The integration now becomes even simpler for users of =dtache=.
- Rewrite =dtache= to enable the package to lazy load and not force users to load it when starting Emacs.
- Make completion of sessions adapt to the current dtache sessions. All of the sessions will be used to determine an an appropriate width for the command width as well as each individual annotation. Format has updated in =dtache-annotation-format= and a =dtache-command-format= has been added, this supersedes the =dtache-max-command-lenght=.
- 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=.

* 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.

* 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.

* 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.

* 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.
- 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=.
- 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

* Version 0.1 (2021-12-15)

- Initial release
