Function: org-columns-move-right
org-columns-move-right is an interactive and byte-compiled function
defined in org-colview.el.gz.
Signature
(org-columns-move-right)
Documentation
Swap this column with the one to the right.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/org/org-colview.el.gz
(defun org-columns-move-right ()
"Swap this column with the one to the right."
(interactive)
(let* ((n (org-current-text-column))
(cell (nthcdr n org-columns-current-fmt-compiled))
e)
(when (>= n (1- (length org-columns-current-fmt-compiled)))
(error "Cannot shift this column further to the right"))
(setq e (car cell))
(setcar cell (car (cdr cell)))
(setcdr cell (cons e (cdr (cdr cell))))
(org-columns-store-format)
;; Do not compute again properties, since we're just moving
;; columns around. It can put a property value a bit off when
;; switching between an non-computed and a computed value for the
;; same property, e.g. from "%A %A{+}" to "%A{+} %A".
;;
;; In this case, the value needs to be updated since the first
;; column related to a property determines how its value is
;; computed. However, (correctly) updating the value could be
;; surprising, so we leave it as-is nonetheless.
(let ((org-columns-inhibit-recalculation t)) (org-columns-redo))
(forward-char 1)))