Emacs:是否可以将一个特定窗口设置为始终用作“其他窗口”? [英] Emacs: Is it possible to set one particular window to always be used as the "other window"?

查看:98
本文介绍了Emacs:是否可以将一个特定窗口设置为始终用作“其他窗口”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多有用的emacs命令可以在其他窗口(例如 Cx Cb 中查看缓冲区列表,或 Ch a 查看可用的命令,或许多其他命令。)

There are many useful emacs commands that do things in the "other window" (like C-x C-b to see the buffer list, or C-h a to view available commands, or many others).

我的问题:使用一些精心安排的窗口似乎并不好玩在一帧中,每个都显示特定的内容。

My problem: This does not seem to play well with using a number of carefully arranged windows in one frame, each showing specific content.

只要使用这些其他窗口命令之一,它将替换其他窗口的内容,(1)可能太窄,无法清楚显示正在显示的信息,(2)可能需要通过将其重新设置为正确的缓冲区来手动清理。 (你最好不要在这样做时检查缓冲区列表,否则你会混淆另一个窗口!)

Anytime I use one of these "other window" commands, it replaces the content of some other window, which (1) might be too narrow to clearly show the information being displayed, and (2) might need to be manually "cleaned up" afterwards, by setting it back to its correct buffer. (And you'd better not check the buffer list when doing this, or you'll mess up yet another window!)

(Emacs甚至不总是使用相同的其他窗口,即使从同一窗口发出命令,例如, Cx Cb 输出可能会进入一个其他窗口,而 Ch a 将其结果显示在另一个其他窗口中,同样, CMv 有时会滚动与其他输出不同的其他窗口刚刚出现。)

(Emacs does not even always use the same "other window", even when the commands are issued from the same window. For example, the C-x C-b output might go into one "other" window while C-h a shows its results in a different "other" window. Likewise, C-M-v sometimes scrolls a different "other" window from that in which output just appeared.)

我想要一种方法来解决或解决这个问题,例如:

I would like a way to solve or work around this problem, such as:


  1. 我希望能够指定一个特定的窗口,始终被用作该框架中任何窗口的其他窗口。

  1. I would really like to be able to specify a particular window to always be used as the "other window" for any window in that frame.

如果没有,可能有办法重新排列窗口顺序和/或使用不可见窗口(如果存在的话)通过进行大量的幕后窗口混洗来获得解决方案1的效果,可能需要额外的c要写入其他窗口的命令之前或之后输入的嗯,

Failing that, perhaps there is a way to rearrange the window order and/or use invisible windows (if such exist) to get the effect of solution 1 by doing a lot of behind-the-scenes window shuffling, perhaps requiring an extra command to be entered before or preferably after the command that writes into an "other window".

没有这个,我想要一个命令,撤消最近的任何窗口中的缓冲区更改,所以使用的窗口可以追溯到使用之前显示的内容。

Failing those, I would like a command that undoes the most recent buffer change in any window, so whatever window was used goes back to what it was showing just before it was used.

(目前我使用workgroups.el,我使用一个单独的工作组检查文档,但这显然不是最佳的。 更新工作组没有实现解决方案3,因为它似乎只是将缓冲区更改为常规文件。)

(Currently I use workgroups.el and I use a separate workgroup for checking the documentation, but this is clearly suboptimal. "Updating" the workgroup does not achieve solution 3, since it seems to only change the buffer back if it was a regular file.)

编辑:我看到这个问题是非常类似于这个相似的问题,但那个问题没有得到回答它正在寻找。由于理想的解决方案可能不存在,所以我也明确地对解决方案感兴趣。

I see this question is very similar to this similar question, but that question did not get the answer it was looking for. Since the ideal solution might not exist, I am explicitly interested in work-arounds as well.

推荐答案


没有这些,我想要一个命令,撤消任何窗口中最新的缓冲区更改,所以使用任何窗口可以返回到
在使用之前显示的内容。

Failing those, I would like a command that undoes the most recent buffer change in any window, so whatever window was used goes back to what it was showing just before it was used.

可能的解决方案是使用获胜者模式。通过添加

A possible solution is to use winner-mode. Activate it by adding

(winner-mode 1)

它提供两个命令 winner-undo winner-redo 那个撤消和重做窗口配置分别。

It provides two command winner-undo and winner-redo that undo and redo window configurations respectively.

此外,由于你提到 workgroups.el 尝试 workgroups2 ,一个workgroups.el的分支。它为恢复窗口提供类似的命令( wg-undo-wconfig-change wg-redo-wconfig-change )配置

Also since you mention workgroups.el give a try to workgroups2, a fork of workgroups.el. It provides similar commands (wg-undo-wconfig-change and wg-redo-wconfig-change) for restoring window-configurations

这篇关于Emacs:是否可以将一个特定窗口设置为始终用作“其他窗口”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