[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Add the capture feature "%(sexp)" to org-feed
From: |
Michael Brand |
Subject: |
Re: [O] Add the capture feature "%(sexp)" to org-feed |
Date: |
Thu, 9 Aug 2012 20:00:37 +0200 |
Hi Bastien
On Thu, Aug 9, 2012 at 4:53 PM, Bastien <address@hidden> wrote:
> I've check against current Emacs trunk, and only three files/packages
> uses this: rst.el, filesets.el and mh-e.
>
> So I'd rather not pollute the hundred files of Org with this.
That's all right.
> (org-at-regexp-p org-capture-template-embedded-elisp-re) already
> returns the correct value for %(length ")")
For the above example yes, but not with more than one %():
“- %(capitalize "simple percent-escape")\n- %(capitalize "one more")”
Also non-greedy regexp is not enough here:
“%(capitalize "(some) text")”
> -- but you're right there
> is a problem with my patch: `org-at-regexp-p' does not match over
> multiple lines. Maybe you can play with `org-in-regexp':
>
> (org-in-regexp org-capture-template-embedded-elisp-re 3)
>
> If using `forward-sexp' is necessary let's do so -- but I thought it
> was too complex first.
When I wrote the patch my conclusion was that regexp alone is not
sufficient. For real feed templates used by me, not only for
artificial examples. I must admit that my solution with `forward-sexp'
is complicated but it makes available the power of the Emacs Lisp Mode
parser. Maybe there are still some simplifications?
Michael
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Bastien, 2012/08/07
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Michael Brand, 2012/08/09
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Bastien, 2012/08/09
- Re: [O] Add the capture feature "%(sexp)" to org-feed,
Michael Brand <=
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Bastien, 2012/08/10
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Michael Brand, 2012/08/11
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Bastien, 2012/08/11
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Michael Brand, 2012/08/11
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Bastien, 2012/08/11
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Michael Brand, 2012/08/12
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Bastien, 2012/08/12
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Ivan Andrus, 2012/08/09
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Michael Brand, 2012/08/10
- Re: [O] Add the capture feature "%(sexp)" to org-feed, Bastien, 2012/08/10