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:27:04 +0100 Message-ID: <20121106172704.GA26302@c3po> References: <871ug68y1b.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]:51748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVmvN-0006Pw-5J for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 12:26:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVmvH-0006gD-4w for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 12:26:53 -0500 Received: from starfish.geekisp.com ([216.168.135.166]:41626) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TVmvG-0006g7-VS for emacs-orgmode@gnu.org; Tue, 06 Nov 2012 12:26:47 -0500 Content-Disposition: inline In-Reply-To: <871ug68y1b.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:02:40PM +0100, Nicolas Goaziou wrote: > Toby Cubitt writes: > > > org-beginning-of-line uses org-beginning-of-visual-line when > > line-move-visual is enabled. I'm not sure if line-mode-visual can be > > disabled when visual-line-mode is enabled. If so, org-beginning-of-line > > should maybe test for either line-mode-visual *or* visual-line-mode. > > `beginning-of-visual-line' either set locally `line-move-visual' to t or > use `vertical-motion', which doesn't care about `lime-move-visual' > value. Thus, as one could expect, `line-move-visual' has no effect on > horizontal scrolling. > > IMO, checking this variable is a no-op. I'm confused. Which variable are you talking about here? 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'? > Btw, if you plan to patch this area, could you provided tests for it > (see test-org/end-of-line in test-org.el)? As I can testify, there is > a high risk of regression in that area. Thanks, I'll try to remember. Though I have no plans to patch anything else in this area. Cheers, 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