emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Property for startup visibility?
@ 2008-05-06 19:24 Richard KLINDA
  2008-05-07  1:53 ` Peter Jones
  0 siblings, 1 reply; 8+ messages in thread
From: Richard KLINDA @ 2008-05-06 19:24 UTC (permalink / raw)
  To: emacs-orgmode

Hello, is there a property for setting the startup visibility (folden,
children or subtree) of a tree?

Thanks,
Richard

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: Property for startup visibility?
@ 2008-05-07 18:29 bva
  2008-05-08 12:03 ` Carsten Dominik
  0 siblings, 1 reply; 8+ messages in thread
From: bva @ 2008-05-07 18:29 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Richard KLINDA

I'll see if I can make this code work for me, too.  Thanks for writing  
it.  I think if I study it carefully, I'll learn something very useful  
about scripting in emacs and in org-mode.  One quick question: if I  
hit C-c C-c on a "Startup" line, does org-mode run the hook again?

As far as a use case is concerned, here's my justification. I have  
wanted to pick certain trees as 'most valuable/visible hierarchies'.   
I do this because my top level structure looks like this:

* Short Term Projects
   :VISIBILITY: Subtree
** TODO Buy Groceries    :OUT:
** TODO Pay gas bill     :HOME:
** PROJECT Fix Sink
*** TODO Buy Tool    :OUT:
*** TODO Buy Supplies :OUT:
*** TODO Fix the sink    :HOME:
*** TODO Check that leak is gone    :HOME:

* Long Term Projects
   :VISIBILITY: CHILDREN
** PROJECT Household Inventory
*** TODO Inventory Bedroom 1   :HOME:
*** TODO Inventory Bedroom 2   :HOME:
*** TODO Inventory Kitchen   :HOME:
*** TODO Inventory Living/Dining Room   :HOME:
** PROJECT Insurance
*** TODO Review coverage      :HOME:
*** TODO Discuss options with advisor   :PHONE:
*** TODO Discuss options with wife    :HOME:

* Maybe/Someday
   :VISIBILITY: FOLDED
** PROJECT RepRap
*** TODO buy parts
*** TODO build device
** PROJECT Solve World Hunger...
** PROJECT Spread World Peace...
** PROJECT Brew my own Weissebier...

* Calendar
   :VISIBILITY: FOLDED
** My trip #1...
** My trip #2...
** Work Holidays...
** Vacation Days...

* Recurring Calendar
   :VISIBILITY: FOLDED
** Club Meeting
<2008-01-01 Mon 20:30-22:00 +1m>
** Dentist
<2008-01-01 Mon +6m>

* Computed Calendar
   :VISIBILITY: FOLDED
** Birthdays of Friends
%%(diary-anniversary  2 10 1869) Mahatma Gandhi would be %d years old
%%(diary-anniversary 1 1 1900) Dad's going to be %d!
*** TODO Buy Dad a ____.  He's got to love it!
    DEADLINE: <2008-12-01 Mon>
** Astronomical Dates
%%(diary-sunrise)
&%%(diary-iso-date)
&%%(diary-day-of-year)

Mostly I want the Short and Long Term projects visible and I'd like to  
hide the calendars.  I like to keep all this in one file because I'm  
most familiar with simple emacs searching, and I'm not yet good at org- 
mode/agenda searches (or global TODO lists, or tag matching, or all  
that)

Since I don't work on "Solve World Hunger" everyday, I find it a  
distraction (as so many people do) to look at the TODOs under that  
project, so a simple TODO tree search hasn't helped me much.  I know  
there is more in org-mode that would fix this, but one of the big  
pleasures of org-mode is how easy (easy, EASY!) it is to get started  
on SOMETHING productive, without having to invest a huge shift in my  
thinking.  (I am working on that shift in thinking, but it has been  
slow to take hold.  Time to re-read the Allen book; maybe this time  
I'll excise some more personal disorganizing demons)

So I'd suggest that the 'VISIBILITY' property does get added.  I'd  
even suggest adding another stop on the org-mode-tab-cycle chain  
(FOLDED VISIBILITY-PROPERTY CHILDREN SUBTREE).  I can even see feature- 
creep with this, as someone may want org-mode to update the VISIBILITY  
property automatically on killing/saving the buffer, so when the file  
is revisited, any hand-tuned folding is recreated.  Thought- 
experiment: Should the VISIBILITY property be automatically inherited?  
Or should we force users to add a property drawer for every tree that  
will be unfolded at my suggested stop on the org-mode-tab-cycle.

It is just a suggestion.  I am very open to other's suggestions of  
better ways of staying on top of my trees.  I'm trying to get to the  
place where every headline has a context tag, a TODO state, a DEADLINE  
or SCHEDULED property (if appropriate) or plain date (if not), AND is  
correctly and logically placed in the existing structure.  I am not  
there yet.

I should add that to my Maybe/Someday tree...

no... my Long Term Project tree!

-Ben

On 2008-05-07 Wed, at 17:00, emacs-orgmode-request@gnu.org wrote:
>
> Message: 1
> Date: Wed, 7 May 2008 17:23:34 +0200
> From: Carsten Dominik <dominik@science.uva.nl>
> Subject: Re: [Orgmode] Re: Property for startup visibility?
> To: Richard KLINDA <rklinda@gmail.com>
> Cc: emacs-orgmode@gnu.org
> Message-ID: <3B5FB20C-6B72-4C69-9374-85FCC2F33173@science.uva.nl>
> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
> On May 7, 2008, at 1:39 PM, Richard KLINDA wrote:
>>
>>
>> Thanks, but I would like to set this up on a tree-by-tree basis
>> (complementing the #+STARTUP option).
>
>
> Hmmm, I see now what you mean.  I am not convinced how useful this
> would be, because I suspect that the visibility you'd like
> will often change?
>
> Something like this is easily hacked, see below.  Why don't
> you test it a while and then report back with a good example
> and use case.  Then we can make a decision about including it.
>
> The following looks for a :visibility: property with value
> "folded" or "children" or "all".  Installing it in the hook will run
> it after the global STARTUP visibility has been set.
>
> - Carsten

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-05-09 14:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-06 19:24 Property for startup visibility? Richard KLINDA
2008-05-07  1:53 ` Peter Jones
2008-05-07 11:39   ` Richard KLINDA
2008-05-07 15:23     ` Carsten Dominik
  -- strict thread matches above, loose matches on Subject: below --
2008-05-07 18:29 bva
2008-05-08 12:03 ` Carsten Dominik
2008-05-09 14:06   ` Carsten Dominik
2008-05-09 14:58   ` bva

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).