有一些函数可以在新帧(display-buffer-other-frame
,switch-to-buffer-other-frame
)中打开缓冲区,但是如何在新帧中创建间接缓冲区(在单个调用中,是)?
答案 0 :(得分:1)
这是你在找什么?
clone-indirect-buffer-other-window
是一个交互式编译的Lispsimple.el
中的函数。它绑定到
C-x 4 c
。
(clone-indirect-buffer-other-window NEWNAME DISPLAY-FLAG &optional NORECORD)
与
clone-indirect-buffer
类似,但显示在另一个窗口中。
使用C-h f clone-indirect-buffer
查看该命令的详细信息。
好的,您希望它在单独的框架中打开,而不仅仅是单独的Emacs 窗口。为此,您可以定义自己的clone-indirect-buffer-other-frame
,但只需将pop-up-frames
绑定到t
围绕clone-indirect-buffer
的调用,就像clone-indirect-buffer-other-window
绑定pop-up-windows
一样1}}。
(defun clone-indirect-buffer-other-frame (newname display-flag &optional norecord)
"Like `clone-indirect-buffer' but display in another window."
(interactive
(progn
(if (get major-mode 'no-clone-indirect)
(error "Cannot indirectly clone a buffer in %s mode" mode-name))
(list (if current-prefix-arg
(read-buffer "Name of indirect buffer: " (current-buffer)))
t)))
;; (let ((pop-up-windows t))
(let ((pop-up-frames t)) ; <==========
(clone-indirect-buffer newname display-flag norecord)))