From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toby Cubitt Subject: Re: [PATCH] Make org-[beginning|end]-of-line respect visual-line-mode Date: Tue, 6 Nov 2012 18:43:25 +0100 Message-ID: <20121106174325.GA15586@c3po> References: <87liee7i60.fsf@gmail.com> Reply-To: Toby Cubitt Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVnB7-00011q-7E for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 12:43:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVnB5-0006WA-Pj for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 12:43:09 -0500 Received: from sanddollar.geekisp.com ([216.168.135.167]:28842) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TVnB5-0006Vw-KU for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 12:43:07 -0500 Content-Disposition: inline In-Reply-To: <87liee7i60.fsf@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Tue, Nov 06, 2012 at 06:30:47PM +0100, Nicolas Goaziou wrote: > Toby Cubitt writes: > > > I'm confused. Which variable are you talking about here? > > `line-move-visual' > > > Anyway, I see that `visual-line-mode's sets `line-move-visual' to t > > buffer-locally. So checking only `line-move-visual' in > > `org-beginning-of-line' is fine... > > > > ...which strongly suggests that the recent fix to `org-end-of-line' is > > wrong. Shouldn't it also be checking `line-move-visual' and not > > `visual-line-mode', like `org-beginning-of-line'? > > Doesn't `visual-line-mode' set C-e to `end-of-visual-line'? As I tried > to explain, unless I'm mistaken, `line-move-visual' has nothing to do > with beginning or end of current line. Aha! You may well be right. In which case why is `org-beginning-of-line' doing this: (if (org-bound-and-true-p line-move-visual) (beginning-of-visual-line 1) (beginning-of-line 1)) Shouldn't it be doing this instead? (if (org-bound-and-true-p visual-line-mode) (beginning-of-visual-line 1) (beginning-of-line 1)) Or maybe I'm missing a subtle difference between org-beginning-of-line and org-end-of-line... Best, Toby -- Dr T. S. Cubitt Mathematics and Quantum Information group Department of Mathematics Complutense University Madrid, Spain email: tsc25@cantab.net web: www.dr-qubit.org