all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-end-of-line and <TAB> in table interaction
@ 2018-09-28  9:29 Robert Pluim
  2018-09-28 10:30 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Pluim @ 2018-09-28  9:29 UTC (permalink / raw)
  To: emacs-orgmode

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)

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-09-29 12:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-28  9:29 org-end-of-line and <TAB> in table interaction Robert Pluim
2018-09-28 10:30 ` Nicolas Goaziou
2018-09-28 12:01   ` Robert Pluim
2018-09-28 12:21     ` Nicolas Goaziou
2018-09-28 12:48       ` Robert Pluim
2018-09-28 15:34         ` Nicolas Goaziou
2018-09-29 12:29           ` Robert Pluim

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.