emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Expanded property drawers as per file option


From: Carsten Dominik
Subject: Re: [O] Expanded property drawers as per file option
Date: Sat, 1 Jun 2013 08:13:17 +0200

On 29.5.2013, at 22:09, Karl Voit <address@hidden> wrote:

> * Feng Shu <address@hidden> wrote:
>> Thorsten Jolitz <address@hidden> writes:
>> 
>>> Thorsten Jolitz <address@hidden> writes:
>>> 
>>> ,-------------------------------------
>>> | (defun find-org-contracts ()
>>> | (interactive)
>>> | (find-file "/path/to/contracts.org")
>>> | (show-all))
>>> | 
>>> | M-x find-org-contracts
>>> `-------------------------------------
>> 
>> I use:
>> #+STARTUP: showeverything
> 
> Those two methods result in expanded properties, yes.
> 
> However, I obviously was not precise enough to explain my
> requirement which is more complicated than "showeverything"
> 
> 
> I would like to have all headings folded when I open the file (as it
> is now). Then I navigate to a heading of a person by using text
> search or arrow keys and TAB (to expand hierarchies). 

Hi,

an imperfect solution that might work for you anyway is to create a local 
version
of `org-cycle-hook' and remove `org-cycle-hide-drawers' from the value of this
variable.  This is imperfect because org-cycle-hide-drawers is also called
sometimes explicitly, for example after moving a subtree.  But it will cause
drawers to stay open after TAB.

To try this, make the following line the first line of your file:

# -*- mode: org; org-cycle-hook: (org-cycle-hide-archived-subtrees 
org-cycle-hide-inline-tasks org-cycle-show-empty-lines 
org-optimize-window-after-visibility-change) -*-

Then kill the buffer and visit it again.  Check the value of `org-cycle-hook' 
with `C-h v', you should see that the variable has a local value in this buffer.

If you then press TAB twice on"Peter", the drawer will be open.

Hope this helps.

- Carsten


> 
> On the heading of the "target" person, I want TAB to expand also the
> properties drawer, not only the content of the heading with
> properties collapsed.
> 
> 
> Example:
> 
> I start with contacts.org like this:
> 
>    * job
>    * family
> 
> I go to "job" and expand using TAB:
> 
>    * job
>      * Bob
>      * Peter
>      * Susan
>    * family
> 
> After that, I navigate to "Peter" and press TAB once again to expand
> the heading of Peter *and* its property drawer all together (only
> for "Peter"):
> 
>    * job
>      * Bob
>      * Peter
>        :PROPERTIES:
>        :EMAIL: address@hidden
>        :COMPANY: Acme
>        :ADDRESS: Hiscity, hisstreet 42
>        :END:
> 
>        - met him at conference XY in 2009
>        - works in the field of foobar
> 
>      * Susan
>    * family
> 
> 
> The desired difference to my current situation is, that I do not
> have to navigate on the PROPERTY line and press TAB to open the
> drawer for email, company name, address, and so forth.
> 
> 
> Usual behavior: PROPERTY drawer stays collapsed when its
> corresponding heading gets expanded.
> 
> My wish: PROPERTY drawer gets collapsed when its corresponding
> heading gets expanded.
> 
> 
> I know that this is a very specific requirement and it spares me
> only one positioning effort followed by TAB. However, for contacts
> it would eliminate one annoyance for my work flow :-)
> 
> Thanks for your comments, thoughts, tipps!
> 
> 
> -- 
> mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
>> get Memacs from https://github.com/novoid/Memacs <
> 
> https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
> 
> 




reply via email to

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