From 649f3eaf914eafb903a0fa9820ac6625155d1fcd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 7 Sep 2017 17:36:18 +0200 Subject: [PATCH] +org/toggle-fold: realign tables --- modules/org/org/autoload/org.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/org/org/autoload/org.el b/modules/org/org/autoload/org.el index 24beefd81..94437e8c3 100644 --- a/modules/org/org/autoload/org.el +++ b/modules/org/org/autoload/org.el @@ -259,11 +259,16 @@ wrong places)." ;;;###autoload (defun +org/toggle-fold () "Toggle the local fold at the point (as opposed to cycling through all levels -with `org-cycle'). Also removes babel result blocks, if run from a code block." +with `org-cycle'). Also: + + + If in a babel block, removes result blocks. + + If in a table, realign it, if necessary." (interactive) (save-excursion (org-beginning-of-line) - (cond ((org-in-src-block-p) + (cond ((org-table-p) + (org-table-align)) + ((org-in-src-block-p) (org-babel-remove-result)) ((org-at-heading-p) (outline-toggle-children))