From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus 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 Message-ID: <87fx79gwe9.wl%maus.david@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLNGe-0002TF-9W for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 15:48:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLNGZ-0002Qa-Ji for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 15:48:11 -0500 Received: from [199.232.76.173] (port=59454 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLNGZ-0002QX-B2 for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 15:48:07 -0500 Received: from mail-fx0-f225.google.com ([209.85.220.225]:41605) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLNGY-0002lS-P1 for emacs-orgmode@gnu.org; Thu, 17 Dec 2009 15:48:07 -0500 Received: by fxm25 with SMTP id 25so1575253fxm.26 for ; Thu, 17 Dec 2009 12:48:00 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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)