Browse Source

Emacs: Improve Org mode RET at point function for tables

master
Riyyi 2 years ago
parent
commit
81edda78b1
  1. 2
      .config/emacs/config/org-mode.org

2
.config/emacs/config/org-mode.org

@ -147,12 +147,14 @@ Org latex exporter.
If point is on:
checkbox -- toggle it
link -- follow it
table -- go to next row
otherwise -- run the default (evil-ret) expression"
(interactive)
(let ((type (org-element-type (org-element-context))))
(pcase type
('link (if org-return-follows-link (org-open-at-point) (evil-ret)))
((guard (org-at-item-checkbox-p)) (org-toggle-checkbox))
('table-cell (org-table-next-row))
(_ (evil-ret))
))))
#+END_SRC

Loading…
Cancel
Save