Function: org-meta-return

org-meta-return is an interactive and byte-compiled function defined in org.el.gz.

Signature

(org-meta-return &optional ARG)

Documentation

Insert a new heading or wrap a region in a table.

Calls org-insert-heading, org-insert-item or org-table-wrap-region, depending on context. When called with an argument, unconditionally call org-insert-heading.

This function has :before advice: org-fold-check-before-invisible-edit-maybe.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-meta-return (&optional arg)
  "Insert a new heading or wrap a region in a table.
Calls `org-insert-heading', `org-insert-item' or
`org-table-wrap-region', depending on context.  When called with
an argument, unconditionally call `org-insert-heading'."
  (interactive "P")
  (or (run-hook-with-args-until-success 'org-metareturn-hook)
      (call-interactively (cond (arg #'org-insert-heading)
				((org-at-table-p) #'org-table-wrap-region)
				((org-in-item-p) #'org-insert-item)
				(t #'org-insert-heading)))))