Function: org-metaup
org-metaup is an interactive and byte-compiled function defined in
org.el.gz.
Signature
(org-metaup &optional ARG)
Documentation
Move subtree up or move table row up.
Calls org-move-subtree-up or org-table-move-row or
org-move-item-up, depending on context. See the individual commands
for more information.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org.el.gz
(defun org-metaup (&optional _arg)
"Move subtree up or move table row up.
Calls `org-move-subtree-up' or `org-table-move-row' or
`org-move-item-up', depending on context. See the individual commands
for more information."
(interactive "P")
(cond
((run-hook-with-args-until-success 'org-metaup-hook))
((org-region-active-p)
(let* ((a (save-excursion
(goto-char (region-beginning))
(line-beginning-position)))
(b (save-excursion
(goto-char (region-end))
(if (bolp) (1- (point)) (line-end-position))))
(c (save-excursion
(goto-char a)
(move-beginning-of-line 0)
(point)))
(d (save-excursion
(goto-char a)
(move-end-of-line 0)
(point))))
(transpose-regions a b c d)
(goto-char c)))
((org-at-table-p) (org-call-with-arg 'org-table-move-row 'up))
((and (featurep 'org-inlinetask)
(org-inlinetask-in-task-p))
(org-drag-element-backward))
((org-at-heading-p) (call-interactively 'org-move-subtree-up))
((org-at-item-p) (call-interactively 'org-move-item-up))
(t (org-drag-element-backward))))