summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2017-09-18 20:20:35 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2017-09-18 20:20:35 +0200
commit44c46176ecddca46b15ef1a07537a96f04fa2b4b (patch)
tree5a84e9546b02bc33ccb802b4fc069b50cd5854a2
parent5bcaa4dd138ecccdb798808bc6f3acd52a40767a (diff)
downloadorg-mode-44c46176ecddca46b15ef1a07537a96f04fa2b4b.tar.gz
Re-bind `org-show-children' to C-c TAB
* lisp/org.el (org-ctrl-c-tab): New function.
-rw-r--r--lisp/org.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 0b73f16..4f1b9ce 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -19614,6 +19614,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
(org-defkey org-mode-map "\C-c\C-x>" 'org-agenda-remove-restriction-lock)
(org-defkey org-mode-map "\C-c-" 'org-ctrl-c-minus)
(org-defkey org-mode-map "\C-c*" 'org-ctrl-c-star)
+(org-defkey org-mode-map (kbd "C-c TAB") #'org-ctrl-c-tab)
(org-defkey org-mode-map "\C-c^" 'org-sort)
(org-defkey org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c)
(org-defkey org-mode-map "\C-c\C-k" 'org-kill-note-or-show-branches)
@@ -21077,6 +21078,15 @@ context. See the individual commands for more information."
(interactive)
(org-return t))
+(defun org-ctrl-c-tab (&optional arg)
+ "Toggle columns width in a table, or show children.
+Call `org-table-toggle-column-width' if point is in a table.
+Otherwise, call `org-show-children'."
+ (interactive "p")
+ (call-interactively
+ (if (org-at-table-p) #'org-table-toggle-column-width
+ #'org-show-children)))
+
(defun org-ctrl-c-star ()
"Compute table, or change heading status of lines.
Calls `org-table-recalculate' or `org-toggle-heading',