Hello,
a headless session should execute a command without opening a client. For example “%s d :w”.
tl;dr
On system startup a headless kakoune session is startet on my system. It loads a specific file, at a specific location (i.e. a notepad in markdown syntax). Pressing <super+n> sends a command which opens a kakoune client connected to the headless session.
Now say I suddenly have to leave for an urgent cocktailparty and shutdown my system suddenly without saving my notes in the kakoune session. Then my ingenious thoughts on general laser hyper relativity would go amiss. You see the conundrum.
This problem can be solved by routinely saving the files in the headless session. Or to bind a saving command to a keycombination like <a - f4>. Now how to do that is a totally different question and here I falter.
Best Regards
– Hendrik