Repository navigation
donkey 1.6.0 — M is m w
Mark run mode shipped in 1.5.0 with the word M marks treated as a head start: something already selected when you arrived, so the first letter still marked afresh. It reads better on paper than under the fingers — press M, press w, and the word you could already see was simply re-marked. Nothing happened. Only the second letter grew.
The word is the run's first press now.
The rule is one sentence
M is m w, and each letter after it is one more m-prefixed press.
That is the whole of it. M w is two words. M b is the word and the one before it. M s is the word grown to the end of its sentence — the whole sentence is m s and then M. M C-u 3 w is four words. M w b selects what m w m w m b selects.
Every M sequence in the 1.5.0 notes counts one press further along. If you learned them there:
1.5.0 │ 1.6.0
M w w b │ M w b
M w p │ M p
M w g h g l │ M g h g l
M w m w w │ M m w w
M w * w │ M * w
The old spellings still work — they just take one word more than they used to.
Why it was a head start, and why it isn't
The head start was meant to keep the letters honest: leave them marking afresh and M w w b spells m w m w m b exactly. But the motion keys are family members, so M l w and M * w did grow from the word. It was a press to some keys and none to others, and the one place that showed was the first letter after M — the most-pressed key in the mode.
J and K from the word
They reach an end apiece. From a word, M J grows to the end of its line and M K back to the start, so M J K is the whole line — from anywhere in it, in either order. M J K d removes the line outright; M J d does it only when the cursor is on the line's first word. V then M adopts a whole line, and where M found no word to mark either key still marks the current line fresh.
Two keys select something different
- M reaches the way m w reaches. From the gap between two words it marks the word behind, where it used to arrive empty. There was no reading under which the two keys should disagree.
- m W marks by symbol, not by sexp. In the gap of a key sequence quoted in prose it refused with a name directly behind it; on the name it took the quote along; behind #'bar it skipped to the symbol before. Both ends shed punctuation syntax now, while ', ` and # stay with the form they prefix — 'bar still marks as 'bar.
m i ( was editing your buffer
With the cursor on a delimiter, m i and m a take the pair from the buffer and are finished — so the ( typed as the third key ran as a command of its own. Every delimiter is bound to donkey-wrap-region, which inserts. m i ( on call(alpha) end gave you call((alpha) end, silently, from a sequence meant to select. Both halves of every pair, both commands. It turned up in a sweep of one rule — a selection key may not modify the buffer — over 7840 key sequences; fifty-two edited, every one of them this.
The press is swallowed once, so pressing the delimiter a second time still wraps the selection you just made.
Also fixed
- Closing delimiters at the prompt: m i ) means what m i ( means, m a ] what m a [ does. The cursor sitting on either half was always understood; the typed key is now too.
- A refused mark puts the cursor back. m w, m W, m s, m p and their backward companions walk point while they search and used to report from wherever the search gave up — on whitespace, all four sentence and paragraph keys came to rest at position 1 from a press at 3.
- m i / m a on an empty pair leaves the cursor where it was.
- A negative count no longer takes the separator with it on m w, and m W with one no longer reaches past the point it counted from.
- The mark run reminder is not painted over a count while you type it.
- Disabling donkey-mode leaves nothing behind: a pre-command-hook entry, a flag and a timer, all dating to the first release, are swept now.
- The m i / m a prompt names donkey-mark-pair-delimiters instead of reciting it — C-h v shows the pairs in force with your own marked as customized.
Full notes: CHANGELOG.org