Hello Nicolas,

thank you for fixing this. I can confirm that my capture template is working again.

--
  Thomas


Am 17.05.2018 um 23:01 schrieb Nicolas Goaziou:
Hello,

Thomas Holst <thomas_holst@gmx.de> writes:

Hi Nicolas,

thank you for looking into this.

To reproduce the error I have to use file+function target. There is no 
error if I use file+headline target.

Here is an ECM:

#+begin_src org
* Setup

#+begin_src emacs-lisp
  (setq org-capture-template nil)

  (setq
  org-capture-templates
  '(("x" "Testing" table-line (file+function 
"~/tmp/capture-bug/ecm.org" th:test-capture)
  "| | | %^{Arzt/Apotheke} |"
  :table-line-pos "III-1" :immediate-finish t)))

  (defun th:test-capture ()
  "Sets point to headline"
  (interactive)
  (goto-char (point-min))
  (org-speed-move-safe (quote org-next-visible-heading)))
#+end_src

* testing capture
|---+-----------------+------|
| ! | Datum           | Arzt |
|---+-----------------+------|
|   |                 |      |
|---+-----------------+------|
| # |                 |      |
|---+-----------------+------|
#+end_src

The function "th:test-capture" sets point to beginning of headline 
"testing capture".

I experimented with several point positions (end of the headline, line 
below headline). But none worked. The error stayed the same.

And here is the backtrace:
Debugger entered--Lisp error: (error "Capture template ‘hr’: 
integer-or-marker-p")
Fixed. Thank you.

Regards,