Repository navigation
donkey 1.12.0 — a program's buffer keeps its own keys, and DONKEY keeps four'ish
1.11.0 answered "NORMAL state owns the alphabet in a buffer a program
made" by stepping aside altogether: Dired, Ibuffer, Magit and the
tabulated lists went on donkey-excluded-modes, which gave the mode
its keys back and took h j k l with them. This release is the middle
that was missing, and it comes in two sizes. In a list or a viewer —
Dired, Ibuffer, Occur, the menus, twenty-one modes in all — DONKEY
holds five keys, h j k l and SPC, and the mode keeps its
whole alphabet. In the eighteen that are text to read — help, Man,
apropos, compilation — it holds about two dozen, because there is
nothing in those buffers to lose. The modeline says DONKEY[S] in
both, and thirty-nine modes ship a section.
Changed — you will notice these
jandkwalk the listing andlopens what is under the cursor
in Dired, Ibuffer and the tabulated lists. They came off
donkey-excluded-modesand are support modes instead, sod,m,
x,gand the rest of the mode's alphabet are exactly as they were
in 1.11.0, and the four motion keys work again.hgoes up a
directory in Dired.dno longer deletes inhelp-mode,Man-mode,occur-mode,
compilation-mode,grep-modeandorg-agenda-mode, and neither do
the other editing letters. NORMAL state used to be on in those, which
meant DONKEY owned the alphabet; they are support modes now. Nothing
was at risk — the buffers are read-only, so every editing key was
refused — but the mode's own keys were unreachable, and now they are
not.SPCis the leader in a support mode as well as in NORMAL state, and
it is the same keymap. Anything you have hung underSPCreaches
Dired, help, Man and the rest without being named a second time. The
mode's ownSPC, usuallyscroll-up-command, isC-vas it always
was, andS-SPCis untouched.gis a prefix in the eighteen modes that take the reading keys —
Man-mode,help-mode,apropos-mode,compilation-modeand the
rest — becauseg gandg ego there. Wheregwas
revert-bufferorrecompilethe section carries it onR.w,b,y,G, the mark run and?work in those eighteen —
about two dozen keys in all, against five in the other twenty-one.
They are buffers of text to read and copy, so the reading half of
NORMAL state is there and nothing that types is.C-gstill quits:
it delegates tokeyboard-quitwherever NORMAL state is off.lgoes to the error in a compilation buffer, into the entry in an
archive or a tar file, to the occurrence in an Occur buffer, and to
the reference in an Xref buffer. Twenty-four of the thirty-nine
sections givehorla meaning; where none does they are
backward-charandforward-char.
Added
donkey-support-modes, the table of sections. A section names the
mode, optionally a package, and the(CHARACTER . COMMAND)pairs
that say what a key means there. A mode matches by derivation as well
as by name, and the first section it matches answers, so write a
specific mode before the general one it derives from.donkey-support-mode-exceptions, for a buffer that looks like a
program's but is one you type in.occur-edit-modeis the case it
ships for.donkey-key-packages, a named list of sequences a section can ask
for in one word.proseis the only one that ships: the reading half
of NORMAL state, forty-five sequences.
Under the hood
- The rule that handed individual letters back to a major mode was
built, measured and then deleted. Every buffer it would have applied
to is a support mode, decided by its section, so it found nothing;
the options it introduced never appeared in a release. - Options read from
post-command-hookare coerced rather than
trusted, a section cannot name a command that types, and the two
caches that decide a buffer's state are keyed on the same inputs. - 1,475 tests, up from 1,426.
Upgrading
Nothing to do. If you put dired-mode, ibuffer-mode or
tabulated-list-mode on donkey-excluded-modes yourself, your setting
still wins and those buffers stay DONKEY[E]; remove them to get the
four motion keys back. Info-mode is still excluded, as it was in
1.11.0.