emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Suppress visibility cycling for a specific tree
@ 2011-07-25 12:13 suvayu ali
  2011-07-25 12:57 ` Rainer Stengele
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: suvayu ali @ 2011-07-25 12:13 UTC (permalink / raw)
  To: org-mode mailing list

Hi,

Is it possible to suppress visibility cycling for a particular tree?
What I am looking for is the behaviour of an ARCHIVEd tree. I have some
general guidelines and local config in this tree that I don't want to
see usually but since it is technically not archived information I am
looking for an alternate means to a similar goal.

Could I specify a special tag of my own and define the behaviour I want
with elisp? Where do I start looking for this?

Thanks a lot.

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 12:13 Suppress visibility cycling for a specific tree suvayu ali
@ 2011-07-25 12:57 ` Rainer Stengele
  2011-07-25 12:58 ` Rainer Stengele
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Rainer Stengele @ 2011-07-25 12:57 UTC (permalink / raw)
  Cc: org-mode mailing list

Am 25.07.2011 14:13, schrieb suvayu ali:
> Hi,
> 
> Is it possible to suppress visibility cycling for a particular tree?
> What I am looking for is the behaviour of an ARCHIVEd tree. I have some
> general guidelines and local config in this tree that I don't want to
> see usually but since it is technically not archived information I am
> looking for an alternate means to a similar goal.
> 
> Could I specify a special tag of my own and define the behaviour I want
> with elisp? Where do I start looking for this?
> 
> Thanks a lot.
> 
Hi,

+1

exactly the same thing I wanted to ask for some weeks.

- Rainer

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 12:13 Suppress visibility cycling for a specific tree suvayu ali
  2011-07-25 12:57 ` Rainer Stengele
@ 2011-07-25 12:58 ` Rainer Stengele
  2011-07-25 13:01 ` Rainer Stengele
  2011-07-25 13:24 ` Carsten Dominik
  3 siblings, 0 replies; 9+ messages in thread
From: Rainer Stengele @ 2011-07-25 12:58 UTC (permalink / raw)
  Cc: org-mode mailing list

Am 25.07.2011 14:13, schrieb suvayu ali:
> Hi,
> 
> Is it possible to suppress visibility cycling for a particular tree?
> What I am looking for is the behaviour of an ARCHIVEd tree. I have some
> general guidelines and local config in this tree that I don't want to
> see usually but since it is technically not archived information I am
> looking for an alternate means to a similar goal.
> 
> Could I specify a special tag of my own and define the behaviour I want
> with elisp? Where do I start looking for this?
> 
> Thanks a lot.
> 
Hi,

+1

exactly the same thing I wanted to ask for some weeks.

- Rainer

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 12:13 Suppress visibility cycling for a specific tree suvayu ali
  2011-07-25 12:57 ` Rainer Stengele
  2011-07-25 12:58 ` Rainer Stengele
@ 2011-07-25 13:01 ` Rainer Stengele
  2011-07-25 13:24 ` Carsten Dominik
  3 siblings, 0 replies; 9+ messages in thread
From: Rainer Stengele @ 2011-07-25 13:01 UTC (permalink / raw)
  To: suvayu ali; +Cc: org-mode mailing list

Am 25.07.2011 14:13, schrieb suvayu ali:
> Hi,
> 
> Is it possible to suppress visibility cycling for a particular tree?
> What I am looking for is the behaviour of an ARCHIVEd tree. I have some
> general guidelines and local config in this tree that I don't want to
> see usually but since it is technically not archived information I am
> looking for an alternate means to a similar goal.
> 
> Could I specify a special tag of my own and define the behaviour I want
> with elisp? Where do I start looking for this?
> 
> Thanks a lot.
> 
Hi,

+1

exactly the same thing I wanted to ask for some weeks.

- Rainer

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 12:13 Suppress visibility cycling for a specific tree suvayu ali
                   ` (2 preceding siblings ...)
  2011-07-25 13:01 ` Rainer Stengele
@ 2011-07-25 13:24 ` Carsten Dominik
  2011-07-25 14:17   ` Carsten Dominik
                     ` (2 more replies)
  3 siblings, 3 replies; 9+ messages in thread
From: Carsten Dominik @ 2011-07-25 13:24 UTC (permalink / raw)
  To: suvayu ali; +Cc: org-mode mailing list


On Jul 25, 2011, at 2:13 PM, suvayu ali wrote:

