* Bug in subtree narrowing
@ 2009-09-17 23:09 Samuel Wales
2009-09-18 6:22 ` Carsten Dominik
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2009-09-17 23:09 UTC (permalink / raw
To: emacs-orgmode
Hi Carsten,
org-tree-to-indirect-buffer does not include the final
newline. This causes sorting to run two lines together.
For example, a headline can get joined to an :END: line.
This can cause a task to not be recognized.
Sorting makes a lot of changes, so some users will not
notice the bug until much later.
org-narrow-to-subtree appears similar.
A lot of user code might assume, as perhaps org-sort does,
that the final line has a newline.
The choice of solution I will leave to you :).
My preference is for the final newline to exist. This is
because it feels normal to me as a user. If I go to the end
of the buffer, then up, I usually expect to be on the last
line. If I manually kill a subtree (or a paragraph) I kill
to the beginning of the next line. m-x mark-paragraph
appears to do this. So does m-x kill-paragraph.
However, I will not file a bug on outline.
outline-mark-subtree (which org users use also) does not include the
final newline.
outline-end-of-subtree does (forward-char -1), which means
that it is deliberate. There are likely to be factors that
I have not considered.
"Org-mode version 6.30trans (release_6.30d.814.gdacd)" .
Thanks.
Samuel
--
Myalgic encephalomyelitis causes death (Jason et al. 2006)
and severe suffering. Conflicts of interest are destroying
research. What people "know" is wrong. Silence = death.
http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug in subtree narrowing
2009-09-17 23:09 Bug in subtree narrowing Samuel Wales
@ 2009-09-18 6:22 ` Carsten Dominik
2009-09-18 6:53 ` Samuel Wales
0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2009-09-18 6:22 UTC (permalink / raw
To: Samuel Wales; +Cc: emacs-orgmode
On Sep 18, 2009, at 12:09 AM, Samuel Wales wrote:
> Hi Carsten,
>
> org-tree-to-indirect-buffer does not include the final
> newline. This causes sorting to run two lines together.
> For example, a headline can get joined to an :END: line.
> This can cause a task to not be recognized.
Fixed for this case.
>
> Sorting makes a lot of changes, so some users will not
> notice the bug until much later.
I do not understand what this has to do with narrowing to a subtree?
>
> org-narrow-to-subtree appears similar.
Fixed for this case as well.
>
> A lot of user code might assume, as perhaps org-sort does,
> that the final line has a newline.
>
> The choice of solution I will leave to you :).
>
> My preference is for the final newline to exist.
Are you suggesting that I should add the final newline?
Under what circumstances?
Are you aware of the variable `require-final-newline'? It might be
for you?
I have turned it on.
- Carsten
> This is
> because it feels normal to me as a user. If I go to the end
> of the buffer, then up, I usually expect to be on the last
> line. If I manually kill a subtree (or a paragraph) I kill
> to the beginning of the next line. m-x mark-paragraph
> appears to do this. So does m-x kill-paragraph.
>
> However, I will not file a bug on outline.
> outline-mark-subtree (which org users use also) does not include the
> final newline.
> outline-end-of-subtree does (forward-char -1), which means
> that it is deliberate. There are likely to be factors that
> I have not considered.
>
> "Org-mode version 6.30trans (release_6.30d.814.gdacd)" .
>
> Thanks.
>
>
> Samuel
>
>
> --
> Myalgic encephalomyelitis causes death (Jason et al. 2006)
> and severe suffering. Conflicts of interest are destroying
> research. What people "know" is wrong. Silence = death.
> http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug in subtree narrowing
2009-09-18 6:22 ` Carsten Dominik
@ 2009-09-18 6:53 ` Samuel Wales
0 siblings, 0 replies; 3+ messages in thread
From: Samuel Wales @ 2009-09-18 6:53 UTC (permalink / raw
To: Carsten Dominik; +Cc: emacs-orgmode
On Thu, Sep 17, 2009 at 23:22, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
>> Sorting makes a lot of changes, so some users will not
>> notice the bug until much later.
>
> I do not understand what this has to do with narrowing to a subtree?
Sorting obscures the bug.
> Are you suggesting that I should add the final newline?
No. Move the end forward by one char.
> Under what circumstances?
Perhaps when it won't break anything.
> Are you aware of the variable `require-final-newline'? It might be for you?
> I have turned it on.
Isn't that for files?
I am referring to narrowed regions. Point at end should be after the
newline, to match my intuition. But this conflicts with outline's
intuition.
Adding a newline is not necessary.
Thanks for fixing the bug.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-18 6:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 23:09 Bug in subtree narrowing Samuel Wales
2009-09-18 6:22 ` Carsten Dominik
2009-09-18 6:53 ` Samuel Wales
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.