Repository navigation
donkey 1.17.2 — edits where two features meet no longer change text you did not touch
A bug fix release. Every part of the package was gone over for what
happens where two features meet -- a fold under a line selection, an
input method or overwrite mode while typing at a split, read-only text
under an edit at many places, two clients of one daemon, a mistyped
setting -- and what turned up is fixed here, in sixty-two changes,
most of them in places that changed or lost text without saying so.
Fixed -- you will notice these
),]and"in overwrite mode withdonkey-pair-modeon: a
closer typed where two stood deleted the second, so)before the
))off(g(x))leftf(g(x), and an opener typed over text wrote
a closer that pushed the line along. Pairing now does nothing in
overwrite mode: a delimiter replaces the character under the cursor,
as in plain Emacs.V,J,Kon a folded Org or outline heading: a line selection
counted the lines hidden in the fold, soV K dfrom the heading
below a folded one deleted a hidden body line, andV don the
folded heading left its body under the heading above. A folded
heading and its body are now one line, askill-whole-linetakes
it, andm lbanks them together.A,a,x,d,con a folded heading:Atyped at the end of
the hidden body, andx/djoined or deleted hidden text where
Org's ownC-drefuses.Aandanow type at the end of the
heading, andx,dandcwith a count refuse over hidden text.t,T: a cursor could land on a line hidden in a fold, and typing
then went into the hidden text. They now pass over folded lines, as
jandkdo.O: the line it opened above was re-indented as well as the new
one, so a Makefile recipe lost its tab, a Python statement after a
block moved into the block, and an indented line in Text mode lost
its indentation. Only the new line is indented now, at the cursors
too.p: every press put the clipboard's text on the kill ring again, so
ythenp p pleft four identical kills,C-u 200 ppushed every
older kill off the ring, andM-yafterpfound the duplicate.
The clipboard's text goes on the ring once now.RETinhexl-mode: one press wrote a carriage-return byte over the
byte at point. Inpicture-modeit broke the line. It does nothing
in either now.RETon the blank line under a TODO heading toggled the heading, and
could add a CLOSED line. OnlyRETon the heading line itself
toggles it now.Con an Org source block's#+begin_srcor#+end_srcline
commented a line of code instead; it now refuses there, and a
selection comments exactly the lines of code it covers.x,d,y,con an accented letter written with a combining
mark, or an emoji built from several joined ones: they took one code
point and left the rest standing. A character drawn as one is taken
as one now, asC-dtakes it.Pover aVselection: the rectangle's last row was glued onto the
line after the selection. The rows now replace the selected lines as
lines of their own, aspreplaces them.C-x C-xin aVselection silently ended it, soythen lost the
last newline anddleft an empty line behind. It now trades the
selection's ends, asodoes in Vim, andC-SPCends it.m i,m aone level out (a second press, orC-u 2) picked the
sibling pair where a closer sat right before the inner opener:
m i { m iin\frac{a}{b}selecteda. They now find the pair
around.m I,m Afrom inside a string or comment refused, or picked the
parens inside a regexp string. They now mark the expression around
the string.m Wwith a count past the end of a list raised a scan error and
moved the cursor; it now marks what there is and stops, asm w
does.- In a split,
M-u,M-lorM-creaching past a place while writing
corrupted undo (ugave backa foo bar, with a second space) and
could delete text at the other places. They undo exactly now. - In a split,
revert-bufferwhile writing made the nextufail and
leave the buffer nearly empty. The revert now ends the writing with
undo whole. - In a split, an edit made from an indirect buffer (
C-x 4 c) while
writing could never be undone, and text typed into another place
from there was written over. Such an edit now ends the writing and
keeps its own undo. - In a split of thousands of places,
C-x C-sright after typing saved
a half-written file: 2,000 of 20,000 places. A save now writes every
place first. - In overwrite mode, writing at a split or at the cursors stopped after
one character at the first place. It now writes over every place. pat the cursors afterD,d,yorcleft the last cursor's
text empty pasted the whole kill at every cursor;V yat the
cursors on a last line with no final newline added a blank line to
the kill;V pat the cursors opened an empty line under every line.
Each cursor gets its own text back now, and lines stay lines.g h v j j t, the way to select two whole lines, made three cursors.
It makes two.C-u 2 g hat the cursors sent every cursor to its line's end; it
goes to each line's start.- An edit at the cursors that read-only text refused part of the way
left the cursors where the edit had moved them, and the next key
acted on that. They are left as they were. m l: a line typed, opened or pasted at the edge of a banked line
was banked with it, soyanddtook lines nobody banked.- Banks after
M-x text-mode,revert-bufferor an Org restart: the
highlight stayed,ycopied a single character, and nothing could
clear them. Banks survive a change of major mode now. d,pover several banks with read-only text on one of them deleted
some lines, killed all of them and spent the banks. Nothing changes
now when any part is refused.uin a mark run spent a press on a key that changed nothing, such
aswpast the last word.Mwith several clients of one daemon: presses on one client went
into the other client's run, and a run armed on a client that
closed stayed armed. Each run now hears only its own client, and
ends with it. A split ends with its client too.DELbetween the halves of a pair in Dired, a help buffer or any
read-only buffer ran DONKEY's pair delete and said "Buffer is
read-only". It is the mode's ownDELthere again.C-x C-qin a fundamental-mode or diff-mode buffer showed
DONKEY[S]whileh j k lsaid "Buffer is read-only". They work at
once now, and making the buffer writable again gives Normal state
back whole.SPC C-g,g C-g,m C-gin a help or other support buffer rang the
bell and stopped a keyboard macro; they quit quietly, as in Normal
state.- In a terminal, every change between Normal and Insert state paused
10 ms (i C-gtook 10.5 ms inemacs -nwandemacsclient -t), and
leaving Emacs left the shell with Insert state's bar cursor. The
pause is gone, and the terminal gets its own cursor shape back when
Emacs exits or is suspended, or a terminal frame closes. - With
donkey-setup-smartparens,C-gcould not leave a minibuffer
that had Smartparens on; it leaves it now.
Changed -- you will notice these
- In a split,
M-d,C-k,M-\,M-zandC-tat a place's edge
were repeated at the other places by count, whatever the text there:
M-dturnedc foo bazookaintoc fooooka. They are now repeated
only where the same text follows every place, and end the split,
saying so, everywhere else. Backspace andC-dbehave as before. fleaves out matches inside folded or otherwise invisible text, and
says how many: "Split: 2 places in the buffer (2 hidden matches left
out)".%fused to write into folds where nothing on screen showed
it. Withsearch-invisibleset totevery match is held, as
before.g handg linside a mark run ignore a count, so the selection's
ends never cross.C-u 0 g lused to flip the selection to a lone
newline. Outside a run both keys take a count as before.xwith a negative count over an accented letter takes the whole
letter, accent included. To remove only an accent, useDELin
Insert state.- A mark key that reaches nothing says so and leaves the mark alone:
C-u - 1 m won the first word said "Word marked" over an empty
selection, andm sorm pin a blank buffer refused only after
moving the mark.
Fixed
- PRIMARY after a rectangle: a middle-click pasted the rectangle's rows
as they were at the time of the click, so text typed there after the
rectangle ended -- a password -- was what the next middle-click
pasted. With DONKEY off it pasted the plain stretch between the
corners, and with rectangles live in two windows, the other one's
block. PRIMARY now keeps the block that was selected. - A split no longer keeps a copy of the text last written in its hidden
working buffers after it ends. - A dotted list in a mode or pair option --
'(comint-mode . Info-mode),
or a pair added withappendand no list round it -- madefind-file
fail, made(donkey-pair-mode 1)stop the rest of the init file, or
made every key typed in Insert state signal. Such a value now reads
as no list at all.donkey-position-ring-maxset to1.0e+INFno
longer switches position tracking off for the session. - An input method waiting for Insert state survives
revert-bufferand
a change of major mode. - With text scaled down, every visible row of a tall rectangle is
highlighted and every cursor oftandfis drawn. m vin right-to-left text takes the character under the cursor.- With the
pairing-packagewrap engine and onlydonkey-pair-mode
pairing, a delimiter over a selection put()at point and dropped
the selection; it wraps as DONKEY does there. - Rebinding or removing a Normal state prefix is reported in one line
naming it, not as "g g is 1 now" once per key under it. The?chart
namesdonkey-mark-run-togglewhenMis unbound. - The README's "Long lines" section had
j,k,J,KandV
backwards; "Configuring the Enter Key" now gives the order Enter is
answered in. The tutor saysC-g, notRET, abandons a prompt.
Under the hood
- Unbanking or spending a large bank is linear:
yover 87,732 banked
lines 7.1 s -> 0.3 s. DELat the cursors drops a cursor in linear time: 1.4 s -> 40 ms at
40,000 cursors.- Leaving Insert state walks only the overlays the windows show: 25 ms
-> 0.7 ms at 100,000 overlays. DELin Insert state withdonkey-pair-modeon costs 0.3 us where it
cost 10; a typed delimiter 6 us where it cost 14.- A command that changes nothing at a split of 300,000 places costs
0.2 ms where it cost 1.4. - Help, Man and compilation buffers build their support map once per
shape, not once per buffer: 160 -> 64 us a buffer.
Upgrading
Nothing to do. If you relied on M-d or C-k at a split's edge
reaching the same number of characters at every place, use DEL or
C-d with a count, which still do. To have f hold matches inside
folds, set search-invisible to t, or unfold first.