From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Capture from terminal command line? Date: Thu, 29 Sep 2011 11:01:50 -0600 Message-ID: <87mxdn8ept.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9K00-0000Vx-Ay for emacs-orgmode@gnu.org; Thu, 29 Sep 2011 13:02:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9Jzu-0005US-TO for emacs-orgmode@gnu.org; Thu, 29 Sep 2011 13:02:16 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:42472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9Jzu-0005UJ-Ip for emacs-orgmode@gnu.org; Thu, 29 Sep 2011 13:02:10 -0400 Received: by gya6 with SMTP id 6so895617gya.0 for ; Thu, 29 Sep 2011 10:02:09 -0700 (PDT) In-Reply-To: (Nathan Neff's message of "Thu, 29 Sep 2011 09:13:15 -0500") 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: Nathan Neff Cc: emacs-orgmode --=-=-= Content-Type: text/plain Nathan Neff writes: > I'm looking for a way to capture notes from a terminal, > without having to jump over to emacs. > > In the past, I simply append the text from the command line > to my ~/refile.org file, but if I have emacs running and have a modified > ~/refile.org buffer, then I run into complications. > > I think that a good way would be to have a bash script > that tells emacs to run one of the org-capture functions, > along with the newly entered text from the command line. > > Can anyone point me to the right function to call? > If you have your emacs running a server [1], then you can easily connect from without using emacsclient. For example this short shell script will echo its arguments in your message buffer. Cheers -- Eric --=-=-= Content-Type: text/x-sh Content-Disposition: inline; filename=to-emacs.sh #!/bin/sh emacsclient -e "(message \"hello from the command line: $(echo "$@") \")" --=-=-= Content-Type: text/plain > > Thanks, > --Nate > Footnotes: [1] http://www.gnu.org/software/emacs/manual/html_node/emacs/Emacs-Server.html -- Eric Schulte http://cs.unm.edu/~eschulte/ --=-=-=--