From mboxrd@z Thu Jan 1 00:00:00 1970 From: coroa@online.de (Jonas =?utf-8?Q?H=C3=B6rsch?=) Subject: [PATCH] hide inline-tasks in 'children visibility state Date: Wed, 30 Oct 2013 16:38:30 +0100 Message-ID: <87r4b23h1l.fsf@kafka.loc> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbXrD-0004W9-S1 for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 11:39:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbXr7-0005Ej-LR for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 11:38:55 -0400 Received: from plane.gmane.org ([80.91.229.3]:54875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbXr7-0005EJ-EV for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 11:38:49 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VbXr6-00042q-F6 for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 16:38:48 +0100 Received: from 91-64-62-247-dynip.superkabel.de ([91.64.62.247]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Oct 2013 16:38:48 +0100 Received: from coroa by 91-64-62-247-dynip.superkabel.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Oct 2013 16:38:48 +0100 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: emacs-orgmode@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain hej, one more patch, which takes care of re-hiding inline-tasks properly. finally it is possible to work with longer inline tasks without them getting always in the way. just bump me, if anything is not to your liking cheers, jonas --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-org-inlinetask-hide-inline-tasks-in-children-visibil.patch Content-Transfer-Encoding: quoted-printable From=20447d528263728ea56f390ae8dfdfa99880d6ccb4 Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Wed, 30 Oct 2013 15:39:33 +0100 Subject: [PATCH] org-inlinetask: hide inline tasks in 'children visibility state * lisp/org.el (org-cycle-hide-inline-tasks): re-hide inline tasks when switching to 'children visibility state. TINYCHANGE =2D-- lisp/org.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 4f3bf4b..b93f3f4 100644 =2D-- a/lisp/org.el +++ b/lisp/org.el @@ -7074,11 +7074,19 @@ open and agenda-wise Org files." (org-flag-drawer t)))))) =20 (defun org-cycle-hide-inline-tasks (state) =2D "Re-hide inline task when switching to 'contents visibility state." =2D (when (and (eq state 'contents) =2D (boundp 'org-inlinetask-min-level) =2D org-inlinetask-min-level) =2D (hide-sublevels (1- org-inlinetask-min-level)))) + "Re-hide inline tasks when switching to 'contents or 'children +visibility state." + (cond ((eq state 'contents) + (when (and (boundp 'org-inlinetask-min-level) + org-inlinetask-min-level) + (hide-sublevels (1- org-inlinetask-min-level)))) + ((eq state 'children) + (when (featurep 'org-inlinetask) + (save-excursion + (while (and (outline-next-heading) + (org-inlinetask-at-task-p)) + (org-inlinetask-toggle-visibility) + (org-inlinetask-goto-end))))))) =20 (defun org-flag-drawer (flag) "When FLAG is non-nil, hide the drawer we are within. =2D-=20 1.8.4 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJScSf2AAoJECrXDlJwTJyRVmoP/iqFBnPyurUu0wPC1I4s6EiQ UqikQ3qjEg0rLCpOyhh7BICJoZYrBMRWeE2YxOdthNcfkLA+2Jx6OmWGUWv0t5f0 eqmCGQnrO4CkOLQ1sFMtI6cn9SQS5RcB94x2+pMvRQvZZc+4dcDemZlsPraLLIK/ gn2tzbGoT5M4MN2xbYbbWj+4Y4GF0/mxj+HTEVtJgh5EGKkR6JWPE4YmSCQKQBlP uDvJRbnKpuvz1EXtQ+PE9o3ialJtK9+6hgzvid341OQST6pwM75AnsmGWzeDeAm9 q+JW3xiPXPsEO1NRVnbQ6HS3fY4qH5B/9RZVcB+rG+tvVTToV4yHxLSG6GgMu+4H P1o52FBNB6nx8wvELL/AMbV7NmA/F/9zB5jJMJgaSp1R4HmpG06zRyzizWmGpRQk nz7/6zfShwjgxlrhBZoFgJ19xiJtt2kyRkhTfy0MFxH0ZoHdI+71rBaRe6dpKaZt xXFscRcHhfB7mlOf+O34d0VAOTilX8FHYPCYudYkEZhbPU6gOR+cuK2mY3i5buL0 BEJ1InCYN4T0IHe23hyyGAO8KG1OdMRc7DY9/xfSwzUpie9WSaFuqwu1O2k4uiWX YpxPuiVrWYJEN3KPXHgTPIk8waJoi7Erz1Q7Z0UXElFooZyEORiHG5PRWN2NAhbb QrZHI/r6WwEJufPmN5q4 =q01+ -----END PGP SIGNATURE----- --==-=-=--