[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Clean capture from command line?

From: Friedrich Delgado
Subject: Re: [Orgmode] Clean capture from command line?
Date: Wed, 17 Nov 2010 00:35:31 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

I use zsh and I already use this:

,----[ ~/bin/uriescapepwd.pl ]
  #!/usr/bin/perl -w
  use URI::Escape qw/ uri_escape uri_escape_utf8 /;
  use Cwd qw/getcwd abs_path/;
  $pwd = abs_path(getcwd);
  print uri_escape_utf8($pwd);

,----[ .zshrc snippet ]
  # bind <f9>n to org-store-link
  bindkey -s "\e[20~n" 'emacsclient 

(I stole this from somewhere, can't remember where, possibly this

it should be easy to just do
  # bind <f9>t to org-remember
  bindkey -s "\e[20~t" 'emacsclient 

(I'm old school.)

or even
  # bind <f9>t to org-remember
  bindkey -s "\e[20~t" 'emacsclient 

I didn't test this, since I very rarely even use the first binding.

I'm pretty sure this must be possible with bash and other shells as

Of course this leaves you in the emacsclient again, so you probably
want to follow Eric's hints on top of that.

Eric S Fraga schrieb:
> address@hidden (Allen S. Rout) writes:
> > 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?

        Friedrich Delgado <address@hidden>
                             TauPan on Ircnet and Freenode ;)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]