|
|
|
|
|
by syene
775 days ago
|
|
> … c-u c-x 1 would be consistent. It seems like a Vim or a Kakoune thing to get stuck up attaching strict logic to the “command language”. Lisps have a concept of do-what-I-mean (DWIM)—the computer anticipates what the user intends to do, overlooking trivial errors.† There’s some subjectivity involved in making commands do-what-[you]-mean, but what’s the point of ‘C-x 1’-ing after we’ve just ‘C-x 1’-ed anyway? None. So why not make that into a convenient way to undo the previous ‘C-x 1’? The ‘undo’ command only acts on changes in buffers, and there’s always winner-mode and its undo, but as a zygospore user—it seems very natural from the get go. I repeat the ‘C-x 1’ if I press it accidentally, and more often I find myself temporarily magnifying a buffer to take up the whole screen to do some focussed editing, which I can come out of with another ‘C-x 1’ (as long as I don’t change the window configuration further). †: from https://en.wikipedia.org/wiki/DWIM |
|
Of course the general concept was taken up elsewhere as well and is used to excellent (and terrible — I’m looking at you, Apple spelling autocorrect) effect.
That Wikipedia article you cited is weird. Even the example cited, the file reference DWIM, is a rather degenerate case that has nothing to do with lisp itself. Certainly DWIM doesn’t operate on the execution of emacs lisp, despite the article’s hand-wavy attempt to imply so.