From mboxrd@z Thu Jan 1 00:00:00 1970 From: jackin Subject: Re: Trigger org-capture window using linux shortcut key Date: Wed, 12 Jun 2013 20:49:38 +0900 Message-ID: <1371037778.2897.17.camel@debian-01.utsunomiya-u.ac.jp> References: <8738tead5p.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39482) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmjXP-0004EW-RP for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 07:48:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmjXM-0001Wk-RO for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 07:48:27 -0400 Received: from yutaki.utsunomiya-u.ac.jp ([160.12.128.11]:33553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmjXM-0001WB-9z for emacs-orgmode@gnu.org; Wed, 12 Jun 2013 07:48:24 -0400 In-Reply-To: <8738tead5p.fsf@fastmail.fm> 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: Matt Lundin , Michael Strey Cc: emacs-orgmode@gnu.org Sincere thanks for your reply . I got it to work on my Debian machine as follows. Ref: http://comments.gmane.org/gmane.emacs.orgmode/33650 1) I appended these lines to my ~/.emacs file (defadvice org-capture-finalize (after delete-capture-frame activate) "Advise capture-finalize to close the frame if it is the capture frame" (if (equal "capture" (frame-parameter nil 'name)) (delete-frame))) (defadvice org-capture-destroy (after delete-capture-frame activate) "Advise capture-destroy to close the frame if it is the capture frame" (if (equal "capture" (frame-parameter nil 'name)) (delete-frame))) (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) (org-capture) ) 2) On the debian machine - System -> Preferences -> Keyboard Shortcuts -> Add -> Command : /usr/bin/emacsclient -n -e '(make-capture-frame)' Shortcut : Ctrl+Alt+C (or any of your favorite key combination) That's it! Works like a charm for me and now I can capture anything that flashes across my mind in a fraction of seconds, not disturbing my original work flow on the PC. regards, Jackin On Wed, 2013-05-22 at 17:00 -0500, Matt Lundin wrote: > Jackin writes: > > > I am wondering if it is possible to start a org-capture window > > (when not within emacs) using a shortcut key. Org-protocol allows this > > to be done from a web browser or adobe reader which is very useful. But > > I am thinking of a more general solution, for triggering a org-capture > > window from any where in Linux -> type in something and -> C-c c-c. > > > > Any ideas or solutions? Thanks in advance. > > The answer will likely depend on which desktop or window manager you > use. I have the following in my openbox rc.xml: > > > > emacsclient -c -e "(org-capture)" > > > > Gnome and KDE will likely have a GUI for adding custom keyboard > shortcuts. > > Best, > Matt >