From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Two issues with :VISIBILITY: property Date: Sun, 05 Dec 2010 23:41:57 -0500 Message-ID: <87bp4z1pii.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=36918 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPStl-0005q4-N7 for emacs-orgmode@gnu.org; Sun, 05 Dec 2010 23:42:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPStj-0004NM-9b for emacs-orgmode@gnu.org; Sun, 05 Dec 2010 23:42:01 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:47112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPStj-0004N4-7h for emacs-orgmode@gnu.org; Sun, 05 Dec 2010 23:41:59 -0500 In-Reply-To: (Cassio Koshikumo's message of "Mon, 29 Nov 2010 14:04:34 -0200") 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: Cassio Koshikumo Cc: emacs-orgmode@gnu.org, Carsten Dominik Cassio Koshikumo writes: > I've just recently began using emacs and org-mode, and I'm already in > love. So, first, let me thank and congratulate Mr. Dominik and > everyone else involved. Welcome! > The "children" property allows me to press C-u C-u to show only > the synopsis and the headlines inside the chapters -- which is exactly > what I want. > > But here's the thing: if I decide to put "Chapter 1" /after/ "Chapter > 2", using M-Down or M-S-Down, it gets moved alright -- but the entire > Chapter 1 subtree is expanded. I no longer see only the headlines > inside it, but also the entire text inside them. Is this by design? If > so, why? It seems to me that the :VISIBILITY: property should hold > when moving trees around. I cannot replicate this. When I move the headlines, they remain folded. > That was the first issue. The second is: > > The :VISIBILITY: property seems to work only when it's applied to > level 1 trees. For example, say I have this: > > * Part 1 > > ** Chapter 1 > :PROPERTIES: > :VISIBILITY: children > :END: > > Synopsis for Chapter 1 goes here. > > *** Section 1 (Ch.1) > The actual text for Section 1 of Chapter 1. > > ** Chapter 2 > :PROPERTIES: > :VISIBILITY: children > :END: > > Synopsis for Chapter 2 goes here. > > *** Section 1 (Ch.2) > The actual text for Section 1 of Chapter 2. > > When I press C-u C-u , only Chapter 1 gets expanded correctly > (synopsis + headlines inside it). Chapter 2 stays completely folded > ("Chapter 2..."), without any children or content shown -- effectively > ignoring the "children" property, or acting as it was set to "folded". > I guess this wasn't supposed to happen, right? Yes, this is a bug. Thanks for reporting it. It was introduced with commit 383802d063a9f2dd959d5574b226fa8ec7f8be41, which caused the problem it intended to solve. See: http://thread.gmane.org/gmane.emacs.orgmode/28159/focus=28442 The commit has org-mode process the headlines from bottom to top, which means that any changes to the visibility of lower headlines are overridden/modified by changes higher up. Reverting the change causes VISIBILITY to work correctly. I send a patch shortly. Thanks, Matt