org.el (org-shiftmetaup, org-shiftmetadown): Update behavior

* org.el (org-shiftmetaup, org-shiftmetadown): Don't move the
subtree or list item at point up or down, as this feature is
already accessible through `org-metaup' and `org-metadown'.
Update the docstrings to reflect the new behavior.
This commit is contained in:
Bastien Guerry 2014-05-29 19:25:08 +02:00
parent 8772a2eb49
commit b978abb485
1 changed files with 10 additions and 12 deletions

View File

@ -20030,31 +20030,29 @@ individual commands for more information."
(t (org-modifier-cursor-error)))) (t (org-modifier-cursor-error))))
(defun org-shiftmetaup (&optional arg) (defun org-shiftmetaup (&optional arg)
"Move subtree up or kill table row. "Drag the line at point up.
Calls `org-move-subtree-up' or `org-table-kill-row' or In a table, kill the current row.
`org-move-item-up' or `org-timestamp-up', depending on context. On a clock timestamp, update the value of the timestamp like `S-<up>'
See the individual commands for more information." but also adjust the previous clocked item in the clock history.
Everywhere else, drag the line at point up."
(interactive "P") (interactive "P")
(cond (cond
((run-hook-with-args-until-success 'org-shiftmetaup-hook)) ((run-hook-with-args-until-success 'org-shiftmetaup-hook))
((org-at-table-p) (call-interactively 'org-table-kill-row)) ((org-at-table-p) (call-interactively 'org-table-kill-row))
((org-at-heading-p) (call-interactively 'org-move-subtree-up))
((org-at-item-p) (call-interactively 'org-move-item-up))
((org-at-clock-log-p) (let ((org-clock-adjust-closest t)) ((org-at-clock-log-p) (let ((org-clock-adjust-closest t))
(call-interactively 'org-timestamp-up))) (call-interactively 'org-timestamp-up)))
(t (call-interactively 'org-drag-line-backward)))) (t (call-interactively 'org-drag-line-backward))))
(defun org-shiftmetadown (&optional arg) (defun org-shiftmetadown (&optional arg)
"Move subtree down or insert table row. "Drag the line at point down.
Calls `org-move-subtree-down' or `org-table-insert-row' or In a table, insert an empty row at the current line.
`org-move-item-down' or `org-timestamp-up', depending on context. On a clock timestamp, update the value of the timestamp like `S-<down>'
See the individual commands for more information." but also adjust the previous clocked item in the clock history.
Everywhere else, drag the line at point down."
(interactive "P") (interactive "P")
(cond (cond
((run-hook-with-args-until-success 'org-shiftmetadown-hook)) ((run-hook-with-args-until-success 'org-shiftmetadown-hook))
((org-at-table-p) (call-interactively 'org-table-insert-row)) ((org-at-table-p) (call-interactively 'org-table-insert-row))
((org-at-heading-p) (call-interactively 'org-move-subtree-down))
((org-at-item-p) (call-interactively 'org-move-item-down))
((org-at-clock-log-p) (let ((org-clock-adjust-closest t)) ((org-at-clock-log-p) (let ((org-clock-adjust-closest t))
(call-interactively 'org-timestamp-down))) (call-interactively 'org-timestamp-down)))
(t (call-interactively 'org-drag-line-forward)))) (t (call-interactively 'org-drag-line-forward))))