dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

README.md (4434B)


      1 [![License GPL 3][badge-license]](http://www.gnu.org/licenses/gpl-3.0.txt)
      2 [![MELPA](http://melpa.org/packages/sesman-badge.svg)](http://melpa.org/#/sesman)
      3 [![MELPA Stable](http://stable.melpa.org/packages/sesman-badge.svg)](http://stable.melpa.org/#/sesman)
      4 [![Build Status](https://travis-ci.org/vspinu/sesman.svg?branch=master)](https://travis-ci.org/vspinu/sesman)
      5 
      6 ## Generic Session Manager for Emacs
      7 
      8 Sesman provides facilities for session management and interactive session association with the current contexts (e.g. project, directory, buffers). While sesman can be used to manage arbitrary "sessions", it primary targets the Emacs based IDEs ([CIDER][], [ESS][], [Geiser][], [Robe][], [SLIME][] etc.)
      9 
     10 For Emacs based IDEs, session are commonly composed of one or more physical processes (sub-processes, sockets, websockets etc). For example in the current implementation of [CIDER][] a session would be composed of one or more sesman connections (Clojure or ClojureScript). Each [CIDER][] connection consists of user REPL buffer and two sub-processes, one for user eval communication and another for tooling (completion, inspector etc).
     11 
     12 ### Concepts:
     13 
     14   - "session" is a list of the form `(session-name ..other-stuff..)` where `..other-stuff..` is system dependent.
     15   - "system" is generic name used for a tool which uses sesman (e.g. `CIDER`, `ESS` etc)
     16   - "contexts" are Emacs objects which describe current context. For example `current-buffer`, `default-directory` and `project-current` are such contexts. Context objects are used to create associations (links) between the current context and sessions. At any given time the user can link (unlink) sessions to (from) contexts. By default there are three types of contexts - buffer, directory and project, but systems can define their own specialized context types..
     17   
     18 Sesman is composed of two parts, user interface, available as a sesman map and menu, and system interface consisting of a few generics and API functions.
     19 
     20 ### User Interface
     21 
     22 Consists of 
     23 
     24  - lifecycle management commands (`sesman-start`, `sesman-kill` and `sesman-restart`), and
     25  - association management commands (`sesman-link-with-buffer`, `sesman-link-with-directory`, `sesman-link-with-project` and `sesman-unlink`). 
     26 
     27 From the user's prospective the work-flow is as follow. Start a session, either with `sesman-start` (`C-c C-s C-s`) or some of the system specific commands (`run-xyz`, `xyz-jack-in` etc). On startup each session is automatically associated with the least specific context (commonly a project). In the most common case the user has only one session open per project. In such case, no ambiguity arises when a system retrieves the current session. If multiple sessions are associated with the current context the ambiguity is automatically resolved through the system specific relevance mechanism. Usually it is the most recently used session.
     28 
     29 By default links with projects and directories are many-to-many in the sense that any session can be linked to multiple context and each context can be associated with multiple sessions. Buffers instead are 1-to-many. One buffer can be associated with only one session and a session can be associated with multiple buffers. This behavior is controlled by a custom `sesman-single-link-context-types`.
     30 
     31 ### System Interface
     32 
     33 Consists of several generics, of which only first three are strictly required:
     34 
     35   - `sesman-start-session`
     36   - `sesman-kill-session`
     37   - `sesman-restart-session`
     38   - `sesman-session-info`
     39   - `sesman-context-types`
     40   - `sesman-more-relevant-p`
     41   
     42 Sesman also provides [a range of utility functions][system api] functions to manipulate sessions, links and session components. Systems can register entire sessions with `sesman-register` or add/remove objects one by one with `sesman-add-object`/`sesman-remove-object`.
     43 
     44 Systems should link sesman map into their key-maps (ideally on `C-c C-s`) and install sesman menu with `sesman-install-menu`. 
     45 
     46 ### Implementations
     47 
     48   - [CIDER implementation](http://docs.cider.mx/en/latest/managing_connections/)
     49 
     50 <!-- , which is a good mnemonic and is already used in CIDER and ESS. -->
     51 
     52 
     53 [cider]: https://github.com/clojure-emacs/cider
     54 [ess]: https://ess.r-project.org/
     55 [geiser]: https://github.com/jaor/geiser
     56 [robe]: https://github.com/dgutov/robe
     57 [slime]: https://common-lisp.net/project/slime/
     58 
     59 [badge-license]: https://img.shields.io/badge/license-GPL_3-green.svg