I want to be able to launch a new emacsclient and issue org-capture in it. I have created this simple function:
(defun make-orgcapture-frame ()
"Create a new frame and run org-capture."
(interactive)
(make-frame '((name . "zorg") (width . 180) (height . 160)
(top . 400) (left . 300)
))
(select-frame-by-name "zorg")
(delete-other-windows)
(org-capture)
)
i then launch it with this command
emacsclient -n -e '(make-capture-frame)'
while this works it always opens in a split view where an old buffer from any current emacs frame i have open appears.
is there anyway i can make the org-capture buffer take the whole frame?
org-mks
callsorg-switch-to-buffer-other-window
when creating the initial buffer with choices to select a template. The question does not indicate whether we are interested in only the initial window that displays choices of templates, or the window layout when a template has been selected .... That function calls(org-no-popups (apply 'switch-to-buffer-other-window args))
.M-x find-function RET org-capture RET
. Now move down a few lines and find where it callsorg-capture-select-template
-- place the cursor somewhere on that word and typeM-x find-function
, which will have a default value of theorg-capture-select-template
-- use the default and hit return and get transported to that function. Now, move the cursor down a few lines and find where it callsorg-mks
-- place the cursor on that function and typeM-x find-function
, which will default toorg-mks
... hit return and go toorg-mks
....org-switch-to-buffer-other-window
behave as if it were actuallyswitch-to-buffer
-- we loadorg
andcl
to ensure the functionsorg-switch-to-buffer-other-window
andcl-letf
are available:(progn (require 'org) (require 'cl) (cl-letf (((symbol-function 'org-switch-to-buffer-other-window) #'switch-to-buffer)) (org-capture)))
make-frame
creates a frame displaying a current buffer. I'm not sure whydelete-other-windows
fails to kill the other buffer then.