Hello,

I have noticed my capture workflow breaking org document hierarchies.
Here is an example:

Start with the org document:

* A
* B

An org capture template inserts a headline under A.

* A
** [point here]
* B

When I navigate to the end of the narrowed capture buffer (e.g.
`(end-of-buffer)')  and insert text, it will break the B headline like
this:

* A
**
inserted text[point here]* B

I expected the following behavior

* A
** inserted text[point here]
* B

In the enclosed patch, I added a test for this behavior. I would
prefer that inserting text in narrowed capture buffers would not break
the document hierarchy. The fix is to subtract one from the `end'
originally supplied to `org-capture-narrow'.

--
Martin Yrjölä

Attachment: 0001-org-capture-fix-capture-breaking-next-headline.patch
Description: Binary data

Reply via email to