From fdaadb17df35fed45ca6161b2f62403712576b18 Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Sat, 30 Mar 2024 21:02:59 -0400 Subject: [PATCH] Fix TAB no longer working in Org tables --- config.org | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/config.org b/config.org index 0f17c89..6eb9be4 100644 --- a/config.org +++ b/config.org @@ -2600,13 +2600,22 @@ While this is a complex problem, the solution is actually rather simple: just re "" nil) #+end_src -This also means we don't need ~org-cycle~ to emulate indentation, which is nice. +This also means we don't need ~org-cycle~ to emulate indentation, which is nice. Unfortunately, this breaks something else: ~org-cycle~ not only handles visibility cycling, but also navigating inside tables. This means that we need a little extra binding configuration so that we can make this properly work: #+begin_src emacs-lisp -(after! org - (setf (nth 4 org-emphasis-regexp-components) 20)) +(let ((item + `(menu-item nil org-table-next-field + :filter ,(lambda (cmd) + (when (org-table-p) + cmd))))) + (map! :after org + :map evil-org-mode-map + :i "TAB" item + :i "" item)) #+end_src +This makes it so that we only let tab keypresses fall through if we aren't in a table. (We'll just assume that we aren't going to be expanding any snippets while we're in a table.) + *** Project Links It's sometimes nice to be able to click a link in an Org file that takes me to one of my projects.