From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: Local subtree view (analysis of a fundamental issue with subtree narrowing) Date: Sat, 2 Jun 2012 19:51:43 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sb0uy-0001o5-IE for emacs-orgmode@gnu.org; Sat, 02 Jun 2012 22:51:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sb0uw-00030T-JG for emacs-orgmode@gnu.org; Sat, 02 Jun 2012 22:51:48 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:50993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sb0uw-000305-B7 for emacs-orgmode@gnu.org; Sat, 02 Jun 2012 22:51:46 -0400 Received: by obbwd18 with SMTP id wd18so6376899obb.0 for ; Sat, 02 Jun 2012 19:51:43 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Rebel Neurofog Cc: emacs-orgmode@gnu.org Hi Rebel, On 6/2/12, Rebel Neurofog wrote: > The closest thing I'd like to have is (org-tree-to-indirect-buffer), > but, first, there's a bug in it (I use Emacs 23.4.2 - latest official): > - When I edit the last empty line in indirect buffer, the new text > gets into next entry (inside original buffer) like this: > ** TODO Go shoping > Some new text** TODO Finish Line Edit widget What version of Org are you running? My version works. That apparently empty line is possibly the beginning of the next line. It might need a newline. That is expected. This is /related to/ a subtle issue in which Org calls an Outline mode function that is arguably counterintuitive and dangerous. That function does not include the final newline, which has led to buffer corruption bugs. I reported one long ago with sorting in indirect buffers. IMO narrowing should always include the final newline, but it is a potentially involved discussion. However, having an empty line at the end of your narrowed region is expected with what I believe the correct narrowing should be, and actually unexpected with the default way. So your bug /should/ be that it adds a spurious extra empty line, not that it corrupts the next line. :) Maybe you added the empty line yourself, and then added text to it without adding a newline. I hope that helps. I am interested off-list in the origin of your name, if it has meaning. Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com