Re: [O] Org campture recursively expands %-escapes

2016-01-12 Thread Michael Brand
Hi Nicolas On Tue, Jan 12, 2016 at 9:42 AM, Nicolas Goaziou wrote: > > Michael Brand writes: > > > I don't understand because the org-time-stamp-formats you mention is > > already used and does not cover inactive timestamps. > > I'm talking

Re: [O] Org campture recursively expands %-escapes

2016-01-12 Thread Nicolas Goaziou
Hello, Michael Brand writes: > Maybe this and vice versa is better?: > > (ert-deftest test-org-capture/fill-template () > "Test `org-capture-fill-template' specifications." > > ;; When working on these tests consider to also change > ;;

Re: [O] Org campture recursively expands %-escapes

2016-01-11 Thread Nicolas Goaziou
Hello, Michael Brand writes: > I would like to push the attached change to add some ERTs with the > commit msg below and would like to ask you for a review first. It looks good. Thank you. Minor suggestions follow. > (ert-deftest test-org-capture/fill-template ()

Re: [O] Org campture recursively expands %-escapes

2016-01-11 Thread Michael Brand
Hi Nicolas On Tue, Jan 12, 2016 at 12:05 AM, Nicolas Goaziou wrote: > > Michael Brand writes: > >> (ert-deftest test-org-capture/fill-template () >> - "Test `org-capture-fill-template' specifications." >> + "Test `org-capture-fill-template'

Re: [O] Org campture recursively expands %-escapes

2016-01-10 Thread Michael Brand
Hi Nicolas On Sat, Jan 9, 2016 at 6:54 PM, Nicolas Goaziou wrote: > > Michael Brand writes: > > > My current ERT for test-org-feed.el > > > >(equal > > "5 % Less (See\n Item \"3)\" Somewhere)" > > (org-feed-format-entry > >

Re: [O] Org campture recursively expands %-escapes

2016-01-09 Thread Nicolas Goaziou
Hello, Michael Brand writes: > On the other hand commit release_8.3.3-415-ge2fbaee breaks the ERT > that I suggested in this thread or its simplification here: > > (progn > (require 'org-feed) > (equal "\"A)" (org-feed-format-entry >

Re: [O] Org campture recursively expands %-escapes

2016-01-09 Thread Nicolas Goaziou
Michael Brand writes: > My current ERT for test-org-feed.el > >(equal > "5 % Less (See\n Item \"3)\" Somewhere)" > (org-feed-format-entry > '(:title "5 % less (see\n item \"3)\" somewhere)") > "%(capitalize \"%h\")" nil)) > > works now too. What

Re: [O] Org campture recursively expands %-escapes

2016-01-09 Thread Michael Brand
Hi Nicolas On Sat, Jan 9, 2016 at 5:05 PM, Nicolas Goaziou wrote: > > Michael Brand writes: > > > On the other hand commit release_8.3.3-415-ge2fbaee breaks the ERT > > that I suggested in this thread or its simplification here: > > > >

Re: [O] Org campture recursively expands %-escapes

2016-01-09 Thread Michael Brand
Hi Nicolas On Fri, Jan 8, 2016 at 11:44 PM, Nicolas Goaziou wrote: > > Michael Brand writes: > > > I'm porting test-org-capture.el to test-org-feed.el and found this > > issue in org-feed-format-entry: Evaluation of > > > >

Re: [O] Org campture recursively expands %-escapes

2016-01-08 Thread Michael Brand
Hi Nicolas On Thu, Jan 7, 2016 at 5:35 PM, Nicolas Goaziou wrote: > For now, I left some code duplication. The issue is, hopefully, fixed, > however. It is, thank you! > I didn't add your ert, but if you provide a patch with > a "test-org-feed.el" file, I can add it. It

Re: [O] Org campture recursively expands %-escapes

2016-01-08 Thread Nicolas Goaziou
Michael Brand writes: > I'm porting test-org-capture.el to test-org-feed.el and found this > issue in org-feed-format-entry: Evaluation of > > (org-feed-format-entry '(:title "success!") "%h" nil) > > with Emacs 24.5 results in "Lisp error: (args-out-of-range

Re: [O] Org campture recursively expands %-escapes

2016-01-05 Thread Michael Brand
Hi Nicolas On Wed, Jan 6, 2016 at 12:39 AM, Nicolas Goaziou wrote: > I do. Somehow, I didn't see this before. This is because I renamed > `org-capture-expand-embedded-elisp' into > `org-capture--expand-embedded-elisp'. > > However, ISTM there is some code duplication

Re: [O] Org campture recursively expands %-escapes

2016-01-05 Thread Nicolas Goaziou
Michael Brand writes: > When you evaluate > > (progn > (require 'org-feed) > (org-feed-format-entry >'(:title "5 % less (see\n item \"3)\" somewhere)" ; %h > :link "http://ORGMODE.org; ; %a > :pubDate "Sat, 02 Jan 2016 12:00:00 +") ; %u >

Re: [O] Org campture recursively expands %-escapes

2016-01-03 Thread Nicolas Goaziou
Michael Brand writes: > On Sun, Jan 3, 2016 at 8:51 PM, Nicolas Goaziou > wrote: >> >> Michael Brand writes: >> >> > release_8.3.2-350-gbd3a2cb introduces a regression of "%()" in Org >> > feed templates. See >> >

Re: [O] Org campture recursively expands %-escapes

2016-01-03 Thread Michael Brand
Hi Nicolas On Sun, Jan 3, 2016 at 10:07 PM, Nicolas Goaziou wrote: > The only error I get is a difference of indentation before the date. Am > I missing something ? When you evaluate (progn (require 'org-feed) (org-feed-format-entry '(:title "5 % less (see\n item

Re: [O] Org campture recursively expands %-escapes

2016-01-03 Thread Michael Brand
Hi Nicolas On Sun, Jan 3, 2016 at 8:51 PM, Nicolas Goaziou wrote: > > Michael Brand writes: > > > release_8.3.2-350-gbd3a2cb introduces a regression of "%()" in Org > > feed templates. See > > - commit release_7.8.10-1057-g042db37 > > -

Re: [O] Org campture recursively expands %-escapes

2016-01-03 Thread Michael Brand
Hi Nicolas On Sun, Nov 29, 2015 at 5:00 PM, Nicolas Goaziou wrote: > I committed a patch along those lines in master. Please let me know if > anything goes wrong with capture templates. release_8.3.2-350-gbd3a2cb introduces a regression of "%()" in Org feed templates.

Re: [O] Org campture recursively expands %-escapes

2016-01-03 Thread Nicolas Goaziou
Hello, Michael Brand writes: > release_8.3.2-350-gbd3a2cb introduces a regression of "%()" in Org > feed templates. See > - commit release_7.8.10-1057-g042db37 > - (commit release_7.8.10-1068-ge1d5a31) > - http://thread.gmane.org/gmane.emacs.orgmode/56991 > > I just

Re: [O] Org campture recursively expands %-escapes

2015-11-29 Thread Nicolas Goaziou
>> i think i understand. maybe we need another way to pass %i. > > I guess we could restict "%()" evaluation to the Sexp defined in the > initial template. I committed a patch along those lines in master. Please let me know if anything goes wrong with capture templates.

Re: [O] Org campture recursively expands %-escapes

2015-11-26 Thread Samuel Wales
On 11/26/15, Nicolas Goaziou wrote: > Samuel Wales writes: >> just to clarify, >> >> "%(alpha-org-protocol-string \"%:link\" \"%:description\" \"%i\")" >> >> is not recursive, right? > > It is. the above is the only way i was able to get

Re: [O] Org campture recursively expands %-escapes

2015-11-26 Thread Nicolas Goaziou
Hello, Samuel Wales writes: > just to clarify, > > "%(alpha-org-protocol-string \"%:link\" \"%:description\" \"%i\")" > > is not recursive, right? It is. The first two are documented in org-capture-templates' docstring. So I guess they are fine. However, the last

Re: [O] Org campture recursively expands %-escapes

2015-11-26 Thread Nicolas Goaziou
Samuel Wales writes: > the above is the only way i was able to get org-protocol to do what > i needed. OK. > i think i understand. maybe we need another way to pass %i. I guess we could restict "%()" evaluation to the Sexp defined in the initial template. Regards,

Re: [O] Org campture recursively expands %-escapes

2015-11-26 Thread Nicolas Goaziou
Hello, Thomas Preindl writes: > setting up my capture templates to work with a new Chrome extension I > noticed that when i mark some text containing %-escapes inserted with the > '%i' in the template the %-escape was > evaluated. > > For example, marking %(print

Re: [O] Org campture recursively expands %-escapes

2015-11-26 Thread Samuel Wales
just to clarify, "%(alpha-org-protocol-string \"%:link\" \"%:description\" \"%i\")" is not recursive, right?

[O] Org campture recursively expands %-escapes

2015-11-21 Thread Thomas Preindl
Hi everyone, setting up my capture templates to work with a new Chrome extension I noticed that when i mark some text containing %-escapes inserted with the '%i' in the template the %-escape was evaluated. For example, marking %(print (buffer-name)) will be replaced with "*Capture*". I am now