From mboxrd@z Thu Jan 1 00:00:00 1970 From: "bva@alexanderonline.org" Subject: Re: Property for startup visibility? Date: Wed, 7 May 2008 19:29:35 +0100 Message-ID: <0C137CFD-3F28-4771-B61A-ACD447BA543C@alexanderonline.org> Mime-Version: 1.0 (Apple Message framework v919.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JtoOo-0007bI-T5 for emacs-orgmode@gnu.org; Wed, 07 May 2008 14:29:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JtoOk-0007VP-Hi for emacs-orgmode@gnu.org; Wed, 07 May 2008 14:29:50 -0400 Received: from [199.232.76.173] (port=33889 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JtoOj-0007UE-GN for emacs-orgmode@gnu.org; Wed, 07 May 2008 14:29:49 -0400 Received: from harley.gnservers.com ([72.52.242.16]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JtoOh-0002RB-Mr for emacs-orgmode@gnu.org; Wed, 07 May 2008 14:29:48 -0400 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: emacs-orgmode@gnu.org 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 > Subject: Re: [Orgmode] Re: Property for startup visibility? > To: Richard KLINDA > 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