> Hi,
> 
> Is it possible to suppress visibility cycling for a particular tree?
> What I am looking for is the behaviour of an ARCHIVEd tree. I have some
> general guidelines and local config in this tree that I don't want to
> see usually but since it is technically not archived information I am
> looking for an alternate means to a similar goal.
> 
> Could I specify a special tag of my own and define the behaviour I want
> with elisp? Where do I start looking for this?

Archived trees are kept closed by the function
`org-cycle-hide-archived-subtrees', which is called by
`org-cycle-hook'.  You could define a tag of your choice
and then put a function into org-cycle-hook that uses a let form
to bind `org-archive-tag' to the chosen tag and then calls
`org-cycle-hide-archived-subtrees' to do the work.

Hope this gets you on the path.

- Carsten

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 13:24 ` Carsten Dominik
@ 2011-07-25 14:17   ` Carsten Dominik
  2011-07-25 14:49     ` Rainer Stengele
  2011-07-25 14:26   ` Rainer Stengele
  2011-07-25 16:43   ` suvayu ali
  2 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2011-07-25 14:17 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode mailing list


On Jul 25, 2011, at 3:24 PM, Carsten Dominik wrote:

> 
> On Jul 25, 2011, at 2:13 PM, suvayu ali wrote:
> 
>> Hi,
>> 
>> Is it possible to suppress visibility cycling for a particular tree?
>> What I am looking for is the behaviour of an ARCHIVEd tree. I have some
>> general guidelines and local config in this tree that I don't want to
>> see usually but since it is technically not archived information I am
>> looking for an alternate means to a similar goal.
>> 
>> Could I specify a special tag of my own and define the behaviour I want
>> with elisp? Where do I start looking for this?
> 
> Archived trees are kept closed by the function
> `org-cycle-hide-archived-subtrees', which is called by
> `org-cycle-hook'.  You could define a tag of your choice
> and then put a function into org-cycle-hook that uses a let form
> to bind `org-archive-tag' to the chosen tag and then calls
> `org-cycle-hide-archived-subtrees' to do the work.
> 
> Hope this gets you on the path.

Actually, the true zen[1] way to do this is to use ACHIVE anyway
and change your brain to accept that ARCHIVE does not mean the
thing is archived at all.  Or do

(setq org-archive-tag "KEEPCLOSED")

:-)

The side effect of this is that stuff in these trees ill never
contribute t the agenda - but if it is setup stuff, you
probably do not care....

These solutions will work if the subtree does not contain stuff
relevant for agendas.....

- Carsten



[1] The book of knowledge defines Zen as:
Zen emphasizes experiential wisdom in the attainment of
enlightenment. As such, it de-emphasizes theoretical knowledge
in favor of direct self-realization through meditation and dharma practice....

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 13:24 ` Carsten Dominik
  2011-07-25 14:17   ` Carsten Dominik
@ 2011-07-25 14:26   ` Rainer Stengele
  2011-07-25 16:43   ` suvayu ali
  2 siblings, 0 replies; 9+ messages in thread
From: Rainer Stengele @ 2011-07-25 14:26 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode mailing list

Am 25.07.2011 15:24, schrieb Carsten Dominik:
> 
> On Jul 25, 2011, at 2:13 PM, suvayu ali wrote:
> 
>> Hi,
>>
>> Is it possible to suppress visibility cycling for a particular tree?
>> What I am looking for is the behaviour of an ARCHIVEd tree. I have some
>> general guidelines and local config in this tree that I don't want to
>> see usually but since it is technically not archived information I am
>> looking for an alternate means to a similar goal.
>>
>> Could I specify a special tag of my own and define the behaviour I want
>> with elisp? Where do I start looking for this?
> 
> Archived trees are kept closed by the function
> `org-cycle-hide-archived-subtrees', which is called by
> `org-cycle-hook'.  You could define a tag of your choice
> and then put a function into org-cycle-hook that uses a let form
> to bind `org-archive-tag' to the chosen tag and then calls
> `org-cycle-hide-archived-subtrees' to do the work.
> 
> Hope this gets you on the path.
> 
> - Carsten
> 
> 
> 
Thanks, Carsten,

this works, added to my .emacs:

(defun custom-org-cycle-hide-hidden-subtrees (state)
  "temporarily set archive tag to 'HIDE', then hide archived subtree"
  (let ((org-archive-tag "HIDE"))
    (org-cycle-hide-archived-subtrees state)))
;; add function to be called when cycling takes place: hides subtrees with "HIDE" tag
(add-hook 'org-cycle-hook 'custom-org-cycle-hide-hidden-subtrees)

Please remember that I am an emacs-lisp greenhorn.

- Rainer

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 14:17   ` Carsten Dominik
@ 2011-07-25 14:49     ` Rainer Stengele
  0 siblings, 0 replies; 9+ messages in thread
From: Rainer Stengele @ 2011-07-25 14:49 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode mailing list

Am 25.07.2011 16:17, schrieb Carsten Dominik:
> 
> On Jul 25, 2011, at 3:24 PM, Carsten Dominik wrote:
> 
>>
>> On Jul 25, 2011, at 2:13 PM, suvayu ali wrote:
>>
>>> Hi,
>>>
>>> Is it possible to suppress visibility cycling for a particular tree?
>>> What I am looking for is the behaviour of an ARCHIVEd tree. I have some
>>> general guidelines and local config in this tree that I don't want to
>>> see usually but since it is technically not archived information I am
>>> looking for an alternate means to a similar goal.
>>>
>>> Could I specify a special tag of my own and define the behaviour I want
>>> with elisp? Where do I start looking for this?
>>
>> Archived trees are kept closed by the function
>> `org-cycle-hide-archived-subtrees', which is called by
>> `org-cycle-hook'.  You could define a tag of your choice
>> and then put a function into org-cycle-hook that uses a let form
>> to bind `org-archive-tag' to the chosen tag and then calls
>> `org-cycle-hide-archived-subtrees' to do the work.
>>
>> Hope this gets you on the path.
> 
> Actually, the true zen[1] way to do this is to use ACHIVE anyway
> and change your brain to accept that ARCHIVE does not mean the
> thing is archived at all.  Or do

brain changes are costly and confusing ;)

> 
> (setq org-archive-tag "KEEPCLOSED")
> 
> :-)
> 
> The side effect of this is that stuff in these trees ill never
> contribute t the agenda - but if it is setup stuff, you
> probably do not care....

No, it is not setup stuff, just a blurb of stuff I do not want to see every time cycling through the subtree ..

> 
> These solutions will work if the subtree does not contain stuff
> relevant for agendas.....

It can contain agenda stuff, so that solution maybe zen'ish but not working for me.
If you saw my code and find something wrong please help along!
Thanks!

- rainer

> 
> - Carsten
> 
> 
> 
> [1] The book of knowledge defines Zen as:
> Zen emphasizes experiential wisdom in the attainment of
> enlightenment. As such, it de-emphasizes theoretical knowledge
> in favor of direct self-realization through meditation and dharma practice....
> 
> 
> 

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

* Re: Suppress visibility cycling for a specific tree
  2011-07-25 13:24 ` Carsten Dominik
  2011-07-25 14:17   ` Carsten Dominik
  2011-07-25 14:26   ` Rainer Stengele
