From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: expand yasnippet or abbriv text inside a capture Date: Fri, 5 Jun 2015 21:57:33 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d848d670a990517c9dd74 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0woC-0004vP-Px for emacs-orgmode@gnu.org; Fri, 05 Jun 2015 14:57:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0woB-0000mL-No for emacs-orgmode@gnu.org; Fri, 05 Jun 2015 14:57:36 -0400 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]:34276) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0woB-0000m9-Fi for emacs-orgmode@gnu.org; Fri, 05 Jun 2015 14:57:35 -0400 Received: by payr10 with SMTP id r10so55886926pay.1 for ; Fri, 05 Jun 2015 11:57:34 -0700 (PDT) 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 --047d7b5d848d670a990517c9dd74 Content-Type: text/plain; charset=UTF-8 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 --047d7b5d848d670a990517c9dd74 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all

I was wondering since i have zer= o 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=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&quo= t;)
"* COOK %? =C2=A0%^g " :kill-buffer )

i want that after the COOK headline it will expand a snip= pet 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
--047d7b5d848d670a990517c9dd74-- 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: expand yasnippet or abbriv text inside a capture Date: Mon, 08 Jun 2015 12:22:27 -0400 Message-ID: <87lhfuf9vg.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1zp4-0001HJ-MV for emacs-orgmode@gnu.org; Mon, 08 Jun 2015 12:22:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1zoz-00024M-6E for emacs-orgmode@gnu.org; Mon, 08 Jun 2015 12:22:50 -0400 Received: from plane.gmane.org ([80.91.229.3]:37993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1zoz-00022q-0M for emacs-orgmode@gnu.org; Mon, 08 Jun 2015 12:22:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Z1zor-0005qF-VY for emacs-orgmode@gnu.org; Mon, 08 Jun 2015 18:22:38 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Jun 2015 18:22:37 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Jun 2015 18:22:37 +0200 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: emacs-orgmode@gnu.org Xebar Saram writes: > 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. > If this is your complete setting for org-capture-templates, you are missing closing parens (three of them if I'm counting correctly). If you have additional entries, just post the whole (setq org-capture-templates ... ) form: somebody will be able to correct it for you. > 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? > The above worked for me, so I assume it is just a paren syntax error. Nick