all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: Problems with missing newline on last line of narrowd subtree [6.33trans (release_6.33f.129.g904a)]
@ 2009-12-17 20:47 David Maus
  2010-01-04 13:55 ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: David Maus @ 2009-12-17 20:47 UTC (permalink / raw)
  To: emacs-orgmode


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

If you narrow the buffer to a subtree, insert some content and widen
again the content below the subtree moves into the subtree if there
was no newline on the last line of the narrowed subtree.

example.org
,----
| * Headline 1
| 
| * Headline 2
`----

Narrow the buffer to "Headline 1", entere some text and remove all
empty lines below the entered text.

example.org (narrowd)
,----
| * Headline 1
| Hello World!
`----

example.org (widened again)
,----
| * Headline 1
| Hello World!* Headline 2
`----

I do know that this behaviour makes absolutely sense as removing the
newlines in the narrowed subtree equals to removing the newlines in
the whole buffer. 

But as you can imagine this behaviour can be disastrous in Orgmode: I
stumpled upon this just because I remembered to have a todo item on my
list but Orgmode didn't know about it -- it was sucked into
another item.

Maybe Orgmode should use a function `org-widen' that ensures a newline
at the end of a narrowed buffer before calling the Emacs' `widen'.

Regards,

  -- David


Emacs  : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
 of 2009-11-28 on elegiac, modified by Debian
Package: Org-mode version 6.33trans (release_6.33f.129.g904a)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug: Problems with missing newline on last line of narrowd subtree [6.33trans (release_6.33f.129.g904a)]
  2009-12-17 20:47 Bug: Problems with missing newline on last line of narrowd subtree [6.33trans (release_6.33f.129.g904a)] David Maus
@ 2010-01-04 13:55 ` Carsten Dominik
  2010-01-04 14:55   ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2010-01-04 13:55 UTC (permalink / raw)
  To: David Maus; +Cc: emacs-orgmode

Hi David,

On Dec 17, 2009, at 9:47 PM, David Maus wrote:

>
> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?   
> See
>
>     http://orgmode.org/manual/Feedback.html#Feedback
>
> Your bug report will be posted to the Org-mode mailing list.
> ------------------------------------------------------------------------
>
> If you narrow the buffer to a subtree, insert some content and widen
> again the content below the subtree moves into the subtree if there
> was no newline on the last line of the narrowed subtree.
>
> example.org
> ,----
> | * Headline 1
> |
> | * Headline 2
> `----
>
> Narrow the buffer to "Headline 1", entere some text and remove all
> empty lines below the entered text.
>
> example.org (narrowd)
> ,----
> | * Headline 1
> | Hello World!
> `----
>
> example.org (widened again)
> ,----
> | * Headline 1
> | Hello World!* Headline 2
> `----
>
> I do know that this behaviour makes absolutely sense as removing the
> newlines in the narrowed subtree equals to removing the newlines in
> the whole buffer.
>
> But as you can imagine this behaviour can be disastrous in Orgmode: I
> stumpled upon this just because I remembered to have a todo item on my
> list but Orgmode didn't know about it -- it was sucked into
> another item.
>
> Maybe Orgmode should use a function `org-widen' that ensures a newline
> at the end of a narrowed buffer before calling the Emacs' `widen'.


That does make sense if the narrowing was done by org-narrow-to-subtree.
But if it was done by another command, maybe even narrowing to part of  
a line,
than adding a newline can be equally destrucive. I don't think there  
is a "good" solution to this issue.

Regards

- Carsten

>
> Regards,
>
>  -- David
>
>
> Emacs  : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
> of 2009-11-28 on elegiac, modified by Debian
> Package: Org-mode version 6.33trans (release_6.33f.129.g904a)
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug: Problems with missing newline on last line of narrowd subtree [6.33trans (release_6.33f.129.g904a)]
  2010-01-04 13:55 ` Carsten Dominik
@ 2010-01-04 14:55   ` Darlan Cavalcante Moreira
  0 siblings, 0 replies; 3+ messages in thread
From: Darlan Cavalcante Moreira @ 2010-01-04 14:55 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


Because of this problem I usually create a dummy headline at the end of the
subtree when I work in a narrowed subtree for a long time. If I avoid changing
anything after this dummy headline I know that nothing strange will happen. Not
elegant, I know, but its a work around for now.

- Darlan Cavalcante Moreira

At Mon, 4 Jan 2010 14:55:11 +0100,
Carsten Dominik <carsten.dominik@gmail.com> wrote:
> 
> Hi David,
> 
> On Dec 17, 2009, at 9:47 PM, David Maus wrote:
> 
> >
> > Remember to cover the basics, that is, what you expected to happen and
> > what in fact did happen.  You don't know how to make a good report?   
> > See
> >
> >     http://orgmode.org/manual/Feedback.html#Feedback
> >
> > Your bug report will be posted to the Org-mode mailing list.
> > ------------------------------------------------------------------------
> >
> > If you narrow the buffer to a subtree, insert some content and widen
> > again the content below the subtree moves into the subtree if there
> > was no newline on the last line of the narrowed subtree.
> >
> > example.org
> > ,----
> > | * Headline 1
> > |
> > | * Headline 2
> > `----
> >
> > Narrow the buffer to "Headline 1", entere some text and remove all
> > empty lines below the entered text.
> >
> > example.org (narrowd)
> > ,----
> > | * Headline 1
> > | Hello World!
> > `----
> >
> > example.org (widened again)
> > ,----
> > | * Headline 1
> > | Hello World!* Headline 2
> > `----
> >
> > I do know that this behaviour makes absolutely sense as removing the
> > newlines in the narrowed subtree equals to removing the newlines in
> > the whole buffer.
> >
> > But as you can imagine this behaviour can be disastrous in Orgmode: I
> > stumpled upon this just because I remembered to have a todo item on my
> > list but Orgmode didn't know about it -- it was sucked into
> > another item.
> >
> > Maybe Orgmode should use a function `org-widen' that ensures a newline
> > at the end of a narrowed buffer before calling the Emacs' `widen'.
> 
> 
> That does make sense if the narrowing was done by org-narrow-to-subtree.
> But if it was done by another command, maybe even narrowing to part of  
> a line,
> than adding a newline can be equally destrucive. I don't think there  
> is a "good" solution to this issue.
> 
> Regards
> 
> - Carsten
> 
> >
> > Regards,
> >
> >  -- David
> >
> >
> > Emacs  : GNU Emacs 23.1.50.1 (i486-pc-linux-gnu, GTK+ Version 2.18.3)
> > of 2009-11-28 on elegiac, modified by Debian
> > Package: Org-mode version 6.33trans (release_6.33f.129.g904a)
> >
> >
> > _______________________________________________
> > Emacs-orgmode mailing list
> > Please use `Reply All' to send replies to the list.
> > Emacs-orgmode@gnu.org
> > http://lists.gnu.org/mailman/listinfo/emacs-orgmode
> 
> - Carsten
> 
> 
> 
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please 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

end of thread, other threads:[~2010-01-04 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-17 20:47 Bug: Problems with missing newline on last line of narrowd subtree [6.33trans (release_6.33f.129.g904a)] David Maus
2010-01-04 13:55 ` Carsten Dominik
2010-01-04 14:55   ` Darlan Cavalcante Moreira

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.