Re: [O] [PATCH] org.el: Fix newline at eob in org-insert-heading

2019-02-16 Thread Leo Vivier
Hello, Nicolas Goaziou writes: >> The problem is due to `eobp' returning t when point is on the last >> character of the narrowed buffer (as explained in its docstring). >> Since those `eobp' predicates in `org-insert-heading' are probably >> there to ensure a newline at the end of the *file*, c

Re: [O] [PATCH] org.el: Fix newline at eob in org-insert-heading

2019-02-16 Thread Nicolas Goaziou
Hello, Leo Vivier writes: > * lisp/org.el (org-insert-heading): Check if narrowed before inserting > newline at eob > > When narrowed into an org-buffer (e.g. when capturing), adding a new > heading with C- or M- on the last line of a > buffer (i.e. that not without a newline at the end) would r

[O] [PATCH] org.el: Fix newline at eob in org-insert-heading

2019-02-11 Thread Leo Vivier
* lisp/org.el (org-insert-heading): Check if narrowed before inserting newline at eob When narrowed into an org-buffer (e.g. when capturing), adding a new heading with C- or M- on the last line of a buffer (i.e. that not without a newline at the end) would result in the insertion of a newline at t

[O] [PATCH] org.el: Fix newline at eob in org-insert-heading

2019-02-11 Thread Leo Vivier
* lisp/org.el (org-insert-heading): Check if narrowed before inserting newline at eob When narrowed into an org-buffer (e.g. when capturing), adding a new heading with C- or M- on the last line of a buffer (i.e. that not without a newline at the end) would result in the insertion of a newline at t