Function: org-table-finish-edit-field

org-table-finish-edit-field is a byte-compiled function defined in org-table.el.gz.

Signature

(org-table-finish-edit-field)

Documentation

Finish editing a table data field.

Remove all newline characters, insert the result into the table, realign the table and kill the editing buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-table.el.gz
(defun org-table-finish-edit-field ()
  "Finish editing a table data field.
Remove all newline characters, insert the result into the table, realign
the table and kill the editing buffer."
  (let ((pos org-field-marker)
	(cw org-window-configuration)
	(cb (current-buffer))
	text)
    (goto-char (point-min))
    (while (re-search-forward "^#.*\n?" nil t) (replace-match ""))
    (while (re-search-forward "[ \t]*\n[ \t\n]*" nil t)
      (replace-match " "))
    (setq text (org-trim (buffer-string)))
    (set-window-configuration cw)
    (kill-buffer cb)
    (select-window (get-buffer-window (marker-buffer pos)))
    (goto-char pos)
    (move-marker pos nil)
    (org-table-check-inside-data-field)
    (org-table-get-field nil text)
    (org-table-align)
    (message "New field value inserted")))