From 5b4fcc3e2e25349c690a37a94fd7c8599e7696d2 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Wed, 4 Jan 2017 23:35:40 +0100 Subject: [PATCH] org-table: Check if on table for field edit * lisp/org-table.el (org-table-edit-field): Don't open edit buffer if not on a table. Further added the toggle-feature for org-table-follow-field-mode to the documentation. --- lisp/org-table.el | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index c689ba3c7..977c0d6f9 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1992,11 +1992,15 @@ blank, and the content is appended to the field above." ;;;###autoload (defun org-table-edit-field (arg) "Edit table field in a different window. -This is mainly useful for fields that contain hidden parts. When called -with a `\\[universal-argument]' prefix, just make the full field \ -visible so that it can be -edited in place." +This is mainly useful for fields that contain hidden parts. + +When called with a `\\[universal-argument]' prefix, just make the full field +visible so that it can be edited in place. + +When called with a `\\[universal-argument] \\[universal-argument]' prefix, \ +toggle `org-table-follow-field-mode'." (interactive "P") + (unless (org-at-table-p) (user-error "Not at a table")) (cond ((equal arg '(16)) (org-table-follow-field-mode (if org-table-follow-field-mode -1 1))) -- 2.11.4.GIT