On Sat, Nov 9, 2013 at 2:46 PM, Bastien <b...@gnu.org> wrote: > Hi Matt, > > Matt Price <mopto...@gmail.com> 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.
Yes, it seems quite difficult I am working on other solutions... > > -- > Bastien