From 84c3b6f19b30762cb2f5b5bfe3de84b52314f675 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 7 Jul 2009 15:12:49 +0200 Subject: [PATCH] Make Org work better with visual line mode Patch by Rudi Schlatte --- lisp/org.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 9998c08b6..0f67838f7 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -15975,7 +15975,9 @@ beyond the end of the headline." (car org-special-ctrl-a/e) org-special-ctrl-a/e)) refpos) - (beginning-of-line 1) + (if (org-bound-and-true-p line-move-visual) + (beginning-of-visual-line 1) + (beginning-of-line 1)) (if (and arg (fboundp 'move-beginning-of-line)) (call-interactively 'move-beginning-of-line) (if (bobp) @@ -16024,9 +16026,10 @@ beyond the end of the headline." (if (or (not special) (not (org-on-heading-p)) arg) - (call-interactively (if (fboundp 'move-end-of-line) - 'move-end-of-line - 'end-of-line)) + (call-interactively + (cond ((org-bound-and-true-p line-move-visual) 'end-of-visual-line) + ((fboundp 'move-end-of-line) 'move-end-of-line) + (t 'end-of-line))) (let ((pos (point))) (beginning-of-line 1) (if (looking-at (org-re ".*?\\([ \t]*\\)\\(:[[:alnum:]_@:]+:\\)[ \t]*$")) -- 2.11.4.GIT