From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Scrolling jumpy when line-spacing > 0 Date: Fri, 21 Apr 2017 17:13:32 +0700 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492783422 6780 195.159.176.226 (21 Apr 2017 14:03:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 21 Apr 2017 14:03:42 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 21 16:03:35 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d1Z9o-0001b3-P3 for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 16:03:32 +0200 Original-Received: from localhost ([::1]:59848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1Z9u-0001dI-Lh for geh-help-gnu-emacs@m.gmane.org; Fri, 21 Apr 2017 10:03:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d1VZb-0006ZP-Q1 for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 06:13:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d1VZa-00089G-Tv for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 06:13:55 -0400 Original-Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:37030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d1VZa-00088U-Ms for help-gnu-emacs@gnu.org; Fri, 21 Apr 2017 06:13:54 -0400 Original-Received: by mail-wm0-x22d.google.com with SMTP id m123so13234557wma.0 for ; Fri, 21 Apr 2017 03:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to :content-transfer-encoding; bh=XSD8G1uhAdxCbxCUS1kTosVnFGGrY4KRQBa8j8oQ6mE=; b=M/Q0gPWcYDtIt7csnxLeMfl559/Lr2BHjPLPRMnhXsDR58Xz94xb0TCBgv1uBP9oad 11rDjYVmCcJv4a2uCkphcSa7sEz8J8iLaxdZtlPPesEtK3jgnwMplXy7079vohTglt2U DvUmdEPKrlt3hFos8/vPgInoLGMVGXg5lNhwPCWLMWNAQBjRCuBkCak5PwmQE1rmx2tn WARvx8R3HsDVJkDPlsjb6UXrTwkxq2rgLU53vZcFjb8/bIVY0BubkUeIug3Lz7RTzcir 0rKo+f6Ha/FZR/oWaaByL0H/Zmz/UM3SMYL+a8Ri05GYQpG/ccU2VB7ouF1j/qVb4Ge+ 508w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to:content-transfer-encoding; bh=XSD8G1uhAdxCbxCUS1kTosVnFGGrY4KRQBa8j8oQ6mE=; b=ge0b2mVO78MkyxXaCk1BfBEH26nSflKktXoGClxZihFx/CGRcP99mX7RBQpqvO/82l XzKh5qQxC3n04egwA7qMLIWyYeKvhJMigWY48Zbs6owX7RGYfH7eH36bE32oumOJUpKw Ah2D2rHhVrvn5OchnstDU09R9LIkzFRbgYu/QgeXiMekv90qDqiepTpj0gTJbvLSoi3F NBs5i7tSjLFfl0U5Ner2Aeu0BO8Jd4tP38gT5JDkG1YnAaBOaPqJw2QJ6Y9YFqCHms+/ Brr+C7UEyzmExvBWb0bb+TUEIeCDlU0z2WfdZ92V2Wzo5erJ6gyiML7LM3r0JI7n/IwD uOtQ== X-Gm-Message-State: AN3rC/5VSU7UbOA95DpC+PG18eYX2SOkA9T6yS/R0zltri+95KQT/MHB goArBmisEAvxD7q6jNxdZl2neXGTDA== X-Received: by 10.28.199.198 with SMTP id x189mr7494635wmf.95.1492769632684; Fri, 21 Apr 2017 03:13:52 -0700 (PDT) Original-Received: by 10.223.169.12 with HTTP; Fri, 21 Apr 2017 03:13:32 -0700 (PDT) X-Google-Sender-Auth: LGwauV73WGMl1fiAb0l7RKwX-x8 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::22d X-Mailman-Approved-At: Fri, 21 Apr 2017 09:56:02 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:112838 Archived-At: Hello everybody, I am trying to configure line-wise scrolling. Basically, I want to press Ctrl+Up and Ctrl+Down and have Emacs scroll the current window in the corresponding direction, with point remaining stationary wrt buffer content. (defun yk-scroll-up () (interactive) (scroll-up 1)) (defun yk-scroll-down () (interactive) (scroll-down 1)) (global-set-key (kbd "C-") 'yk-scroll-down) (global-set-key (kbd "C-") 'yk-scroll-up) This works so far. Next, I also want my lines spaced a bit more widely. (setq line-spacing 0.5) And this is where I have a problem. When the window displays what I perceive as an integer number of lines, and the point is on the bottommost visible line, and I press C-, I expect the buffer content to scroll one line, and the point to move one line up wrt the window. However I observe that the buffer content scrolls almost a whole page, so the point is now on the topmost visible line. Minimized recipe: $ emacs -Q M-x emacs-version RET GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17 on lgw01-04, modified by Debian M-x view-emacs-news RET M-x set-variable RET line-spacing RET 0.5 RET M-x split-window-vertically Use the mouse to drag the top window=E2=80=99s modeline so that it is immediately (two pixels or so) after the line, =E2=80=9CSee files NEWS.23, NEWS.22, NEWS.21, NEWS.20, NEWS.19, NEWS.18,=E2=80=9D. Position the point on that line, using a mouse click. M-: (scroll-up 1) Observed behavior: Point is on the same line and the line is at the top of window. Expected behavior: Point is on the same line and the line is second from the bottom of window. The next line, =E2=80=9Cand NEWS.1-17 for change= s in older Emacs versions.=E2=80=9D, is visible. The issue is easier to reproduce with larger values of line-spacing. Basically, as long as the additional spacing of the current line spans beyond the window, the jump happens. Does anybody else see this? Is there an easy workaround?