Shared state between emacsclients
- Dominant language
- Emacs Lisp
- Stars
- 3.9k
- Forks
- 307
- PR merge metrics
- No merged PRs in 30d
Description
# Issue type
- Bug report
- Enhancement request
(could be considered as either, though I'm leaning towards enhancement request)
# Environment
Emacs version: `GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.14, cairo version 1.16.0)` (from https://github.com/masm11/emacs for wayland support, but issue is not exclusive to this)
Operating System: NixOS unstable 20.09pre221706.b61999e4ad6 (Nightingale)
Evil version: Evil version 1.14.0
Evil installation type: MELPA (via nixpkgs)
Graphical/Terminal: both
Tested in a `make emacs` session (see [CONTRIBUTING.md](https://github.com/emacs-evil/evil/blob/master/CONTRIBUTING.md#bug-reports)): Yes
# Reproduction steps
- Start Emacs (`make emacs`)
- M-x start-server
- (in a terminal) `emacsclient -c`
- Enter insert mode in the scratch buffer
# Expected behavior
The main instance is still in normal mode
# Actual behavior
The main instance has also entered insert mode
# Further notes
This hinders collaboration through a shared server — point is distinct from client to client, but mode is not.
This does presumably behave as intended, but it would nevertheless be really nice to be able to have multiple people editing the same document with the good old vim controls and not sharing a mode state.
Of course, things like the mark and kill ring / registers are also shared between clients, which makes nontrivial editing not much better than before if the mode were separated; what would be _really_ cool is if the whole evil state could be (optionally?) per-client; but I'm not familiar enough with emacs's or evil's internals to be certain.
This is of course a bit of a wishlist — but it could enable some really Nice Things.
Contributor guide
Research direction
Start with the reproduction steps in the issue: run `make emacs`, start the server, open an `emacsclient`, and enter insert mode. Read CONTRIBUTING.md's bug-report guidance and inspect how Evil state is associated with Emacs clients. Done means clients can optionally maintain independent Evil modes without unexpectedly changing the main instance's mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- emacs-lisp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100