Re: [PATCH] Fix org-narrow-to-subtree smaller than subtree

2020-05-31 Thread Nicolas Goaziou
Hello, Kevin Liu writes: > Good point. `org-mark-element` uses (org-element-property); I wonder if > it makes sense to have the actual :end property of a subtree be the same > as its narrowed boundary? I don't think so. This is an issue in narrowing, not in the parser. I fixed the bug in

Re: [PATCH] Fix org-narrow-to-subtree smaller than subtree

2020-05-30 Thread Kevin Liu
> There is a good reason for this. If you insert text at (point-max), you > break the following headline. > > OTOH `org-mark-element' should pay attention to buffer boundaries. Good point. `org-mark-element` uses (org-element-property); I wonder if it makes sense to have the actual :end

Re: [PATCH] Fix org-narrow-to-subtree smaller than subtree

2020-05-30 Thread Nicolas Goaziou
Hello, Kevin Liu writes: > Right now a narrowed subtree is one char smaller than the actual > subtree. (org-mark-element) on a narrowed subtree will select a > region 1 char out of bounds, for example. There doesn't seem like a > good reason for this to be the case. There is a good reason

Re: [PATCH] Fix org-narrow-to-subtree smaller than subtree

2020-05-30 Thread Kevin Liu
Oh, of course I attached the wrong patch again. Wish mu4e-compose could preview these. >From 5f7cf68f92d3fa82d01646f7f1e12a4d18bad2fb Mon Sep 17 00:00:00 2001 From: nivekuil Date: Sat, 30 May 2020 00:11:19 -0700 Subject: [PATCH] Make narrowed subtree same size as the subtree, not 1 char less