Live data from Hacker News

The Emacs Window Management Almanac

karthinks.com

11–20 of 38 posts

Re: The Emacs Window Management Almanac

#12

I configure my Emacs to avoid splitting the frame into multiple windows -- similar to how a web browser never splits the browser window into multiple viewports. (Also my Emacs never makes a second frame.) (The way I achieve that has changed over the years because the old way stops working.) The way I do it now, the frame does split in some situations (e.g., when Emacs shows me a *Completions* buffer) but AFAICR I nev…

> similar to how a web browser never splits the browser window into multiple viewports.

Unless you have a browsers that does exactly that (e.g., Vivaldi), allowing you to view multiple pages at once!

Re: The Emacs Window Management Almanac

#13
post #4

Earlier quoted context omitted.

I'm the same, 30 years & C-x 1/2/3 C-x o, and that's about the extent of it. But tbh it's actually pretty powerful and sufficient for my purposes and I wish the various tiling window managers were just that.

EXWM is ;). I used it for about a year, but ultimately found the performance, and in particular a low language server locking up the window manager, unacceptable.

StumpWM uses Common Lisp, and can be setup to be nearly identical to Emacs window management. It is also quite performant. Out of the box, its configuration is pretty nice already.

Re: The Emacs Window Management Almanac

#14
post #12

I configure my Emacs to avoid splitting the frame into multiple windows -- similar to how a web browser never splits the browser window into multiple viewports. (Also my Emacs never makes a second frame.) (The way I achieve that has changed over the years because the old way stops working.) The way I do it now, the frame does split in some situations (e.g., when Emacs shows me a *Completions* buffer) but AFAICR I nev…

> similar to how a web browser never splits the browser window into multiple viewports. Unless you have a browsers that does exactly that (e.g., Vivaldi), allowing you to view multiple pages at once!

I use a Brave extension that opens always a new window. Window management is then left to my WM, XMonad.

Re: The Emacs Window Management Almanac

#15

That is a good exploration. I am on a mobile device right now but I can’t wait to try: ace-window and ace-window-display-mode frames-only-mode I admit my guilt: in about 40 years of using Emacs I mostly have always just used next-window, creating new windows under or next to, and when working on remote servers relying on tmux.

Similarly. I do have

     (global-set-key (kbd "M-o") #'other-window)
since C-x o is a bit much, but I don't feel any need for all these extra packages.

But it's nice to have such an in-depth reference, Karthik's articles are always very educational and interesting.

Re: The Emacs Window Management Almanac

#16

I configure my Emacs to avoid splitting the frame into multiple windows -- similar to how a web browser never splits the browser window into multiple viewports. (Also my Emacs never makes a second frame.) (The way I achieve that has changed over the years because the old way stops working.) The way I do it now, the frame does split in some situations (e.g., when Emacs shows me a *Completions* buffer) but AFAICR I nev…

> I configure my Emacs to avoid splitting the frame into multiple windows

Is that to address a particular problem?

I use multi-window frames a fair amount. (Latest Mac OS, latest Emacs.) I've noticed that sometimes a multi-window frame will seemingly freeze up and be unresponsive to the keyboard or trackpad, including multiple Ctrl-G commands. But then C-x 5 2 will work to create a new frame. And I can go back to the frozen frame and C-x 5 0 to kill that frame.

Re: The Emacs Window Management Almanac

#17
Nice article. Good explanation and good guidelines.

Sometimes the evenly split windows don't cut it. I put the following function in the init.el file and bind "C-x 7" to it to adjust the current window and its peer to 70% and 30% sizes vertically. Same for horizontally with a "C-x 8" key binding.

    (defun partial-size-window ()
      "Set the two split windows to 70% and 30% vertically."
      (interactive) 
      (let ((size (- (truncate (* .70 (frame-height))) (window-height)))) 
        (if (> size 0) 
            (enlarge-window size))))

    (defun partial-size-window-h ()
      "Set the two split windows to 70% and 30% horizontally."
      (interactive) 
      (let ((size (- (truncate (* .70 (frame-width))) (window-width)))) 
        (if (> size 0) 
            (enlarge-window-horizontally size))))

Re: The Emacs Window Management Almanac

#18
post #16

I configure my Emacs to avoid splitting the frame into multiple windows -- similar to how a web browser never splits the browser window into multiple viewports. (Also my Emacs never makes a second frame.) (The way I achieve that has changed over the years because the old way stops working.) The way I do it now, the frame does split in some situations (e.g., when Emacs shows me a *Completions* buffer) but AFAICR I nev…

> I configure my Emacs to avoid splitting the frame into multiple windows Is that to address a particular problem? I use multi-window frames a fair amount. (Latest Mac OS, latest Emacs.) I've noticed that sometimes a multi-window frame will seemingly freeze up and be unresponsive to the keyboard or trackpad, including multiple Ctrl-G commands. But then C-x 5 2 will work to create a new frame. And I can go back to the…

It is not to work around a bug. I do it because I am in the habit of making the text (and other UI elements) big.

Re: The Emacs Window Management Almanac

#19

That is a good exploration. I am on a mobile device right now but I can’t wait to try: ace-window and ace-window-display-mode frames-only-mode I admit my guilt: in about 40 years of using Emacs I mostly have always just used next-window, creating new windows under or next to, and when working on remote servers relying on tmux.

Similarly. I do have (global-set-key (kbd "M-o") #'other-window) since C-x o is a bit much, but I don't feel any need for all these extra packages. But it's nice to have such an in-depth reference, Karthik's articles are always very educational and interesting.

I use the key, usually I hit it with the base of my right hand.

Re: The Emacs Window Management Almanac

#20
post #12

Earlier quoted context omitted.

> similar to how a web browser never splits the browser window into multiple viewports. Unless you have a browsers that does exactly that (e.g., Vivaldi), allowing you to view multiple pages at once!

I use a Brave extension that opens always a new window. Window management is then left to my WM, XMonad.

Wouldn't you lose tab hibernation? Also with dozens of tabs does this not pollute the WM?
Post reply on HN