From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Milan_Stanojevi=C4=87?= Newsgroups: gmane.emacs.help Subject: recenter and visual-line-mode Date: Tue, 7 Apr 2015 16:14:59 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1428456544 31177 80.91.229.3 (8 Apr 2015 01:29:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Apr 2015 01:29:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 08 03:29:04 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yfenf-00028u-2Z for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Apr 2015 03:29:03 +0200 Original-Received: from localhost ([::1]:49843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfene-0001xK-F5 for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Apr 2015 21:29:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfZuP-0000ui-9k for help-gnu-emacs@gnu.org; Tue, 07 Apr 2015 16:15:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfZuO-0002Rf-Cg for help-gnu-emacs@gnu.org; Tue, 07 Apr 2015 16:15:41 -0400 Original-Received: from mail-ig0-x22d.google.com ([2607:f8b0:4001:c05::22d]:36325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfZuO-0002RT-6A for help-gnu-emacs@gnu.org; Tue, 07 Apr 2015 16:15:40 -0400 Original-Received: by igblo3 with SMTP id lo3so22624477igb.1 for ; Tue, 07 Apr 2015 13:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=PTySpLnNoU/H2jBUTCgukG7j6UoaDpuylY0/8cWJOB4=; b=fb+y1JMYq0sGqPqdS1nJHBz9tYS7UmQwfbiq1uzAgQc9BWQSPH0kh+WpjJsMzua8ng Q2thQ9/ZhUoXePRWYx3MKf2qSXOgFS2dsSRf21y9LqvOYxTlMgdj03gwKpLHuPnskbdk G2k/G7ejaZyZC0yWsDiTuKcUv8IFYibQ0JGtcbpvgi6Ajsa9EtqW2fZnQuuWtUzFLy+p ky3pWKMidsPuFb5Rn5BopFibFrCcwzvWfinTCtvgIhXkEkmUbEXEutjWGPpOy7X1PvaZ 8lewLl/PqG2DhBK8M1JGxvDfwtI1aMP6HKj1MR4g6KOJYIJAuzwo51EHAXsGYi9exqo5 L0Jw== X-Received: by 10.43.110.136 with SMTP id ek8mr29265919icc.87.1428437739270; Tue, 07 Apr 2015 13:15:39 -0700 (PDT) Original-Received: by 10.64.154.134 with HTTP; Tue, 7 Apr 2015 13:14:59 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c05::22d X-Mailman-Approved-At: Tue, 07 Apr 2015 21:28:48 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103566 Archived-At: I don't know if this is a bug or an expected behavior. With visual-line-mode on, running (recenter 0) doesn't always put the point on the top-most line in the window. I experimented a bit and it seems that (recenter 0) doesn't work if the point is on the portion of the word that was moved down because of word-wrapping. For example, I have word "foobar" where "bar" can't fit on the line. With visual-line-mode off (and truncate-lines nil), "foo" will be one visual line and then "bar" on the next. If I turn on visual-line-mode, the whole "foobar" would move to the next visual line. If I then run (recenter 0) while point is inside "foo", the lines will move such that point ends up on line 2, but if I do it while the point is inside "bar" then the point will end up on line 1. I think the correct behavior would be to move to line 1 always. Is this a bug? I'm using emacs 24.4.1 with Motif toolkit.