lang/org: +org/toggle-fold removes babel result blocks

This commit is contained in:
Henrik Lissner 2017-04-10 01:11:02 -04:00
parent 5402521647
commit 3800d976a1

View file

@ -137,8 +137,10 @@ wrong places)."
;;;###autoload ;;;###autoload
(defun +org/toggle-fold () (defun +org/toggle-fold ()
"Toggle the local fold at the point (as opposed to cycling through all levels "Toggle the local fold at the point (as opposed to cycling through all levels
with `org-cycle')." with `org-cycle'). Also removes babel result blocks, if run from a code block."
(interactive) (interactive)
(org-babel-when-in-src-block
(call-interactively 'org-babel-remove-result-one-or-many))
(cond ((org-at-heading-p) (cond ((org-at-heading-p)
(outline-toggle-children)) (outline-toggle-children))
((org-at-item-p) ((org-at-item-p)