From b7577f1e26492fd00464ff98204e6094b6bcb5af Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 5 Apr 2018 17:28:30 -0400 Subject: [PATCH] lang/org: fix org-shifttab only toggling current fold --- modules/lang/org/autoload/org.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index 4b3f60909..423c3f404 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -334,13 +334,14 @@ wrong places)." "Toggle the local fold at the point (as opposed to cycling through all levels with `org-cycle')." (interactive) - (save-excursion - (org-beginning-of-line) - (cond ((org-at-heading-p) - (outline-toggle-children) - (unless (outline-invisible-p (line-end-position)) - (org-cycle-hide-drawers 'subtree)) - t) - ((org-in-src-block-p) - (org-babel-remove-result) - t)))) + (unless (eq this-command 'org-shifttab) + (save-excursion + (org-beginning-of-line) + (cond ((org-at-heading-p) + (outline-toggle-children) + (unless (outline-invisible-p (line-end-position)) + (org-cycle-hide-drawers 'subtree)) + t) + ((org-in-src-block-p) + (org-babel-remove-result) + t)))))