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."
  (make-frame '((name . "zorg") (width . 180) (height . 160)
                (top . 400) (left . 300)
(select-frame-by-name "zorg")

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?

  • 1
    I can start you on your journey, but not get you over the finish line because there are too many different org- versions out there -- some old, some new. As to the org-mode that ships with Emacs 26.1, the function org-mks calls org-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)).
    – lawlist
    Dec 8, 2018 at 6:23
  • 2
    Here is how to trace what is happening ... M-x find-function RET org-capture RET. Now move down a few lines and find where it calls org-capture-select-template -- place the cursor somewhere on that word and type M-x find-function, which will have a default value of the org-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 calls org-mks -- place the cursor on that function and type M-x find-function, which will default to org-mks ... hit return and go to org-mks....
    – lawlist
    Dec 8, 2018 at 6:33
  • 1
    Here is an example to get you started -- this temporarily makes org-switch-to-buffer-other-window behave as if it were actually switch-to-buffer -- we load org and cl to ensure the functions org-switch-to-buffer-other-window and cl-letf are available: (progn (require 'org) (require 'cl) (cl-letf (((symbol-function 'org-switch-to-buffer-other-window) #'switch-to-buffer)) (org-capture)))
    – lawlist
    Dec 8, 2018 at 6:41
  • According to the manual, make-frame creates a frame displaying a current buffer. I'm not sure why delete-other-windows fails to kill the other buffer then. Apr 17, 2019 at 3:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.