From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Thomas Holst <Thomas_Holst@gmx.de>
Cc: org mode mailing list <emacs-orgmode@gnu.org>
Subject: Re: Problems with capture
Date: Mon, 07 Dec 2015 19:05:14 +0100 [thread overview]
Message-ID: <87r3iym8x1.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87fuzeh07w@gmx.de> (Thomas Holst's message of "Mon, 07 Dec 2015 14:12:03 +0100")
Hello,
Thomas Holst <Thomas_Holst@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
next prev parent reply other threads:[~2015-12-07 18:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 13:12 Problems with capture Thomas Holst
2015-12-07 18:05 ` Nicolas Goaziou [this message]
2015-12-08 9:16 ` Thomas Holst
2015-12-08 12:29 ` Thomas Holst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r3iym8x1.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=Thomas_Holst@gmx.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).