emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] org-end-of-line and <TAB> in table interaction


From: Robert Pluim
Subject: [O] org-end-of-line and <TAB> in table interaction
Date: Fri, 28 Sep 2018 11:29:33 +0200

Hi,

I have

(add-hook 'org-tab-first-hook 'org-end-of-line)

This causes <TAB> inside a table to always create another row, rather
than moving to the next field. The patch below fixes this for me,
although Iʼm not sure itʼs the right solution.

diff --git a/org.el b/org.el
index 45be987..f22e9a1 100644
--- a/org.el
+++ b/org.el
@@ -23608,6 +23608,7 @@ (defun org-end-of-line (&optional n)
                   (`(,_ . ,C-e) C-e) (_ org-special-ctrl-a/e)))
        deactivate-mark)
     ;; First move to a visible line.
+    (when (not (org-at-table-p))
     (if (bound-and-true-p visual-line-mode)
        (beginning-of-visual-line n)
       (move-beginning-of-line n))
@@ -23651,7 +23652,7 @@ (defun org-end-of-line (&optional n)
        (when (/= bol (line-beginning-position))
          (goto-char bol)
          (end-of-line))))
-     (t (end-of-line)))))
+     (t (end-of-line))))))
 
 (define-key org-mode-map "\C-a" 'org-beginning-of-line)
 (define-key org-mode-map "\C-e" 'org-end-of-line)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]