From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: expand yasnippet or abbriv text inside a capture Date: Sat, 6 Jun 2015 09:54:51 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7bfeac0ca0293e0517d3e2d0 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z180M-0006TO-7Q for emacs-orgmode@gnu.org; Sat, 06 Jun 2015 02:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z180K-00044P-K2 for emacs-orgmode@gnu.org; Sat, 06 Jun 2015 02:54:53 -0400 Received: from mail-pd0-x236.google.com ([2607:f8b0:400e:c02::236]:35294) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z180K-00044E-7I for emacs-orgmode@gnu.org; Sat, 06 Jun 2015 02:54:52 -0400 Received: by pdbnf5 with SMTP id nf5so67073675pdb.2 for ; Fri, 05 Jun 2015 23:54:51 -0700 (PDT) In-Reply-To: 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: org mode --047d7bfeac0ca0293e0517d3e2d0 Content-Type: text/plain; charset=UTF-8 Ok so i made some progress here. i think i can just use the org capture itself to suit my needs. but as i dont know elisp i got stuck with this: (setq org-capture-templates (quote ( ("f" "food" entry (file+headline "/home/zeltak/org/files/agenda/food.org" "Inbox") "* Cook %? %^g :PROPERTIES: :Time: :Rating: :Source: :Ammount: :Fav: :Type: :ID: :END: ** HEADER 2 ** HEADER 3 " ) when i add the subheaders ** HEADER 2 and ** HEADER 3 i can eval the section anymore. Do i need to escape the * somehow? i just want 2 same level subheadrs below the main capture header/ whats the best way to do this? best Z On Fri, Jun 5, 2015 at 9:57 PM, Xebar Saram wrote: > Hi all > > I was wondering since i have zero lisp (or coding at all) skills if anyone > could show me an example on how to expand yasnippet or text as part of a > org capture > > i think that using %(sexp) would work (im guessing here :)) > > i have this capture > > ("f" "food" entry (file+headline "/home/zeltak/org/files/agenda/food.org" > "Inbox") > "* COOK %? %^g " :kill-buffer ) > > i want that after the COOK headline it will expand a snippet or if not > possible add a property drawer. > > also related can org ask me to fill in specific properties in a property > drawer as part of the capture? > > thx! > > Z > --047d7bfeac0ca0293e0517d3e2d0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ok so i made some progress here. i think i can just use th= e org capture itself to suit my needs. but as i dont know elisp i got stuck= with this:

=C2=A0 (setq org-capture-templates
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (quote ( =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=C2=A0
("f" "food" entry (file+headline &q= uot;/home/zeltak/org/files/agenda/food.org&= quot; "Inbox")
=C2=A0"* Cook %? %^g=C2=A0
=C2=A0 =C2=A0:PROPERTIES:
=C2=A0 =C2=A0:Time: =C2=A0 =C2=A0=C2= =A0
=C2=A0 =C2=A0:Rating: =C2=A0=C2=A0
=C2=A0 =C2=A0:So= urce: =C2=A0=C2=A0
=C2=A0 =C2=A0:Ammount: =C2=A0
=C2=A0= =C2=A0:Fav:=C2=A0
=C2=A0 =C2=A0:Type:=C2=A0
=C2=A0 =C2= =A0:ID: =C2=A0=C2=A0
=C2=A0 =C2=A0:END:

= ** HEADER 2
** HEADER 3 " )

w= hen i add the subheaders ** HEADER 2 and ** HEADER 3 i can eval the section= anymore.

Do i need to escape the * somehow? i jus= t want 2 same level subheadrs below the main capture header/
what= s the best way to do this?

best=C2=A0
Z



On Fri, Jun 5, 2015 at 9:57 PM, Xeba= r Saram <zeltakc@gmail.com> wrote:
Hi all

I was wondering since= i have zero lisp (or coding at all) skills if anyone could show me an exam= ple on how to expand yasnippet or text as part of a org capture
<= br>
i think that using=C2=A0%(sexp) would work (im guessing here = :))

i have this capture=C2=A0

=
("f" "food" entry (file+headline "/home/= zeltak/org/files/agenda/food.= org" "Inbox")
"* COOK %? =C2=A0%^g "= :kill-buffer )

i want that after the COOK h= eadline it will expand a snippet or if not possible add a property drawer.<= /div>

also related can org ask me to fill in specific pr= operties in a property drawer as part of the capture?

<= div>thx!

Z

--047d7bfeac0ca0293e0517d3e2d0--