Re: org-capture-template: table lines including newline of sorts
On 15/03/2021 03:41, Uwe Brauer wrote: On 2021-03-13 02:24, Uwe Brauer wrote: Do you need to add more pipes to keep the table structure on the line after the newline? I don't think so. I am afraid, then you should significantly modify implementation for table-line capture type. Your examples are hardly could be considered as minimal that anyone could easily try. I admit that you need namely the template for exams that could be quickly filled from email, but still... ("w" "Table - works" table-line (file+headline "" "Table") "| %U | It |\n| | Works |" :prepend t) ("b" "Table - broken" table-line (file+headline "" "Table") "| %U | Broken\nmultiline |" :prepend t)
Re: org-capture-template: table lines including newline of sorts
On 2021-03-18 03:38, Uwe Brauer wrote: I commented out all my templates So the only entry is ("s" "timeslip" table-line (file "/home/oub/timeslips.org") ;; (file "d:/ActiveFiles/timeslips.org") "\| %(org-read-date)\| %^{FileName} %i\| %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" Timeslips.org is empty. I mark a line in my org-init file and fire up org-capture using your template, I insert as file name org-init, narrative I insert blabla time I insert 10:00 Expense I insert 10 And I obtain | Bad template What do I miss here? Maybe try a minimal Emacs, just to make sure something else isn't affecting it? Cheers, TRS-80
Re: org-capture-template: table lines including newline of sorts
On 2021-03-15 10:14, Uwe Brauer wrote: Uwe Brauer writes: Break up the line however you wish into quoted substrings and concat them together..? No entirely sure that you mean by quoted substrings, can you give me an example, please? I am not same guy you were replying to, but: #+begin_src emacs-lisp (concat "Add " "all " "these " "strings " "together!") ;; result: "Add all these strings together!" #+end_src I use it a lot when: - things start to get complicated (some regexp) - I want to maintain lines in source that will match output - in some other cases, too. Really helpful! Cheers, TRS-80
Re: org-capture-template: table lines including newline of sorts
> On 3/16/21 3:34 AM, Uwe Brauer wrote: > I'm running org 9.4.4 and emacs 28.0.50, (both from source) on Debian > testing. According to my notes in my init file I created the template > in early July 2011, modified it slightly two years later. I do not > recall any problems with it. > Just to make sure that there is no problem with the timeslips > template, at least on my system, I commented out all of the capture > templates before and after the timeslips template and reloaded my init > file. I ran org-capture (bound to C-cm). The timeslips came up in the > dispatcher and it ran OK. > I notice that I was off by a key and typed periods and not semicolons > in the two lines "some capture templates," and, "some more capture > templates." I commented out all my templates So the only entry is ("s" "timeslip" table-line (file "/home/oub/timeslips.org") ;; (file "d:/ActiveFiles/timeslips.org") "\| %(org-read-date)\| %^{FileName} %i\| %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" Timeslips.org is empty. I mark a line in my org-init file and fire up org-capture using your template, I insert as file name org-init, narrative I insert blabla time I insert 10:00 Expense I insert 10 And I obtain | Bad template What do I miss here? Thanks Uwe smime.p7s Description: S/MIME cryptographic signature
Re: org-capture-template: table lines including newline of sorts
On 3/16/21 3:34 AM, Uwe Brauer wrote: > On 3/15/21 5:00 PM, Uwe Brauer wrote: > My bad; I did not pay attention to a four line comment, so here it is > again, with the comment and final line for the template, etc. > (setq org-capture-template '( > . . . some capture templates > ("s" "timeslip" table-line > (file "/mnt/Data/ActiveFiles/timeslips.org") >;; (file "d:/ActiveFiles/timeslips.org") > "\| %(org-read-date)\| %^{FileName} %i\| > %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" > ;; Note that there is no escape and pipe after the final content input >expansion > ;; if there were a \| then an empty column is added > ;; (org-read-date) added 2013-07-12; see Sacha Chua's use of same as in > ;; the ledger templates below. > :empty-lines 1) > , , , some more capture templates > )) I still obtain | Bad template Even copying your code without any modifications! I am running org 9.3.7 I'm running org 9.4.4 and emacs 28.0.50, (both from source) on Debian testing. According to my notes in my init file I created the template in early July 2011, modified it slightly two years later. I do not recall any problems with it. Just to make sure that there is no problem with the timeslips template, at least on my system, I commented out all of the capture templates before and after the timeslips template and reloaded my init file. I ran org-capture (bound to C-cm). The timeslips came up in the dispatcher and it ran OK. I notice that I was off by a key and typed periods and not semicolons in the two lines "some capture templates," and, "some more capture templates." Charlie Millar
Re: org-capture-template: table lines including newline of sorts
> On 3/15/21 5:00 PM, Uwe Brauer wrote: > My bad; I did not pay attention to a four line comment, so here it is > again, with the comment and final line for the template, etc. > (setq org-capture-template '( > . . . some capture templates > ("s" "timeslip" table-line > (file "/mnt/Data/ActiveFiles/timeslips.org") >;; (file "d:/ActiveFiles/timeslips.org") > "\| %(org-read-date)\| %^{FileName} %i\| > %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" > ;; Note that there is no escape and pipe after the final content input >expansion > ;; if there were a \| then an empty column is added > ;; (org-read-date) added 2013-07-12; see Sacha Chua's use of same as in > ;; the ledger templates below. > :empty-lines 1) > , , , some more capture templates > )) I still obtain | Bad template Even copying your code without any modifications! I am running org 9.3.7 smime.p7s Description: S/MIME cryptographic signature
Re: org-capture-template: table lines including newline of sorts
On 3/15/21 5:00 PM, Uwe Brauer wrote: "CM" == Charles Millar writes: > On 3/15/21 10:13 AM, Uwe Brauer wrote: >> >>> Hi, >>> On 3/14/21 1:00 PM, TRS-80 wrote: >>> You may have to escape the pipes. I did that in a similar capture template. >> Can you give me an example, please? >> > HTH > ("s" "timeslip" table-line > (file "/mnt/Data/ActiveFiles/timeslips.org") > "\| %(org-read-date)\| %^{FileName} %i\| > %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" There is a ) missing, no? I tried ("s" "timeslip" table-line (file "/home/oub/timeslips.org") "\| \| %fromname\| :%subject\| %a \| %:date") But I obtain bad template when executing the code My bad; I did not pay attention to a four line comment, so here it is again, with the comment and final line for the template, etc. (setq org-capture-template '( . . . some capture templates ("s" "timeslip" table-line (file "/mnt/Data/ActiveFiles/timeslips.org") ;; (file "d:/ActiveFiles/timeslips.org") "\| %(org-read-date)\| %^{FileName} %i\| %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" ;; Note that there is no escape and pipe after the final content input expansion ;; if there were a \| then an empty column is added ;; (org-read-date) added 2013-07-12; see Sacha Chua's use of same as in ;; the ledger templates below. :empty-lines 1) , , , some more capture templates ))
Re: org-capture-template: table lines including newline of sorts
>>> "CM" == Charles Millar writes: > On 3/15/21 10:13 AM, Uwe Brauer wrote: >> >>> Hi, >>> On 3/14/21 1:00 PM, TRS-80 wrote: >>> You may have to escape the pipes. I did that in a similar capture template. >> Can you give me an example, please? >> > HTH > ("s" "timeslip" table-line > (file "/mnt/Data/ActiveFiles/timeslips.org") > "\| %(org-read-date)\| %^{FileName} %i\| > %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" There is a ) missing, no? I tried ("s" "timeslip" table-line (file "/home/oub/timeslips.org") "\| \| %fromname\| :%subject\| %a \| %:date") But I obtain bad template when executing the code smime.p7s Description: S/MIME cryptographic signature
Re: org-capture-template: table lines including newline of sorts
On 3/15/21 10:13 AM, Uwe Brauer wrote: Hi, On 3/14/21 1:00 PM, TRS-80 wrote: You may have to escape the pipes. I did that in a similar capture template. Can you give me an example, please? HTH ("s" "timeslip" table-line (file "/mnt/Data/ActiveFiles/timeslips.org") "\| %(org-read-date)\| %^{FileName} %i\| %^{Narrative} %i\| %^{Time} %i\| %^{Expense} %i" Charlie Millar
Re: org-capture-template: table lines including newline of sorts
> Uwe Brauer writes: > Break up the line however you wish into quoted substrings and concat > them together..? No entirely sure that you mean by quoted substrings, can you give me an example, please? smime.p7s Description: S/MIME cryptographic signature
Re: org-capture-template: table lines including newline of sorts
> Hi, > On 3/14/21 1:00 PM, TRS-80 wrote: > You may have to escape the pipes. I did that in a similar capture template. Can you give me an example, please? smime.p7s Description: S/MIME cryptographic signature
Re: org-capture-template: table lines including newline of sorts
Uwe Brauer writes: > Currently I have the following setting for one org-capture-template: > > > ("mu" "Stat+Num:Exercises English" > table-line (file+headline "~/Somefile.org" "Exercise Group-E") > "| %:fromname|%:fromaddress | > %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " > :prepend t > ) > > That line is too long, I'd like something like this > ("mu" "Stat+Num:Exercises English" > table-line (file+headline "~/Somefile.org" "Exercise Group-E") > "| %:fromname|%:fromaddress\n > %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " > :prepend t > ) > > Or > > ("mu" "Stat+Num:Exercises English" > table-line (file+headline "~/Somefile.org" "Exercise Group-E") > "| %:fromname|%:fromaddress\n > %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " > :prepend t > "| | %(my-extract-cc) | | | | | | || | | || > | " :prepend t > ) > > > But nothing worked, any ideas? Break up the line however you wish into quoted substrings and concat them together..? -- David Masterson
Re: org-capture-template: table lines including newline of sorts
Hi, On 3/14/21 1:00 PM, TRS-80 wrote: On 2021-03-13 02:24, Uwe Brauer wrote: Hi Currently I have the following setting for one org-capture-template: ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress | %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t ) That line is too long, I'd like something like this ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress\n %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t ) Or ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress\n %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t "| | %(my-extract-cc) | | | | | | | | | | | | | " :prepend t ) But nothing worked, any ideas? Thanks and regards Uwe Brauer Do you need to add more pipes to keep the table structure on the line after the newline? Cheers, TRS-80 You may have to escape the pipes. I did that in a similar capture template. Charlie Millar
Re: org-capture-template: table lines including newline of sorts
> On 2021-03-13 02:24, Uwe Brauer wrote: > Do you need to add more pipes to keep the table structure on the line > after the newline? I don't think so. smime.p7s Description: S/MIME cryptographic signature
Re: org-capture-template: table lines including newline of sorts
On 2021-03-13 02:24, Uwe Brauer wrote: Hi Currently I have the following setting for one org-capture-template: ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress | %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t ) That line is too long, I'd like something like this ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress\n %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t ) Or ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress\n %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t "| | %(my-extract-cc) | | | | | | || | | || | " :prepend t ) But nothing worked, any ideas? Thanks and regards Uwe Brauer Do you need to add more pipes to keep the table structure on the line after the newline? Cheers, TRS-80
org-capture-template: table lines including newline of sorts
Hi Currently I have the following setting for one org-capture-template: ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress | %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t ) That line is too long, I'd like something like this ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress\n %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t ) Or ("mu" "Stat+Num:Exercises English" table-line (file+headline "~/Somefile.org" "Exercise Group-E") "| %:fromname|%:fromaddress\n %(my-extract-cc)|%^{Sheet|1|2|3|4|5|6}|%^{Exercise|1|} | %a|%:date | " :prepend t "| | %(my-extract-cc) | | | | | | || | | ||| " :prepend t ) But nothing worked, any ideas? Thanks and regards Uwe Brauer