Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Emacs org-mode, how do I get org-capture to open in a full-sized window?

Tags:

emacs

org-mode

In Emacs org-mode, how do I get org-capture to open in a full-sized window, rather than first splitting the window ?

like image 295
incandescentman Avatar asked Mar 06 '13 16:03

incandescentman


People also ask

How do I open Emacs org mode?

Emacs does not actually understand you are editing an Org document, yet. To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document.

How do I set up org mode?

The Basics \par Org-mode works out of the box, and besides the steps described in the manual to activate it, nothing is needed at all. Just open a . org file, press C-c [ to tell org that this is a file you want to use in your agenda, and start putting your life into plain text.

Is org mode built in Emacs?

Emacs has included Org Mode as a major mode by default since 2006. Bastien Guerry is the current maintainer, in cooperation with an active development community. Since its success in Emacs, some other systems now provide functions to work with org files.


2 Answers

You can add (add-hook 'org-capture-mode-hook 'delete-other-windows) or (add-hook 'org-capture-mode-hook 'make-frame) to your .emacs. (To test, you can eval these with M-:). The first should delete the other windows, the second opens the window in a new frame. However these work after you select the capture template.

like image 169
Emre Sahin Avatar answered Oct 26 '22 09:10

Emre Sahin


The accepted answer doesn't seem to work for me in emacs 24. The only solution I was able to find involves using emacs-noflet and (thanks Alex Vorobiev) in your emacs file:

 (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)))

and bind make-capture-frame to a shortcut.

like image 41
cazgp Avatar answered Oct 26 '22 07:10

cazgp