From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Pluim Subject: org-end-of-line and in table interaction Date: Fri, 28 Sep 2018 11:29:33 +0200 Message-ID: <87wor6j7gi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5p5h-0006BQ-JG for emacs-orgmode@gnu.org; Fri, 28 Sep 2018 05:29:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5p5e-0007Bc-DC for emacs-orgmode@gnu.org; Fri, 28 Sep 2018 05:29:41 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:40833) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5p5e-0007B5-6X for emacs-orgmode@gnu.org; Fri, 28 Sep 2018 05:29:38 -0400 Received: by mail-wr1-x436.google.com with SMTP id y8-v6so5609587wrh.7 for ; Fri, 28 Sep 2018 02:29:37 -0700 (PDT) Received: from rpluim-ubuntu ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id w72-v6sm5883376wrc.52.2018.09.28.02.29.35 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Sep 2018 02:29:35 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi, I have (add-hook 'org-tab-first-hook 'org-end-of-line) This causes inside a table to always create another row, rather than moving to the next field. The patch below fixes this for me, although I=CA=BCm not sure it=CA=BCs 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 (/=3D bol (line-beginning-position)) (goto-char bol) (end-of-line)))) - (t (end-of-line))))) + (t (end-of-line)))))) =20 (define-key org-mode-map "\C-a" 'org-beginning-of-line) (define-key org-mode-map "\C-e" 'org-end-of-line)