Move modules/org/* back to lang/org
This commit is contained in:
parent
346d7bdf36
commit
b111303d20
25 changed files with 159 additions and 167 deletions
53
modules/lang/org/autoload/tables.el
Normal file
53
modules/lang/org/autoload/tables.el
Normal file
|
@ -0,0 +1,53 @@
|
|||
;;; org/org/autoload/tables.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/table-next-row ()
|
||||
"Go to the next row (same column) in the current table."
|
||||
(interactive)
|
||||
(if (org-at-table-p)
|
||||
(org-table-next-row)
|
||||
(org-down-element)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/table-previous-row ()
|
||||
"Go to the previous row (same column) in the current table. Before doing so,
|
||||
re-align the table if necessary. (Necessary because org-mode has a
|
||||
`org-table-next-row', but not `org-table-previous-row')"
|
||||
(interactive)
|
||||
(if (org-at-table-p)
|
||||
(progn
|
||||
(org-table-maybe-eval-formula)
|
||||
(org-table-maybe-recalculate-line)
|
||||
(if (and org-table-automatic-realign
|
||||
org-table-may-need-update)
|
||||
(org-table-align))
|
||||
(let ((col (org-table-current-column)))
|
||||
(beginning-of-line 0)
|
||||
(when (or (not (org-at-table-p)) (org-at-table-hline-p))
|
||||
(beginning-of-line))
|
||||
(org-table-goto-column col)
|
||||
(skip-chars-backward "^|\n\r")
|
||||
(when (org-looking-at-p " ") (forward-char))))
|
||||
(org-up-element)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/table-next-field ()
|
||||
(interactive)
|
||||
(if (org-at-table-p) (org-table-next-field) (org-end-of-line)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/table-previous-field ()
|
||||
(interactive)
|
||||
(if (org-at-table-p) (org-table-previous-field) (org-beginning-of-line)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/table-append-field-or-shift-right ()
|
||||
(interactive)
|
||||
(org-shiftmetaright)
|
||||
(when (org-at-table-p) (org-metaright)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org/table-prepend-field-or-shift-left ()
|
||||
(interactive)
|
||||
(if (org-at-table-p) (org-shiftmetaright) (org-shiftmetaleft)))
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue