有什么方法可以让撤消树模式在“水平”缓冲区(即 Cx 3 与 Cx 2)中显示可视化?

根据@Tom 的建议,我提出了一个仅适用于撤消树的解决方案:
(defadvice undo-tree-visualize (around undo-tree-split-side-by-side activate)
"Split undo-tree side-by-side"
(let ((split-height-threshold nil)
(split-width-threshold 0))
ad-do-it))
2017-04-29:defadvice现在不赞成使用advice-add. 上述解决方案的更新版本如下:
(defun undo-tree-split-side-by-side (original-function &rest args)
"Split undo-tree side-by-side"
(let ((split-height-threshold nil)
(split-width-threshold 0))
(apply original-function args)))
(advice-add 'undo-tree-visualize :around #'undo-tree-split-side-by-side)
该undo-tree包使用标准的 Emacs 缓冲区显示函数来显示树形窗口(相对于特定函数)。要控制 Emacs 如何拆分窗口,您可以自定义变量split-window-preferred-function、split-height-threshold和split-width-threshold。另请查看该功能的文档split-window-sensibly。
如果您对 Emacs 没有问题,通常更喜欢并排窗口而不是顶部和底部窗口,请将以下代码放入您的 init 文件中:
(setq split-height-threshold 0)
(如果你只想要并排的窗口undo-tree-visualize,故事就有点复杂了。)