From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.bugs Subject: bug#14836: Line scrolling inconsistent with global-hl-line-mode and some font settings Date: Wed, 10 Jul 2013 00:48:43 -0700 Message-ID: <87obaa6ejo.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1373442618 14365 80.91.229.3 (10 Jul 2013 07:50:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Jul 2013 07:50:18 +0000 (UTC) To: 14836@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 10 09:50:20 2013 Return-path: Envelope-to: geb-bug-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 1UwpAJ-0006vv-3H for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jul 2013 09:50:19 +0200 Original-Received: from localhost ([::1]:35981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwpAI-00058G-HF for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Jul 2013 03:50:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwpA8-00051l-D6 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 03:50:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwpA4-0000Wg-1R for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 03:50:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwpA3-0000Vk-T2 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 03:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UwpA2-0003ax-E9 for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 03:50:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dima Kogan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Jul 2013 07:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14836 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137344254813644 (code B ref -1); Wed, 10 Jul 2013 07:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jul 2013 07:49:08 +0000 Original-Received: from localhost ([127.0.0.1]:44163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwp98-0003Xy-5f for submit@debbugs.gnu.org; Wed, 10 Jul 2013 03:49:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52260) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uwp95-0003XB-Ek for submit@debbugs.gnu.org; Wed, 10 Jul 2013 03:49:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uwp8x-0000AQ-Gh for submit@debbugs.gnu.org; Wed, 10 Jul 2013 03:48:57 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwp8x-0000AM-Di for submit@debbugs.gnu.org; Wed, 10 Jul 2013 03:48:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53950) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwp8t-0004iH-Qh for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 03:48:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uwp8r-00008X-1f for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 03:48:51 -0400 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50930) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uwp8q-00007s-PC for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 03:48:48 -0400 Original-Received: from compute6.internal (compute6.nyi.mail.srv.osa [10.202.2.46]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 2A91620FC1 for ; Wed, 10 Jul 2013 03:48:45 -0400 (EDT) Original-Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute6.internal (MEProxy); Wed, 10 Jul 2013 03:48:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=from:to:subject:date:message-id:mime-version:content-type; s= mesmtp; bh=wfN84E1Txp1+S12dEdHgY+EWYac=; b=aN/b8rbEo/BgRfsPRBx9/ Dp7exFtq2ZaCpaItrrDqBwWakiLUwXEuBss56XPwXSIK8J5p2VYDS3BTHzmLXFOf o4KnqRHKhuGdcbs69Wgkh3LNj853IfKC6dgxMWC5gCINs8cUyBjgjVD5d3G+D9xe KzTZ2v1MuWcYHkJcEa4DX0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :mime-version:content-type; s=smtpout; bh=wfN84E1Txp1+S12dEdHgY+ EWYac=; b=hzqbysJVl/HG1M81IT7+W/GXTrQ3EPCP4Kc2tnJUHa6mEMX38wpQj4 EwIQPkHLeYUN9MIpRMahWP0J6EbHWcUfhR8slKjiEq5HdNajTtud9fRRSxZZC6Wg cu1FL6u6LQTZRmz9N1EXgCgDfyywfyIhMQydL6I2a2eI+f2hc8jP8= X-Sasl-enc: /VgTILooV3lS04DuMjuE19ep5lPME8iOOu0Fl9knmAsN 1373442524 Original-Received: from shorty.local (unknown [76.169.247.77]) by mail.messagingengine.com (Postfix) with ESMTPA id E38F3C00E83 for ; Wed, 10 Jul 2013 03:48:44 -0400 (EDT) Original-Received: from dima by shorty.local with local (Exim 4.80) (envelope-from ) id 1Uwp8l-00043Z-Ci for bug-gnu-emacs@gnu.org; Wed, 10 Jul 2013 00:48:43 -0700 User-agent: mu4e 0.9.9.5; emacs 24.3.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:76180 Archived-At: I am observing that under some specific conditions, the scrolling of lines in a buffer is inconsistent. If I'm looking at a buffer of plain ASCII text (the output of 'seq 1000' say), and I press C-n repeatedly, eventually the point reaches the end of the screen. Then the screen should scroll by 50%, leaving the point in the middle. This is the default emacs behavior. I am seeing that with specific settings I get a different behavior, that scrolls approximately by one line at a time (details below). I'm running a very recent build of emacs; the most recent change to lisp/simple.el is http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=abd9896b6e601368ef1f7a5174979e189a3f4d68 This is a recent Debian/unstable box. The .emacs is (custom-set-variables '(default-frame-alist '((font . "-adobe-courier-medium-r-normal--14-100-100-100-m-90-iso8859-1"))) '(inhibit-startup-screen t)) (global-hl-line-mode) This font and (global-hl-line-mode) are significant to manifest the bug. This bug report was originally discussed in http://debbugs.gnu.org/14567 Fixes to that bug also fixed other, related reports: http://debbugs.gnu.org/6103 http://debbugs.gnu.org/6272 http://debbugs.gnu.org/14598 To trigger the bug I do the following (may depend on my window manager, font system, screen resolution, etc): 1. launch emacs with the .emacs above 2. open a file that's the output of 'seq 1000' 3. make the text larger by pressing C-x C-+ four times 4. navigate to the bottom by pressing C-n repeatedly As soon as C-n breaks the screen boundary, the buffer should scroll the screen by 50%. Instead I see these 2 behaviors alternate with each C-n press at the bottom of the screen: - Screen scrolls by 1 line, revealing one new previously-cut-off line at the bottom. The point does NOT move, meaning (point) returns the same value before and after the C-n. The visual indication of the point does move, since it scrolls together with the text. - The point moves to this newly-visible line. Nothing scrolls I looked at some pertinent values when this happens to try to shed some light on the behavior: (defun doreport () (let ((report (format (concat "(point): %s\n" "(pos-visible-in-window-p t nil t): %s\n" "(posn-at-point): %s\n" "(default-font-height): %s\n") (point) (pos-visible-in-window-p t nil t) (posn-at-point) (default-font-height)))) (with-current-buffer "*scratch*" (insert report)))) When the point is sitting on a line such that the next C-n would scroll by one line while leaving the point stationary (doreport) says: (point): 112 (pos-visible-in-window-p t nil t): (0 902 0 15 7 41) (posn-at-point): (# 112 (0 . 880) 0 nil 112 (0 . 40) nil (0 . 0) (15 . 22)) (default-font-height): 22 Immediately after such a scroll-only motion (and right before C-n would simply move the point by one line without scrolling) (doreport) says: (point): 112 (pos-visible-in-window-p t nil t): (0 902 0 15 7 41) (posn-at-point): (# 112 (0 . 858) 0 nil 112 (0 . 39) nil (0 . 0) (15 . 22)) (default-font-height): 22 I can reproduce this reliably, so please ask if more probes would be useful.