Rens Oliemans writes: > * lisp/org-capture.el (org-capture-place-entry): Prepend heading to > template if the template does not yet start with a heading. > > * testing/lisp/test-org-capture.el (test-org-capture/entry): Add two > tests: no error is raised when org-capture is called with a template > that does not start with a heading; and org-capture should error with > a template with a lower heading after a higher heading. > > Link: https://list.orgmode.org/877chnc0lr.fsf@localhost/ > --- > First iteration of these patches, please let me know if anything can be improved, either > about the code or patches themselves (I am not used to sending patches via email). Thanks! I have improved your patches a little, fixing the regular expression used to match headings ("^*" is not accurate, you need org-outline-regexp-bol), and adding another test case. See the attached. Before I install the patches, may I know if you have FSF copyright assignment? See https://orgmode.org/worg/org-contribute.html#copyright