From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Expanded property drawers as per file option Date: Sat, 1 Jun 2013 08:13:17 +0200 Message-ID: <6BB8CA9C-FF5F-480B-B973-7A18436E733F@gmail.com> References: <2013-05-28T16-16-08@devnull.Karl-Voit.at> <871u8rduyb.fsf@gmail.com> <87wqqjcfse.fsf@gmail.com> <87sj16xv91.fsf@news.tumashu-localhost.org> <2013-05-29T21-55-35@devnull.Karl-Voit.at> Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uif47-0002r1-7H for emacs-orgmode@gnu.org; Sat, 01 Jun 2013 02:13:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uif45-0004mM-NV for emacs-orgmode@gnu.org; Sat, 01 Jun 2013 02:13:23 -0400 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:58379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uif45-0004lm-Gh for emacs-orgmode@gnu.org; Sat, 01 Jun 2013 02:13:21 -0400 Received: by mail-wg0-f44.google.com with SMTP id a12so1781085wgh.23 for ; Fri, 31 May 2013 23:13:20 -0700 (PDT) In-Reply-To: <2013-05-29T21-55-35@devnull.Karl-Voit.at> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: news1142@Karl-Voit.at Cc: emacs-orgmode@gnu.org On 29.5.2013, at 22:09, Karl Voit wrote: > * Feng Shu wrote: >> Thorsten Jolitz writes: >>=20 >>> Thorsten Jolitz writes: >>>=20 >>> ,------------------------------------- >>> | (defun find-org-contracts () >>> | (interactive) >>> | (find-file "/path/to/contracts.org") >>> | (show-all)) >>> |=20 >>> | M-x find-org-contracts >>> `------------------------------------- >>=20 >> I use: >> #+STARTUP: showeverything >=20 > Those two methods result in expanded properties, yes. >=20 > However, I obviously was not precise enough to explain my > requirement which is more complicated than "showeverything" >=20 >=20 > 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).=20 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 >=20 > 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. >=20 >=20 > Example: >=20 > I start with contacts.org like this: >=20 > * job > * family >=20 > I go to "job" and expand using TAB: >=20 > * job > * Bob > * Peter > * Susan > * family >=20 > 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"): >=20 > * job > * Bob > * Peter > :PROPERTIES: > :EMAIL: peter@example.com > :COMPANY: Acme > :ADDRESS: Hiscity, hisstreet 42 > :END: >=20 > - met him at conference XY in 2009 > - works in the field of foobar >=20 > * Susan > * family >=20 >=20 > 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. >=20 >=20 > Usual behavior: PROPERTY drawer stays collapsed when its > corresponding heading gets expanded. >=20 > My wish: PROPERTY drawer gets collapsed when its corresponding > heading gets expanded. >=20 >=20 > 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 :-) >=20 > Thanks for your comments, thoughts, tipps! >=20 >=20 > --=20 > mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: >> get Memacs from https://github.com/novoid/Memacs < >=20 > https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on = github >=20 >=20