Hello,j

Leo Vivier <leo.viv...@gmail.com> writes:

> The problem is inherent to Emacs's narrowing.  In org-mode, the
> narrowing commands use `org-end-of-subtree' to retrieve the
> end-position of the region to be narrowed.  However, with a 1-line
> subtree, `org-end-of-subtree' moves the point to the end of the line
> which is before the position where clocking and scheduling commands
> print their modifications, i.e. right below the headline.
>
> To address the problem, we need to change the way we narrow and widen
> buffers in org-mode:

Thank you for your effort. 

However, I don't think this is going into a good direction. Narrowing
should probably be the same everywhere in Emacs, including Org mode.

> - We patch the narrowing commands in org-mode to always add a newline
>   at the end of subtrees (not only the 1-line subtrees).  This ensures
>   that clocking and scheduling commands print their modifications
>   within the narrowed buffer.
> - We create a wrapper for `widen' within org-mode (called `org-widen')
>   which deletes the newline added when we narrowed the buffer to the
>   subtree.
>
> However, for this solution to be complete, we need to ensure that the
> newlines added by the narrowing commands cannot be deleted by the
> user.

IMO, this is very hackish. You imply that narrowing is only done
interactively, but this is not always the case. In non-interactive
usage, messing with newline characters could be a bad idea.

In a nutshell, I suggest not going this route. Sorry for not having been
clear about it earlier.

Regards,

-- 
Nicolas Goaziou

Reply via email to