emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Fwd: set global visibility set to CONTENTS in a defun?


From: Bastien
Subject: Re: [O] Fwd: set global visibility set to CONTENTS in a defun?
Date: Sat, 09 Nov 2013 20:46:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Matt,

Matt Price <address@hidden> writes:

> What I mostly wanted was to write an interactive defun that would
> switch to an org buffer and then automatically set the visibility
> (either the global visibility or the visibility of the active subtree)
> to an arbitrary desired level.

The only way I see is to set this desired level as a property for
the entries, then to let your defun act depending on this property.

See the Org manual (2.3 Visibility cycling): 

  Furthermore, any entries with a 'VISIBILITY' property (*note
  Properties
  and Columns::) will get their visibility adapted accordingly.  Allowed
  values for this property are 'folded', 'children', 'content', and
  'all'. 
  
  'C-u C-u <TAB>' ('org-set-startup-visibility') Switch back to the
  startup visibility of the buffer, i.e., whatever is requested by
  startup options and 'VISIBILITY' properties in individual entries.
  
> org-cycle does not seem to be a
> reliable way to do this because you can't just pass the desired
> visibility level as an argument -- or at least, I an't figure out how
> to do this.  The same is true for org-global-cycle.  I'm not sure,
> does that clarify what I'm asking?

Yes.. but I'm not sure I can think of a solution, manipulating
visibility states is a bit daunting.

-- 
 Bastien



reply via email to

[Prev in Thread] Current Thread [Next in Thread]