@ 2011-07-25 16:43   ` suvayu ali
  2 siblings, 0 replies; 9+ messages in thread
From: suvayu ali @ 2011-07-25 16:43 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: org-mode mailing list

Hi Carsten,

On Mon, Jul 25, 2011 at 3:24 PM, Carsten Dominik
<carsten.dominik@gmail.com> wrote:
> Archived trees are kept closed by the function
> `org-cycle-hide-archived-subtrees', which is called by
> `org-cycle-hook'.  You could define a tag of your choice
> and then put a function into org-cycle-hook that uses a let form
> to bind `org-archive-tag' to the chosen tag and then calls
> `org-cycle-hide-archived-subtrees' to do the work.
>

Thanks a lot! That works like a charm although I considering simply
choose to "retrain" my brain to use ARCHIVE. :)

-- 
Suvayu

Open source is the future. It sets us free.

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

end of thread, other threads:[~2011-07-25 16:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-25 12:13 Suppress visibility cycling for a specific tree suvayu ali
2011-07-25 12:57 ` Rainer Stengele
2011-07-25 12:58 ` Rainer Stengele
2011-07-25 13:01 ` Rainer Stengele
2011-07-25 13:24 ` Carsten Dominik
2011-07-25 14:17   ` Carsten Dominik
2011-07-25 14:49     ` Rainer Stengele
2011-07-25 14:26   ` Rainer Stengele
2011-07-25 16:43   ` suvayu ali

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