emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "bva@alexanderonline.org" <bva@alexanderonline.org>
To: emacs-orgmode@gnu.org
Cc: Richard KLINDA <rklinda@gmail.com>
Subject: Re: Property for startup visibility?
Date: Wed, 7 May 2008 19:29:35 +0100	[thread overview]
Message-ID: <0C137CFD-3F28-4771-B61A-ACD447BA543C@alexanderonline.org> (raw)

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

             reply	other threads:[~2008-05-07 18:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 18:29 bva [this message]
2008-05-08 12:03 ` Property for startup visibility? Carsten Dominik
2008-05-09 14:06   ` Carsten Dominik
2008-05-09 14:58   ` bva
  -- strict thread matches above, loose matches on Subject: below --
2008-05-06 19:24 Richard KLINDA
2008-05-07  1:53 ` Peter Jones
2008-05-07 11:39   ` Richard KLINDA

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0C137CFD-3F28-4771-B61A-ACD447BA543C@alexanderonline.org \
    --to=bva@alexanderonline.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=rklinda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).