From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Llu=C3=ADs?= Subject: org-capture-other-frame Date: Mon, 02 May 2011 20:07:41 +0200 Message-ID: <877ha9nfgy.fsf@ginnungagap.bsc.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGxWg-0004kw-OP for emacs-orgmode@gnu.org; Mon, 02 May 2011 14:07:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGxWf-0008Ts-BU for emacs-orgmode@gnu.org; Mon, 02 May 2011 14:07:18 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:57256) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QGxWe-0008SU-UI for emacs-orgmode@gnu.org; Mon, 02 May 2011 14:07:17 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org I've made a little function to launch org-capture on another frame, which is very handy when plugged into a hotkey and working with other applications. It lacks some settings that I already have active system wide (like no scrollbars, no toolbar and the like), so you should probably tune those (a defcustom for the frame parameters should suffice). In any case, tell me (directly, as I'm not not subscribed) if you're going to install this into org-mode. Otherwise I'll upload the snippet into emacs wiki: #+begin_src lisp (defun my-org-capture-other-frame () "Create a new frame and run org-capture." (interactive) (make-frame '((name . "Org-Capture") (width . 120) (height . 20) (menu-bar-lines . 0) (tool-bar-lines . 0) (auto-lower . nil) (auto-raise . t))) (select-frame-by-name "Org-Capture") (if (condition-case nil (progn (org-capture) t) (error nil)) (delete-other-windows) (my-org-capture-other-frame-cleanup))) (defun my-org-capture-other-frame-cleanup () "Close the Org-Capture frame." (if (equal "Org-Capture" (frame-parameter nil 'name)) (delete-frame))) (add-hook 'org-capture-after-finalize-hook 'my-org-capture-other-frame-cleanup) #+end_src Thanks, Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth