From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Clean capture from command line? Date: Tue, 16 Nov 2010 22:26:03 +0000 Message-ID: <8739r0gb2c.fsf@ucl.ac.uk> References: <87eialkniq.fsf@ufl.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=56953 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PITyf-0004dH-AQ for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 17:26:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PITye-0001Te-0N for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 17:26:13 -0500 Received: from vscane-a2.ucl.ac.uk ([144.82.108.42]:55863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PITyd-0001SY-NI for emacs-orgmode@gnu.org; Tue, 16 Nov 2010 17:26:11 -0500 In-Reply-To: <87eialkniq.fsf@ufl.edu> (Allen S. Rout's message of "Tue, 16 Nov 2010 15:43:25 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Allen S. Rout" Cc: emacs-orgmode@gnu.org asr@ufl.edu (Allen S. Rout) writes: > I'm one of the legion gradually slipping more and more of my day-to-day > process into org-mode. (Thanks, Carsten!) > > One of the things I'd like to be able to do is capture a new TODO from a > command line. e.g. > > shell$ capture "Fred wants a new database VM, 60G" > > and maybe eventually something obnoxious with e.g. zenity, so that a key > chord popped up a text dialog which would just seamlessly get fed to > org-capture. Basically, I want to make the notation and just keep > sailing. Of course, I've got the relevant org files open in an emacs on > another desktop: miles and miles away. :) The obvious solution > > shell$ emacsclient -c -e "(org-capture)" > > (and maybe a '-t', to keep it in the tty) > > has a problem: when I finish the capture, I'm left with the session, and > worse, when I try to close the emacsclient, (C-x #) it tells me "No > server buffers remain to edit", and I have to M-x delete-frame. > Harshing my buzz, definitely. I tried the following: : $ emacsclient -t -e "(progn (org-capture) (delete-frame))" which /sort of/ works: it brings up capture, allows me to type in various bits of the capture template (like headline and tags, if requested) but then quits immediately (and deletes the frame) when org is supposed to give me a chance to add to the entry I have created. So this is a halfway point to a solution to your problem maybe? -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 : using Org-mode version 7.3 (release_7.3.78.g9b811)