From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#3494: Review line-move-visual patch Date: Tue, 14 Jul 2009 22:05:59 -0400 Message-ID: References: <87ws6ff8b5.fsf@stupidchicken.com> Reply-To: Stefan Monnier , 3494@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1247624271 12657 80.91.229.12 (15 Jul 2009 02:17:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jul 2009 02:17:51 +0000 (UTC) Cc: 3494@emacsbugs.donarmstrong.com To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 15 04:17:43 2009 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 1MQu3z-0002T9-71 for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 Jul 2009 04:17:43 +0200 Original-Received: from localhost ([127.0.0.1]:33810 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQu3y-0004uh-9K for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Jul 2009 22:17:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MQu3r-0004rC-P7 for bug-gnu-emacs@gnu.org; Tue, 14 Jul 2009 22:17:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MQu3n-0004gA-7D for bug-gnu-emacs@gnu.org; Tue, 14 Jul 2009 22:17:35 -0400 Original-Received: from [199.232.76.173] (port=40698 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MQu3m-0004fp-Oy for bug-gnu-emacs@gnu.org; Tue, 14 Jul 2009 22:17:30 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38457) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MQu3m-0000Lf-CT for bug-gnu-emacs@gnu.org; Tue, 14 Jul 2009 22:17:30 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6F2HSnk001084; Tue, 14 Jul 2009 19:17:28 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n6F2A5OC032147; Tue, 14 Jul 2009 19:10:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Stefan Monnier Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 15 Jul 2009 02:10:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 3494 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 3494-submit@emacsbugs.donarmstrong.com id=B3494.124762355531660 (code B ref 3494); Wed, 15 Jul 2009 02:10:04 +0000 Original-Received: (at 3494) by emacsbugs.donarmstrong.com; 15 Jul 2009 02:05:55 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6F25otY031655 for <3494@emacsbugs.donarmstrong.com>; Tue, 14 Jul 2009 19:05:51 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYEACvWXErO+KNz/2dsb2JhbACBUdAphAgFhm4 X-IronPort-AV: E=Sophos;i="4.42,401,1243828800"; d="scan'208";a="41627679" Original-Received: from 206-248-163-115.dsl.teksavvy.com (HELO pastel.home) ([206.248.163.115]) by ironport2-out.teksavvy.com with ESMTP; 14 Jul 2009 22:05:44 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 5A5277EF7; Tue, 14 Jul 2009 22:05:59 -0400 (EDT) In-Reply-To: <87ws6ff8b5.fsf@stupidchicken.com> (Chong Yidong's message of "Sat, 11 Jul 2009 13:17:34 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Tue, 14 Jul 2009 22:17:35 -0400 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:29429 Archived-At: > I just checked in a patch into the trunk, which makes line-move-visual > play properly with truncated lines (Bugs 3494 and 3805). I think it > should go to the branch as well. Could you review it? > 2009-07-11 Chong Yidong > * simple.el (temporary-goal-column): Change the value for > line-move-visual to a cons cell. > (line-move-visual): Record or set the window hscroll, if > necessary (Bug#3494). > (line-move-1): Handle cons value of temporary-goal-column. The problem with this code is that vertical-motion is defined as: LINES can optionally take the form (COLS . LINES), in which case the motion will not stop at the start of a screen line but on its column COLS (if such exists on that line, that is). but without specifying what is meant by COLS w.r.t hscroll. Similarly the docstring refers to "start of the screen line" without making it clear what it means in the case of hscroll. So, I'm not sure if doing it like you've done is right or not. Maybe a better solution is to use COLS + HSCROLL as the temporary-goal-column"; it would at least avoid having to change temporary-goal-column to accept a cons cell rather than only a number. Stefan