* Problems with capture in tables
@ 2011-05-04 7:25 Thomas Holst
2011-05-05 7:45 ` Aankhen
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Holst @ 2011-05-04 7:25 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hello,
I am trying to put a line into a table via org capture.
My org file looks like this:
#+begin_src org
* Heading 1
#+TBLNAME: Testing
| | date | weight | BMI |
|---+-----------------+--------+------|
| # | <2011-05-02 Mo> | 85 | 24.8 |
| # | <2011-05-03 Di> | 82 | 24.0 |
|---+-----------------+--------+------|
| # | | 3.0 | 0.9 |
#+TBLFM: $4=$3/(1.85)^2;%.1f::@4$3=(@I - @II-1);%.1f
#+end_src
My capture template looks like this:
#+begin_src emacs-lisp
(setq org-capture-templates
'(("x" "Testing" table-line
(file+headline "c:/temp/TestCaptTbl.org" "Heading 1")
"| # | %t | %^{weight} | |" :table-line-pos II-1)))
#+end_src
When I invoke capture I get the following error (backtrace):
: Debugger entered--Lisp error: (error "Capture template `x': stringp")
: signal(error ("Capture template `x': stringp"))
: error("Capture template `%s': %s" "x" stringp)
: byte-code("\301p!\203\x12
Now if I leave `:table-line-pos II-1' out of the template it works fine
but the line is appended at the end. That's obviously not what I want.
Tested this with =emacs -Q=
GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600) of 2010-05-08 on G41R2F1
Org-mode version 7.5 (release_7.5.246.gace72) (local modification to
makefile and org-git-link)
WinXP
--
Mit freundlichen Grüßen / Best regards
Thomas Holst
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with capture in tables
2011-05-04 7:25 Problems with capture in tables Thomas Holst
@ 2011-05-05 7:45 ` Aankhen
2011-05-05 8:09 ` Thomas Holst
0 siblings, 1 reply; 3+ messages in thread
From: Aankhen @ 2011-05-05 7:45 UTC (permalink / raw)
To: Thomas Holst, emacs-orgmode@gnu.org
Hi,
On Wed, May 4, 2011 at 12:55, Thomas Holst <thomas.holst@de.bosch.com> wrote:
> I am trying to put a line into a table via org capture.
>
> My org file looks like this:
> [snip]
>
> My capture template looks like this:
> #+begin_src emacs-lisp
> (setq org-capture-templates
> '(("x" "Testing" table-line
> (file+headline "c:/temp/TestCaptTbl.org" "Heading 1")
> "| # | %t | %^{weight} | |" :table-line-pos II-1)))
> #+end_src
>
> When I invoke capture I get the following error (backtrace):
>
> [snip]
>
> Now if I leave `:table-line-pos II-1' out of the template it works fine
> but the line is appended at the end. That's obviously not what I want.
>
> [snip]
As far as I can tell, the value of ‘:table-line-pos’ is supposed to be
a string. This seems to work for me:
,----
| (setq org-capture-templates
| '(("x" "Testing" table-line
| (file+headline "Z:/temp/TestCaptTbl.org" "Heading 1")
| "| # | %t | %^{weight} | |" :table-line-pos "II-1")))
`----
Hope this helps.
Aankhen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problems with capture in tables
2011-05-05 7:45 ` Aankhen
@ 2011-05-05 8:09 ` Thomas Holst
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Holst @ 2011-05-05 8:09 UTC (permalink / raw)
To: Aankhen; +Cc: Holst Thomas (DGS-EC/ESE4), emacs-orgmode@gnu.org
Hi Aankhen,
thanks for your answer.
· Aankhen <aankhen@gmail.com> wrote:
> Hi,
>
> On Wed, May 4, 2011 at 12:55, Thomas Holst <thomas.holst@de.bosch.com> wrote:
>> I am trying to put a line into a table via org capture.
>>
>> My org file looks like this:
>> [snip]
>>
>> My capture template looks like this:
>> #+begin_src emacs-lisp
>> (setq org-capture-templates
>> '(("x" "Testing" table-line
>> (file+headline "c:/temp/TestCaptTbl.org" "Heading 1")
>> "| # | %t | %^{weight} | |" :table-line-pos II-1)))
>> #+end_src
>>
>> When I invoke capture I get the following error (backtrace):
>>
>> [snip]
>>
>> Now if I leave `:table-line-pos II-1' out of the template it works fine
>> but the line is appended at the end. That's obviously not what I want.
>>
>> [snip]
>
> As far as I can tell, the value of ‘:table-line-pos’ is supposed to be
> a string. This seems to work for me:
>
> ,----
> | (setq org-capture-templates
> | '(("x" "Testing" table-line
> | (file+headline "Z:/temp/TestCaptTbl.org" "Heading 1")
> | "| # | %t | %^{weight} | |" :table-line-pos "II-1")))
> `----
>
> Hope this helps.
> Aankhen
That did the trick - works like a charm! I was shure I tried the string,
but I assume there was a typing error.
Thanks again.
--
Mit freundlichen Grüßen / Best regards
Thomas Holst
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-05 8:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-04 7:25 Problems with capture in tables Thomas Holst
2011-05-05 7:45 ` Aankhen
2011-05-05 8:09 ` Thomas Holst
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).