Skip to main content

C'est la Z

Using Emacs - 24 - Org Capture 2

Not much in today's actual post. The video is a continuation of the last one on org-capture.

The video goes over how I set things up to pop up a new frame to do a capture even if emacs isn't on screen (as long as it's running) by hitting F1. I would have preferred to bind to C-c c - the same as within emacs but I havn't figured out how to do that in Ubuntu or Mint Linux yet.

Here's the elisp code for the configuration file to do the heavy lifting. I can't for th elife of me remember who's blog I found it on. If anyone knows, please leave a comment - I'd like to give credit where credit's due:

(defadvice org-capture-finalize
(after delete-capture-frame activate)
"Advise capture-finalize to close the frame"
(if (equal "capture" (frame-parameter nil 'name))

(defadvice org-capture-destroy
(after delete-capture-frame activate)
"Advise capture-destroy to close the frame"
(if (equal "capture" (frame-parameter nil 'name))

(use-package noflet
:ensure t )
(defun make-capture-frame ()
"Create a new frame and run org-capture."
(make-frame '((name . "capture")))
(select-frame-by-name "capture")
(noflet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))

The command I bind to the keyboard shortcut in my window manager:

emacsclient -ne "(make-capture-frame)"

There will be a third capture video in a few weeks where I'll talk about scheduling and agendas. Right now, I'm playing with org-gcal to sync with my Google calendar and want to figure out a config I'm happy with before making that video.

Relevant links:

comments powered by Disqus