Emacs org-modeで、最初にウィンドウを分割するのではなく、org-captureをフルサイズのウィンドウで開くにはどうすればよいですか?
2243 次
3 に答える
9
(add-hook 'org-capture-mode-hook 'delete-other-windows)
またはをに追加でき(add-hook 'org-capture-mode-hook 'make-frame)
ます.emacs
。(テストするには、これらをで評価できますM-:
)。1つ目は他のウィンドウを削除し、2つ目は新しいフレームでウィンドウを開きます。ただし、これらはキャプチャテンプレートを選択した後に機能します。
于 2013-03-06T17:20:57.147 に答える
2
受け入れられた答えはemacs24ではうまくいかないようです。私が見つけた唯一の解決策は、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
ショートカットにバインドします。
于 2014-07-09T01:01:36.513 に答える
0
私にとっては、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)))
于 2021-02-04T23:23:38.813 に答える