从包含两个 Emacs 窗口的第一帧,win-one显示缓冲区buf-one和win-two显示buf-two,我希望能够将win-two '打破'到它自己的框架中,也许使用在模型行上按住修改键并单击。在这之后,
我想知道这种行为是否在标准库中可用,是否有扩展,或者一个小的 elisp 函数是否可以工作?
是的,有这样一个命令:mouse-tear-off-window。我将它绑定到C-mouse-1模式行:
(global-set-key [mode-line C-mouse-1] 'mouse-tear-off-window)
Run Code Online (Sandbox Code Playgroud)
该命令在普通 Emacs ( ) 中可用emacs -Q。但我使用我自己的版本,如果窗口单独位于其框架中,则不会删除该窗口。相反,它克隆框架和窗口。该版本位于库mouse+.el中。文档字符串:
,----
| mouse-tear-off-window is an interactive compiled Lisp function in
| `mouse+.el'.
|
| It is bound to mode-line C-mouse-1.
|
| (mouse-tear-off-window EVENT)
|
| Create a new frame displaying buffer of window clicked on.
| If window is not the only one in frame, then delete it.
| Otherwise, this command effectively clones the frame and window.
`----
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
538 次 |
| 最近记录: |