Live data from Hacker News

The Emacs Window Management Almanac

karthinks.com

31–38 of 38 posts

Re: The Emacs Window Management Almanac

#32
Something I’d like to add to Karthink’s notes on `windmove-mode`: you can set `windmove-default-keybindings` to move through windows with Ctrl-

    (windmove-default-keybindings 'control)
I have this in my config (as well as in my minimalist (really minimalist) starter kit [1]) and it’s a game-changer!

[1]: https://codeberg.org/ashton314/emacs-bedrock

Re: The Emacs Window Management Almanac

#34
post #27
post #21

Earlier quoted context omitted.

> … 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.…

As far as Lisps go, Teitelman implemented DWIM just for Interlisp (annoyingly it was the macro expansion engine so you couldn’t disable it). MACLISP and its derivatives never had that misfeature. 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,…

Then what is DWIM for you? What did you want to disable in Interlisp? For me the concept does indeed have nothing intrinsic to do with Lisp.

Re: The Emacs Window Management Almanac

#35
post #27

Earlier quoted context omitted.

As far as Lisps go, Teitelman implemented DWIM just for Interlisp (annoyingly it was the macro expansion engine so you couldn’t disable it). MACLISP and its derivatives never had that misfeature. 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,…

Then what is DWIM for you? What did you want to disable in Interlisp? For me the concept does indeed have nothing intrinsic to do with Lisp.

DWIM in Interlisp was an automated error handler for Lisp code. It would be triggered on errors and then tried to guess possible fixes at runtime (misspelled functions&variables could be corrected, ...).

Though one might expect a bigger picture: "interacting with an agent who attempts to interpret the user's request from contextual information" (Teitelman/Masinter, The Interlisp Programming Environment, 1981).

Re: The Emacs Window Management Almanac

#36

Something I’d like to add to Karthink’s notes on `windmove-mode`: you can set `windmove-default-keybindings` to move through windows with Ctrl- (windmove-default-keybindings 'control) I have this in my config (as well as in my minimalist (really minimalist) starter kit [1]) and it’s a game-changer! [1]: https://codeberg.org/ashton314/emacs-bedrock

Just checked my .emacs and I am doing exactly the same. I prefer over C-x O since it is one key less to press and more flexible.

Re: The Emacs Window Management Almanac

#37
post #27
post #21

Earlier quoted context omitted.

> … 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.…

As far as Lisps go, Teitelman implemented DWIM just for Interlisp (annoyingly it was the macro expansion engine so you couldn’t disable it). MACLISP and its derivatives never had that misfeature. 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,…

I just liked the definition of DWIM in that article. I don’t think DWIM operates in Emacs Lisp the way it did in Interlisp, and zygospore’s not exactly a good example, but I’ve come across ‘-dwim’ versions of commands that combine the functionality of multiple ones and try to deduce which particular functionality you wanted from the surrounding context—it’s nice.

Re: The Emacs Window Management Almanac

#38
post #6

nice writeup, I'd like to share a great complementary package that has been indispensable for me: zygospore "zygospore lets you revert C-x 1 (delete-other-window) by pressing C-x 1 again" https://github.com/LouisKottmann/zygospore.el

You might want to investigate winner mode for redoing and undoing all window configuration changes:

https://www.emacswiki.org/emacs/WinnerMode

Post reply on HN