From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Josh Buhl Newsgroups: gmane.emacs.bugs Subject: vertical-motion primitive fails specification Date: Sun, 28 Apr 2002 01:41:03 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <3CCB370F.6050001@uni-bonn.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1019950931 25863 127.0.0.1 (27 Apr 2002 23:42:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 27 Apr 2002 23:42:11 +0000 (UTC) Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 171bpS-0006j2-00 for ; Sun, 28 Apr 2002 01:42:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 171bpb-0004bE-00; Sat, 27 Apr 2002 19:42:19 -0400 Original-Received: from node23.rhrz.uni-bonn.de ([131.220.14.223] helo=f2node23.rhrz.uni-bonn.de) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 171boQ-0004a0-00 for ; Sat, 27 Apr 2002 19:41:06 -0400 Original-Received: from uni-bonn.de (jagdweg22-24-gw.rhrz.uni-bonn.de [131.220.107.85]) by f2node23.rhrz.uni-bonn.de (AIX4.3/8.9.3/8.9.3) with ESMTP id BAA25832 for ; Sun, 28 Apr 2002 01:41:04 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.9) Gecko/20020412 Debian/0.9.9-6 Original-To: bug-gnu-emacs@gnu.org Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:998 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:998 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English, because the Emacs maintainers do not have translators to read other languages for them. Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list, and to the gnu.emacs.bug news group. In GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-03-22 on raven, modified by Debian configured using `configure i386-debian-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --with-x=yes --with-x-toolkit=athena --without-gif' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: C locale-coding-system: nil default-enable-multibyte-characters: t Please describe exactly what actions triggered the bug and the precise symptoms of the bug: The vertical-motion primitive is supposed to move point to the *start* of a screen line, i.e. a column which is equal to 0 modulo frame-width. In the documentation it says: vertical-motion is a built-in function. (vertical-motion LINES &optional WINDOW) Move point to start of the screen line LINES lines down. ----------------^ . . . The new position may be the start of a line, ------------------------------^ or just the start of a continuation line. --------------^ This is the behavior of emacs 20 on my system. In Emacs 21 running in X on my system, vertical-motion is moving point down by screen lines, but it is preserving the starting column modulo frame-width. e.g. if I start in column 40 on a line which is wrapped onto the next screen line, in a frame whose width is 80 and I evaluate the expression (vertical-motion 1), then point lands in column 120 instead of column 80, which would be the start of the next screen line. Emacs 21 is not doing this when running in a terminal on my system and it does occur when I run "emacs -q --no-site-file". Here's how to set up a concrete example: Start emacs 21 in X. Set the frame width to 80 by using the mouse to adjust the width of the window. Check the frame-width by evaluating (frame-width). Make sure toggle-truncate-lines is turned off (i.e. lines are wrapped and not truncated.) In an empty buffer press the 'a' key and insert 140 a's without spaces inbetween. There should now be one text line consisting of 140 letter a's which starts in the first screen line and is wrapped onto the second screen line. Move point to column 40 in the first screen line. Type M-x eval-expression and evaluate the expression (vertical-motion 1) Point lands in column 120 in the second screen line. If you do this in a terminal or with emacs 20, point will land at the start of the second screen line (which will be column 80 in emacs 21 and column 79 in emacs 20, since in emacs 20 there is a '\' displayed at the end of the first screen line to indicate the wrapped line.) Recent input: Recent messages: Loading 50tdtd (source)...done Loading easy-mmode...done Loading /usr/lib/emacs/21.2/i386-debian-linux-gnu/fns-21.2.1.el (source)...done Bootstrapping objects...done Loading cl-extra...done Loading cl-macs...done Loading mule-util...done Loading paren...done Loading server...done Loading emacsbug...done