[英]In Emacs org-mode, how do I get org-capture to open in a full-sized window?
在 Emacs 組織模式中,如何讓 org-capture 在全尺寸窗口中打開,而不是先拆分窗口?
您可以將(add-hook 'org-capture-mode-hook 'delete-other-windows)
或(add-hook 'org-capture-mode-hook 'make-frame)
到您的.emacs
。 (要測試,您可以使用M-:
評估它們)。 第一個應該刪除其他窗口,第二個在新框架中打開窗口。 但是,這些在您選擇捕獲模板后起作用。
接受的答案在 emacs 24 中似乎對我不起作用。我能找到的唯一解決方案是在您的 emacs 文件中使用emacs-noflet和(感謝Alex Vorobiev ):
(defun make-capture-frame ()
"Create a new frame and run org-capture."
(interactive)
(make-frame '((name . "capture")))
(select-frame-by-name "capture")
(delete-other-windows)
(noflet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
(org-capture)))
並將make-capture-frame
綁定到快捷方式。
對我來說,我需要確保 org-capture 在新框架中打開,並且框架在完成時關閉。 以下方法對此很有效:
; close capture frames when finished capturing
(add-hook 'org-capture-after-finalize-hook (lambda () (delete-frame)))
; make org-capture open up as sole window in a new frame
(defadvice org-capture (around my-org-capture activate)
(progn
(select-frame (make-frame))
(delete-other-windows)
(noflet
((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
ad-do-it)))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.