From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: [PATCH 2/3] When demoting a subtree, don't change level of inline tasks within Date: Wed, 2 Mar 2011 17:56:03 +0100 Message-ID: <1299084964-26440-2-git-send-email-n.goaziou@gmail.com> References: <1299084964-26440-1-git-send-email-n.goaziou@gmail.com> Return-path: Received: from [140.186.70.92] (port=40166 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PupLv-0007rG-Er for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 11:56:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PupLu-0002YZ-EJ for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 11:56:43 -0500 Received: from mail-fx0-f41.google.com ([209.85.161.41]:33149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PupLu-0002Ub-5C for emacs-orgmode@gnu.org; Wed, 02 Mar 2011 11:56:42 -0500 Received: by mail-fx0-f41.google.com with SMTP id 5so213793fxm.0 for ; Wed, 02 Mar 2011 08:56:41 -0800 (PST) In-Reply-To: <1299084964-26440-1-git-send-email-n.goaziou@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org mode list Cc: Nicolas Goaziou * lisp/org.el (org-demote-subtree,org-promote-subtree): wrap org-map-tree into org-with-limited-levels macro, so it avoids operating on inline tasks. --- lisp/org.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 6e1be76..8ae5e6f 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -7002,7 +7002,7 @@ When a subtree is being promoted, the hook will be called for each node.") See also `org-promote'." (interactive) (save-excursion - (org-map-tree 'org-promote)) + (org-with-limited-levels (org-map-tree 'org-promote))) (org-fix-position-after-promote)) (defun org-demote-subtree () @@ -7010,7 +7010,7 @@ See also `org-promote'." See also `org-promote'." (interactive) (save-excursion - (org-map-tree 'org-demote)) + (org-with-limited-levels (org-map-tree 'org-demote))) (org-fix-position-after-promote)) -- 1.7.4.1