0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-27 12:01:26 +00:00

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.
This commit is contained in:
Marco Wahl 2017-01-04 23:35:40 +01:00
parent 774ce8a50e
commit 5b4fcc3e2e

View file

@ -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)))