Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-23 Thread Leo Vivier
Hello, Samuel Wales writes: > most users and many writers of code are likely to mark a region by > going to bol, not eol. they don't likely think the region should end > before the final newline, in most cases. I don't know about most users, but that's what I do. It's easier to mark the begin

Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Samuel Wales
ok, i can't follow this so thanks for the comments. i'll trust that you know what you are doing. however, fyi, long ago, i discovered various bugs in this newline area, most of which were trackable to outline mode's decision to define an entry as ending before its final newline. most users and m

Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Leo Vivier
Hello, Samuel Wales writes: > i have not been able to follow this conversation, but is it possible > that /all/ of this complexity is due to outline-mode's dubious choice > of not considering the final newline in an entry to be part of an > entry? I don't know much about outline-mode, but I dou

Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Samuel Wales
i have not been able to follow this conversation, but is it possible that /all/ of this complexity is due to outline-mode's dubious choice of not considering the final newline in an entry to be part of an entry? -- The Kafka Pandemic: What is misopathy? htt

Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Leo Vivier
Hello again, Leo Vivier writes: > You'll find those three patches at the bottom alongside another with all > the patches until now squashed together (except the patch for > `org-remove-timestamp-with-keyword' which wasn't related). I ended up sending the wrong patch, i.e. the one for `org-remov

Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-22 Thread Leo Vivier
Hello, I've found and fixed three new functions which didn’t behave properly when the buffer was restricted to a subtree: * lisp/org.el (org-log-beginning): Fix drawer creation. * lisp/org.el (org-store-log-note): Fix drawer-less logging. * lisp/org-capture.el (org-clock-in): Fix drawer-less clock

Re: [O] [PATCH] Fix narrowed 1-line subtrees

2019-02-21 Thread Leo Vivier
Hello, Here’s a detailed account of the problem and solution of the patch I’ve just sent. I don’t have the time to write the tests today, but I’ll get on it as soon as I can. --- This patch addresses multiple issues occuring

[O] [PATCH] Fix narrowed 1-line subtrees

2019-02-21 Thread Leo Vivier
* lisp/org.el (org-add-planning-info): Ensure insertion in current restriction. (org-remove-timestamp-with-keyword): Respect ambiguous newline when narrowed to 1-line-subtree. (org-remove-empty-drawer-at): Respect ambiguous newline when narrowed to 1-line subtree. (org-entry-delete): Re