Rens Oliemans <> writes:

> ...
> However, I did not know that the _template_ also has to start with '|', and 
> org-capture
> still inserts the string "| Bad template |", which does not suggest in any 
> way that the
> lacking '|' would be the problem (after all, it is smart enough to prepend a 
> '|').
> ...
> however, is this also what's ideal? I would suggest one of the following 
> alternatives:
> - An error is signalled to the user with the root cause of the error: no '|' 
> at start of
>   template. In addition, the org-capture-templates variable documentation 
> string and the
>   manual would be updated. I am happy to create a patch for this.
> - org-capture could pre- and suffix a '|' if the user did not supply it in 
> their template.
> What are your thoughts on this?

Org mode is inconsistent here.

`org-capture-place-entry' uses `org-capture-verify-tree' and throws an
error when the template does not start from a headline or contains
headings with lower level after higher level.

Yet, `org-capture-place-item' prepends "-" when the template does not
start from a list item.

And, as you noticed, `org-capture-place-table-line' replaces the
template with "Bad template".

I think that the best course of action would be automatically fixing the
templates, as you propose in option (2), changing
`org-capture-place-entry' to automatically prepend "* " if necessary
(still leaving the subtree check though).

>   I am also happy to create a patch for this, however that would be my first 
> so such a
>   patch would perhaps have a few iterations ;)

That would be welcome. We can take as many iterations as necessary.
You may refer to for instructions.

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <>.
Support Org development at <>,
or support my work at <>

Reply via email to