emacs - 在 emacs 中拆分窗口时的下一个缓冲区跳过缓冲区

标签 emacs emacs24

我是 Emacs 新用户,正在学习如何垂直拆分窗口并在每个 Pane 中循环缓冲区。
但是,在一个 Pane 中打开一个新文件后,next-buffer 不会在另一个 Pane 中循环该文件,而是仅在它在新 Pane 中出现一次之后循环。这可以重现如下:

Open 2 files A and B in a new emacs session.

Split the windows vertically using 'split-window-right'.

'next-buffer' cycles through A and B in PaneLeft and PaneRight.

Open file C in PaneLeft.

'next-buffer' cycles through A, B, C in PaneLeft.

Ensure C is focused in PaneLeft, then switch to PaneRight. 'next-buffer' only cycles through A and B in PaneRight. It skips C possibly because C is already visible in PaneLeft.

Switch back to PaneLeft, and ensure A or B is focused in PaneLeft.

Switch back to PaneRight, now 'next-buffer' cycles through A, B, and C, regardless of what is visible in PaneLeft.


这是预期的行为吗?我如何让它按我的预期工作?
注意:我在没有任何自定义扩展的情况下运行,我的 .emacs 几乎是空的。

最佳答案

switch-to-visible-buffer变量来控制这种行为。来自 GNU Emacs 24.2 的文档:

switch-to-visible-buffer is a variable defined in `window.el'.
Its value is t

Documentation:
If non-nil, allow switching to an already visible buffer.
If this variable is non-nil, `switch-to-prev-buffer' and
`switch-to-next-buffer' may switch to an already visible buffer
provided the buffer was shown in the argument window before.  If
this variable is nil, `switch-to-prev-buffer' and
`switch-to-next-buffer' always try to avoid switching to a buffer
that is already visible in another window on the same frame.

You can customize this variable.

This variable was introduced, or its default value was changed, in
version 24.1 of Emacs.

如果这不能正常工作,则可能存在错误。

关于emacs - 在 emacs 中拆分窗口时的下一个缓冲区跳过缓冲区,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14524172/

相关文章:

Emacs:创建目录:权限被拒绝

emacs - 存储在文件中的elisp 代码的结果值?

regex - 如何测试Emacs Lisp代码的`font-lock-keywords'值

emacs - 在哪里可以获得 Emacs 24 的 "Light Table"主题?

emacs - emacs 缓冲区列表中的颜色

emacs - 使用 (display . all) 在 gnus 中显示所有消息

Emacs 自动完成 : the function `define-package` is not known

validation - 即时银行帐号验证

emacs - 如何更改具有 lambda :set function without customize? 的 defcustom 变量

emacs - 将 emacs 的所有 `=` 更改为 `eq`