emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Cassio Koshikumo <ckoshikumo@gmail.com>
Cc: emacs-orgmode@gnu.org, Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Two issues with :VISIBILITY: property
Date: Sun, 05 Dec 2010 23:41:57 -0500	[thread overview]
Message-ID: <87bp4z1pii.fsf@fastmail.fm> (raw)
In-Reply-To: <AANLkTinyhGeB=pbRL15xoWMVN_aMcX5nsNycRX2bd8yn@mail.gmail.com> (Cassio Koshikumo's message of "Mon, 29 Nov 2010 14:04:34 -0200")

Cassio Koshikumo <ckoshikumo@gmail.com> 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 <TAB> 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 <TAB>, 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

  reply	other threads:[~2010-12-06  4:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29 16:04 Two issues with :VISIBILITY: property Cassio Koshikumo
2010-12-06  4:41 ` Matt Lundin [this message]
2010-12-07  0:12   ` Cassio Koshikumo
2010-12-07 11:30     ` Matt Lundin
2010-12-09  9:49     ` Carsten Dominik
2010-12-11  3:55       ` Cassio Koshikumo
2010-12-06  4:45 ` [PATCH] Revert "Fix :VISIBILITY: handling of nested "folded" properties" Matt Lundin
2010-12-06  9:07   ` Carsten Dominik

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=87bp4z1pii.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=carsten.dominik@gmail.com \
    --cc=ckoshikumo@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).