Xah Lee on Frames vs. Window in Emacs

科技动态 2018-06-24 阅读原文

Xah Lee has an interesting post that I hadn’t seen before even though it’s originally from 2014 (since updated) and mentions a post of mine. The post is a discussion of whether it’s better to have a single large Emacs frame with multiple windows or multiple smaller frames
. Lee makes the case that it’s more efficient to have two window-sized frames rather than running Emacs in full screen mode and having two windows in the frame.

When Lee says something about efficiency with respect to Emacs, it’s worth paying attention. In the end, you might not agree but Lee takes this stuff seriously and generally studies the alternatives to determine which is best. If you haven’t read his post, you should do so now so that you understand the context.

Lee’s argument, as I understand it, is that switching between windows in a single frame is suboptimal because various Emacs operations will destroy your windows configuration and using something like winner-mode
to restore your window configuration is too much trouble. He prefers to let the OS handle the sizing and position of frames and configures a set of convenient keys to switch to Emacs and move between frames. He then feels free to split either frame temporarily into multiple windows and restore to the single window, presumably with something like Ctrl
+ x
1
, when he’s done.

I disagree with his workflow but not emphatically. I think the multiple frame idea has merit but I don’t see how it’s better—or even as good as—multiple windows. If you divide a frame into more than two windows, you’re still going to want an easy way of switching between them. As I wrote in the post that Lee linked, ace-window
is the ideal way to do that. And I don’t see how using winner-mode to restore your default window configuration is any harder than using delete-other-windows
.

Still, most of this boils down to individual preference and there’s not really a right or wrong answer. All that said, my actual workflow is not that different from Lee’s. I have an OS key to switch to Emacs which is usually running in full screen mode with two windows. Sometimes I need to split one of those windows temporarily and when I’m done I just call winner-mode
to restore things. Sometimes (usually when I running elfeed
in a full screen window) I do fire up another frame. It opens in full screen mode but doesn’t, of course, show the original frame. When I’m done, I destroy the new frame with Ctrl
+ x
5
0
and I’m back to where I was.

I could easily use two frames with this method but then I’d have to worry about two ways of switching to the window I wanted rather than just using ace-window
. What do you think? In particular, if you’re using the two frame method, what has been your experience?

Irreal

责编内容by:Irreal阅读原文】。感谢您的支持!

您可能感兴趣的

Jonas Bernoulli: Magit 2.90 released macsAir Collecting frequent-committer miles Magit 2.90 released I am excited to announce the release of Ma...
How the CIA infects air-gapped networks Documents published Thursday purport to show how the Central Intelligence Agency has used USB drives to infiltrate co...
Using Emacs 36 – A Touch of Elisp I've been working on a vue.js project this summer. During the school year I really can't dive into code so it's been fun...
Windows Integrated Authentication in node.js Clien... When using node.js as a client, is it possible to connect to a server using Windows integrated authentication (e.g...
Windows下搭建PHP本地开发环境 一直以来,我都是使用新浪的SAE作为我本地的PHP开发环境。SAE使用起来非常方便,是个纯绿色的软件包,可以从 这里 下载,使用之前首先配置 sae.conf 文件中的 DocumentRoot 参数为网站根目录(也就是你PHP开发的目录...