From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: scroll-down with pixel transition Date: Thu, 13 Apr 2017 15:35:51 +0700 Message-ID: References: <83efx0lnd2.fsf@gnu.org> <20170411.072417.159896512.tkk@misasa.okayama-u.ac.jp> <8360ibl77b.fsf@gnu.org> <20170412.211335.264468794.tkk@misasa.okayama-u.ac.jp> <83fuhdkd96.fsf@gnu.org> <075EF948-3442-4DF5-892B-8E90810A0840@misasa.okayama-u.ac.jp> <838tn4ixh4.fsf@gnu.org> 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 1492072588 2047 195.159.176.226 (13 Apr 2017 08:36:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Apr 2017 08:36:28 +0000 (UTC) Cc: Tak Kunihiro , Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 13 10:36:21 2017 Return-path: Envelope-to: ged-emacs-devel@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 1cyaEn-0000MT-6j for ged-emacs-devel@m.gmane.org; Thu, 13 Apr 2017 10:36:21 +0200 Original-Received: from localhost ([::1]:47943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyaEq-0001Uw-0g for ged-emacs-devel@m.gmane.org; Thu, 13 Apr 2017 04:36:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyaEj-0001Ud-OK for emacs-devel@gnu.org; Thu, 13 Apr 2017 04:36:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyaEi-0000eZ-Lw for emacs-devel@gnu.org; Thu, 13 Apr 2017 04:36:17 -0400 Original-Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:37415) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyaEg-0000dB-Qj; Thu, 13 Apr 2017 04:36:14 -0400 Original-Received: by mail-wm0-x22b.google.com with SMTP id u2so41239243wmu.0; Thu, 13 Apr 2017 01:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=bphcKPdDuZOwMg44k2S8wjUzYdJPgRfwM3ExdR7XwVg=; b=CuPzBRyfmGu0HrOPS7xYUlCwCyIDVWupKdwBz5PE1vuRSF0QQsqnqaukM+aEdS9Afk Brzjs634R4zcK3VHHevByqVXu/33/3cmu4WjnO3iDOO8CluGgYjeltB4xtnoHV0wgU2x v3RgnAWh4rq+B1dlRvHfxpRVOYZATU/qbc+OQGQHZOGdqbr0/a6EKnUkwmnQHyiJbyyq hlbK3NmVr817IS6OMcLtEwV5RVYa5t4EIK27IsPzsraqXzBGknVR4dPUv0Svm2ylZln+ UUzgbbo+n1H7ZHQm+jTuj94erTdlDJkOa9qfQbN/MiIR/JRT8DuF70te05Gh5oibfPL7 VG2A== 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:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=bphcKPdDuZOwMg44k2S8wjUzYdJPgRfwM3ExdR7XwVg=; b=rb5uc6wmj1LPXV8kAqAGWE4SktvsRGFABCQnE3nYu9LsoZUhSYp5Aht9CsAZeDoF9w WUFCxoKltRJAmvhUgK9LRIutkk0RCiZ5TvjI7WFMxIjxMhPWrpbqj0eEPN96gvXmN7kh lNxd52aKOMgYpylv68A726oPGX0RU+0NwotbNeZsPxkXWAEPMFLZD4dlvLg1qEUg38A8 YZwGLGlb1Eq0GePzrO/zYggsFbYJw7pJVw5OIGGxvP/ucoW3pn3G/w9j1hz84VguuhhB 2+4pycD9FI3bXmiHaHIvsHkNQkcdYGTM/M+wdcWnqMN2yY/GjhP3fkoAA35jgsguDOZJ 0SLQ== X-Gm-Message-State: AN3rC/4EumHWRP4TlTTOMDkgVRE1EoOLsVVjKNqDwoKxrA6a5o4Pf1WD PKZtur1zwDuvZKtlB9oH0zmY/Ovu9xcd X-Received: by 10.28.87.138 with SMTP id l132mr23992941wmb.95.1492072572030; Thu, 13 Apr 2017 01:36:12 -0700 (PDT) Original-Received: by 10.223.169.12 with HTTP; Thu, 13 Apr 2017 01:35:51 -0700 (PDT) In-Reply-To: <838tn4ixh4.fsf@gnu.org> X-Google-Sender-Auth: WEp7GDZ3Afgx5vBgnTgjxjclqTg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:213934 Archived-At: On Thu, Apr 13, 2017 at 2:21 PM, Eli Zaretskii wrote: >> From: Tak Kunihiro >> I think before pixel-level vertical scrolling up or down, >> scrolling single line up or down `with pixel transition' should be >> implemented. It ends up (window-vscroll nil t) to be zero. >> This may be good enough to give modern feel. >> >> I assign the snippet to mwheel-scroll-up-function and it works >> OK so far. > > Sorry, I don't understand your proposal. Can you show some code? I think I do, and can translate. To reproduce: Scroll a window up or down by one line, e.g. by (scroll-up 1) or (scroll-down 1). Current behavior: The display is updated once, with the window scrolled a whole line. Desired behavior: The display is updated n times, with the window scrolled 1 pixel, then 2 pixels, =E2=80=A6, then n-1 pixels, then n pixels, where n is the height of a line in pixels. Attempted implementation: (defun my-scroll-down-line () (interactive) (scroll-down 1) ;; Undesired redraw happens here (set-window-vscroll nil (1- (frame-char-height)) t) (sit-for 0.001) (dolist (vs (reverse (number-sequence 0 (- (frame-char-height) 2)))) (set-window-vscroll nil vs t) (sit-for 0.001))) Observed behavior: The display is updated n+1 times, first with the window scrolled a whole line, then 1 pixel, 2 pixels, =E2=80=A6, n-1 pixels= , finally a whole line again.