emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <maus.david@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Bug: Problems with missing newline on last line of narrowd subtree [6.33trans (release_6.33f.129.g904a)]
Date: Thu, 17 Dec 2009 21:47:58 +0100	[thread overview]
Message-ID: <87fx79gwe9.wl%maus.david@gmail.com> (raw)


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)

             reply	other threads:[~2009-12-17 20:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-17 20:47 David Maus [this message]
2010-01-04 13:55 ` Bug: Problems with missing newline on last line of narrowd subtree [6.33trans (release_6.33f.129.g904a)] Carsten Dominik
2010-01-04 14:55   ` Darlan Cavalcante Moreira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fx79gwe9.wl%maus.david@gmail.com \
    --to=maus.david@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).