Hello, Thomas Holst <thomas_ho...@gmx.de> writes:
> I have a little trouble with capture. First here is the setup for one of > my capture templates: > > #+begin_src emacs-lisp > (setq org-capture-templates > '( > ;; ... > ("hr" "Rechnung erfassen" table-line (file+function > "~/git/org-priv/Univ_Beih.org" th:capure-find-open-vers-regn) > "| # | %^u | %^{Arzt/Apotheke} | %^{fr wen|Lida|Oleg|Victor|Simon} | > %^{Betrag} | %^u | | | |" > :table-line-pos "III-1" :immediate-finish t) > ;; ... > )) > #+end_src > > What this template shall achive: > > - look if there is an entry (headline) with todo state OPEN > - if entry exists append a table line > - if entry does not exist, create a new headline, insert table structure > and append line to newly created table. > > The function `th:capture-find-open-vers-regn' does this. Creating works > fine, but a get an error: > > Error running timer `org-element--cache-sync': (error "Invalid search bound > (wrong side of point)") > > and: > > condition-case: Capture template `hr': Invalid table line specification > "III-1 > > I use something like: > > #+begin_src emacs-lisp > (org-element-map (org-element-parse-buffer) 'headline > (lambda (hl) > (and > (string= "Rechnungen" (car (org-element-property :title hl))) > (= 1 (org-element-property :level hl)) > (org-element-property :begin hl))) > nil t) > #+end_src > > To find the Position in the file and regular > > : (insert "a huge string") > > To insert new heading and table structure. The new structure is created, > but something breaks caching. How can I insert the new structure without > breaking caching? I think I fixed something related recently. Could you update Org and try again? Regards, -- Nicolas Goaziou