From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman" Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1730: 23.0.60; line-move-visual doesn't forget Date: Tue, 30 Dec 2008 01:13:44 +0100 Message-ID: References: <4959555B.5030804@gmail.com> Reply-To: Lennart Borgman , 1730@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1230596631 24614 80.91.229.12 (30 Dec 2008 00:23:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 30 Dec 2008 00:23:51 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Dec 30 01:24:58 2008 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LHSPd-0007Wh-Ge for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Dec 2008 01:24:46 +0100 Original-Received: from localhost ([127.0.0.1]:53885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHSOP-0000wO-T2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Dec 2008 19:23:29 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LHSOM-0000w7-QV for bug-gnu-emacs@gnu.org; Mon, 29 Dec 2008 19:23:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LHSOL-0000vp-Su for bug-gnu-emacs@gnu.org; Mon, 29 Dec 2008 19:23:26 -0500 Original-Received: from [199.232.76.173] (port=34762 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LHSOL-0000vk-QI for bug-gnu-emacs@gnu.org; Mon, 29 Dec 2008 19:23:25 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49462) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LHSOL-0000wg-7g for bug-gnu-emacs@gnu.org; Mon, 29 Dec 2008 19:23:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBU0NMIT016257; Mon, 29 Dec 2008 16:23:22 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id mBU0K3Li015172; Mon, 29 Dec 2008 16:20:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: "Lennart Borgman" Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 30 Dec 2008 00:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1730 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123059603113767 (code B ref -1); Tue, 30 Dec 2008 00:20:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 30 Dec 2008 00:13:51 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBU0Dmwk013759 for ; Mon, 29 Dec 2008 16:13:49 -0800 Original-Received: from mx10.gnu.org ([199.232.76.166]:36055) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LHSE1-0000oA-PU for emacs-pretest-bug@gnu.org; Mon, 29 Dec 2008 19:12:46 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LHSF0-0008Pf-55 for emacs-pretest-bug@gnu.org; Mon, 29 Dec 2008 19:13:46 -0500 Original-Received: from fg-out-1718.google.com ([72.14.220.159]:47830) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LHSEz-0008PW-Fp for emacs-pretest-bug@gnu.org; Mon, 29 Dec 2008 19:13:45 -0500 Original-Received: by fg-out-1718.google.com with SMTP id l26so1949102fgb.30 for ; Mon, 29 Dec 2008 16:13:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=7gUbqTLlWEHz5gIVVhNq2rG5wol7huMZZyAMe/kNf9s=; b=emsgZ8kuVS7Raf/gFw5Xl3klwcCDwkBxLMjWlqK1G/FBkwBE91FFJbvuC6hs6Rk016 xkeGZhcsw7+5shaWVsUefDYSXSTP308qfo/6Exm9bZGdlvFiTaNe58kul70s/c9015Fg KtT2NdVPhxRkyxvXlqRxa3ngINtPBq/0laV6M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=t4PpuY7mm6bPfva5BYZyFfn1RrP6ihzSeP8PTvcYNgCNAG+vS4uMfeotTKaI7Ku+7B B9bd4qj6O/oOc11yR7ym6bC3nFVL9ssyeHxplNS5r13Vo5gRGhicwGKeYMuTY5WES2hc GWYBKyZEqqUwBrwZrnlxTS+26OrxD31xHBGuE= Original-Received: by 10.86.57.9 with SMTP id f9mr8381280fga.48.1230596024052; Mon, 29 Dec 2008 16:13:44 -0800 (PST) Original-Received: by 10.86.35.9 with HTTP; Mon, 29 Dec 2008 16:13:44 -0800 (PST) In-Reply-To: <4959555B.5030804@gmail.com> Content-Disposition: inline X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 29 Dec 2008 19:23:26 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23561 gmane.emacs.pretest.bugs:23570 Archived-At: On Mon, Dec 29, 2008 at 11:55 PM, Lennart Borgman (gmail) wrote: > It looks like line-move-visual keeps remember too much about which > column it was in. To show that start from > > emacs -Q > > and eval this code > > (defun ourcomments-move-beginning-of-line(arg) > "Move point to beginning of line or indentation. > See `beginning-of-line' for ARG. > > If `line-move-visual' is on then the visual line beginning is > first tried." > (interactive "p") > (let ((pos (point)) > vis-pos) > (when line-move-visual > (line-move-visual -1 t) > (beginning-of-line) > (setq vis-pos (point)) > (goto-char pos)) > (call-interactively 'beginning-of-line arg) > (when (and vis-pos > (= vis-pos (point))) > (while (and (> pos (point)) > (not (eobp))) Looking at the code I see that this can be taken care of by replacing the line below with (let (last-command) (line-move-visual 1 t ))) So ... this is not a bug. Just unintended use. > (line-move-visual 1 t)) > (line-move-visual -1 t)) > (when (= pos (point)) > (if (= 0 (current-column)) > (skip-chars-forward " \t") > (backward-char) > (beginning-of-line))))) > > (global-set-key [home] 'ourcomments-move-beginning-of-line) > > The function is supposed to go to the beginning of the visual line > first. This fails sometimes, see below. > > - Shrink the window width so that some lines wrap. > - Go to a wrapped buffer line, to the first visual line of it. > - Move forward some columns on that line. > - Move down to next visual line (arrow down). You should still be on the > same buffer line. > - Press HOME. > > Point should now be on the beginning on the visual line where you > pressed HOME. However it is on the line above instead, on the column you > were before you pressed arrow down. > > Now do exactly the same except: > > - Before pressing HOME press arrow left followed by arrow right. > > Now after pressing HOME you should be on the beginning of the visual > line as expected. > > > In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) > of 2008-12-25 > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > configured using `configure --with-gcc (3.4) --no-opt --cflags > -Ic:/g/include -fno-crossjumping' > > > > > >