From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Rados=C5=82aw_Grzanka?= Subject: Re: org-capture-other-frame Date: Sat, 7 May 2011 10:14:54 +0200 Message-ID: References: <877ha9nfgy.fsf@ginnungagap.bsc.es> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:42201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIcfC-0004jv-SG for emacs-orgmode@gnu.org; Sat, 07 May 2011 04:14:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIcf8-0005sR-Sm for emacs-orgmode@gnu.org; Sat, 07 May 2011 04:14:58 -0400 Received: from mail-qy0-f169.google.com ([209.85.216.169]:32888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIcf8-0005sM-PK for emacs-orgmode@gnu.org; Sat, 07 May 2011 04:14:54 -0400 Received: by qyk2 with SMTP id 2so143867qyk.0 for ; Sat, 07 May 2011 01:14:54 -0700 (PDT) In-Reply-To: <877ha9nfgy.fsf@ginnungagap.bsc.es> 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 Thanks! I've asked about this a month ago or so but with no response. I will test this soon on Windows 7. Radek. 2011/5/2 Llu=C3=ADs : > 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 () > =C2=A0"Create a new frame and run org-capture." > =C2=A0(interactive) > =C2=A0(make-frame '((name . "Org-Capture") > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(width =C2=A0. 120= ) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(height . =C2=A020= ) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(menu-bar-lines . = 0) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(tool-bar-lines . = 0) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(auto-lower . nil) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(auto-raise . t))) > =C2=A0(select-frame-by-name "Org-Capture") > =C2=A0(if (condition-case nil > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(progn (org-capture) t) > =C2=A0 =C2=A0 =C2=A0 =C2=A0(error nil)) > =C2=A0 =C2=A0 =C2=A0(delete-other-windows) > =C2=A0 =C2=A0(my-org-capture-other-frame-cleanup))) > > (defun my-org-capture-other-frame-cleanup () > =C2=A0"Close the Org-Capture frame." > =C2=A0(if (equal "Org-Capture" (frame-parameter nil 'name)) > =C2=A0 =C2=A0 =C2=A0(delete-frame))) > (add-hook 'org-capture-after-finalize-hook 'my-org-capture-other-frame-cl= eanup) > #+end_src > > > Thanks, > =C2=A0 =C2=A0Lluis > > -- > =C2=A0"And it's much the same thing with knowledge, for whenever you lear= n > =C2=A0something new, the whole world becomes that much richer." > =C2=A0-- The Princess of Pure Reason, as told by Norton Juster in The Pha= ntom > =C2=A0Tollbooth > >