emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Property for startup visibility?


From: address@hidden
Subject: [Orgmode] Re: Property for startup visibility?
Date: Wed, 7 May 2008 19:29:35 +0100

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, address@hidden wrote:

Message: 1
Date: Wed, 7 May 2008 17:23:34 +0200
From: Carsten Dominik <address@hidden>
Subject: Re: [Orgmode] Re: Property for startup visibility?
To: Richard KLINDA <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
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





reply via email to

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