From mboxrd@z Thu Jan 1 00:00:00 1970 From: tycho garen Subject: Re: Clean capture from command line? Date: Wed, 17 Nov 2010 13:24:53 -0500 Message-ID: <20101117182453.GC16104@arendt.linode.com> References: <87eialkniq.fsf@ufl.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0163223678==" Return-path: Received: from [140.186.70.92] (port=44599 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PImgx-0001Sc-Js for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 13:25:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PImgs-0000r2-1o for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 13:25:11 -0500 Received: from foucault.cyborginstitute.net ([97.107.134.101]:50913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PImgr-0000qt-W9 for emacs-orgmode@gnu.org; Wed, 17 Nov 2010 13:25:06 -0500 Received: from localhost (localhost [127.0.0.1]) by foucault.cyborginstitute.net (Postfix) with ESMTP id B9CA3EBD0 for ; Wed, 17 Nov 2010 13:25:04 -0500 (EST) In-Reply-To: <87eialkniq.fsf@ufl.edu> 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: emacs-orgmode@gnu.org --===============0163223678== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kfjH4zxOES6UT95V" Content-Disposition: inline --kfjH4zxOES6UT95V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > One of the things I'd like to be able to do is capture a new TODO from a > command line. e.g. I use the following code that I got from Jack Moffit (http://www.metajack.im), that does more or less what you're looking for, I think. Add the following block to your org configs.=20 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defadvice 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 capture-destroy (after delete-capture-frame activate) "Advise capture-destroy to close the frame if it is the rememeber 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) ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Then call emacs as follows:=20 emacsclient -n -e '(make-capture-frame)' Even better than calling from the command line in my experience is triggering directly from your window manager, or something like quicksliver if you use OS X...=20 I hope this is a start....=20 --=20 tycho(ish) @ garen@tychoish.com http://www.tychoish.com/ http://www.cyborginstitute.com/ "don't get it right, get it written" -- james thurber --kfjH4zxOES6UT95V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAkzkHfUACgkQTNyVHPbFB4q/fwCfS2h7kHemRJtdbfFbgZtQ97CC VyQAn2LvCwJATN7xPSSp4MRPeqWDWYPA =aH6w -----END PGP SIGNATURE----- --kfjH4zxOES6UT95V-- --===============0163223678== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0163223678==--