From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.bugs Subject: bug#8355: 24.0.50; Boxes in mode-line and scrolling Date: Fri, 11 Dec 2020 10:08:03 +0100 Message-ID: <874kkssob0.fsf@inria.fr> References: <87k4fkr896.fsf@gmail.com> <871rg0ibj2.fsf@gnus.org> <87v9dcqojh.fsf@inria.fr> <83sg8g5fer.fsf@gnu.org> <878sa8b1bz.fsf@gnus.org> <83o8j45erv.fsf@gnu.org> <838sa754yt.fsf@gnu.org> <87h7ouykuf.fsf@gnus.org> <835z5a6gyf.fsf@gnu.org> <87czziyjsc.fsf@gnus.org> <87y2i6yadn.fsf@inria.fr> <83wnxq49n5.fsf@gnu.org> <875z58sptj.fsf@inria.fr> <835z583f1x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27365"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 0.9.17; emacs 27.1 Cc: larsi@gnus.org, 8355@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 11 10:09:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kneQI-00070C-Df for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 10:09:10 +0100 Original-Received: from localhost ([::1]:46060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kneQH-0006Q9-92 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 04:09:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kneQA-0006Ps-UL for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 04:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kneQA-0002mt-73 for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 04:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kneQA-00069X-2t for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 04:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Antoine Levitt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Dec 2020 09:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8355 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 8355-submit@debbugs.gnu.org id=B8355.160767769323595 (code B ref 8355); Fri, 11 Dec 2020 09:09:02 +0000 Original-Received: (at 8355) by debbugs.gnu.org; 11 Dec 2020 09:08:13 +0000 Original-Received: from localhost ([127.0.0.1]:39932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knePN-00068U-KG for submit@debbugs.gnu.org; Fri, 11 Dec 2020 04:08:13 -0500 Original-Received: from mail-wr1-f42.google.com ([209.85.221.42]:41823) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1knePL-00068I-Tr for 8355@debbugs.gnu.org; Fri, 11 Dec 2020 04:08:12 -0500 Original-Received: by mail-wr1-f42.google.com with SMTP id a12so8218942wrv.8 for <8355@debbugs.gnu.org>; Fri, 11 Dec 2020 01:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:in-reply-to:from:to:cc:subject:date :message-id:mime-version:content-transfer-encoding; bh=MYFqu6CXtSnWrVpKLngwSwrRaSkMkuQZlTmmbAsipk8=; b=JhBg/MukqvAE8gbina4DRtLQfT434oZTTmkZzxnr3sJt1mGz2AkgNnFFdm1pPZkMcv mYPBYht7iP+OZHvGzfOk/FeAPsXb3xOGcgSWTvyT7DGXGhK3Phq9UMOVmXt963ELwBJ8 hhyansnS0N5qw0K+uhfMFifAVEko3zUWO/nKU1Q7ifemko4wazo0+pf3qWFS5dfEGLsD ljXi/aUOuGAnMbMqWtJ9aktIE+YHGc9EpUueIzuc0tfNIXdSSbMTHhD/ewzPpha1lkjv yAv+As7vZucJcfM3oBpbkgikw8WyFPbnWmtOptHMaC48z6L20F1LB+lXO+dZMxCV8GJ5 5wUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:in-reply-to:from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; bh=MYFqu6CXtSnWrVpKLngwSwrRaSkMkuQZlTmmbAsipk8=; b=HWAOo69SERzfuFC79wAQf5HGqluTNDAr20dLieDKFz2poAs8anvKm/BUZoP+CuioNz yX8HXW3WtPgz8sD+85VeXVW2DW6umi/+VFGZWWbdGBQWoJMYevU7YLci8Pf39Xbu6pYv NHeOf/zEdDOsVkh96/+nUaw7TCoq2mCMY7IGuv9J4LjU2Pg5+R/1+rlvhlOXJ8FkVg9Y 87NZvt9+8tSLEFk6h8DEkG70h0cHEwVoHBQ8uRYSRWq8MZYzXaqifFwEXUWEfOoGEjA8 abM/JANwvdAOy4AHBemQ55l8hYwz1drxgC8OkxkP1l2e8Day/gyT5XpiuFNPVzvxyDdY N3sg== X-Gm-Message-State: AOAM532DzxqnPZwYprBmuvVcz1WsJ8Z83gXF2qWMp9zA4UNQtusXRaJq QBMjpLPUhYRARWnH0eF7fOckaR8+vEs0fg== X-Google-Smtp-Source: ABdhPJywKxQd9XqFxvQkEWAlbcdk4CSZsNX168OZJmGwmoLs3MueZq1adH6Vc6yMwC0/+prHunALxA== X-Received: by 2002:adf:f48c:: with SMTP id l12mr12528067wro.280.1607677685549; Fri, 11 Dec 2020 01:08:05 -0800 (PST) Original-Received: from epsilon (58.32.23.109.rev.sfr.net. [109.23.32.58]) by smtp.gmail.com with ESMTPSA id a12sm13604593wrq.58.2020.12.11.01.08.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Dec 2020 01:08:04 -0800 (PST) In-reply-to: <835z583f1x.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195732 Archived-At: 11 December 2020 09:47 +01, Eli Zaretskii: >> So you've got a set of integers (the pixel positions of the >> line), a current integer (the current line) and you want to move to >> another integer in the set, approximately by some prescribed amount n >> (the screen height). If you do the simplest thing which is to move by n >> and round to the nearest line, then if you go down once and up once the >> only way you can fail to come back to the original point is if the shift >> you applied to round to a line is larger than the half-separation >> between lines. So if I have lines of about 20px, I would expect that to >> happen maybe 10% of the time; and I would also expect that sometimes the >> line shift is up and sometimes down. But in my tests, even with your >> patch, I see it happening a lot more than 10%, and always in the same >> direction (going down then up shifts one line up). So either it's >> something to do with the pixel distribution of my tex files which is >> messing this up, or I misunderstand the algorithm. > > A reproduction recipe for where you see this happening more that will > be appreciated. OK, I'll try it out more; I'm not running master "in production" yet because of some issue with mu4e not limiting the mail it shows me that I haven't had time to debug yet. > I also don't understand how you arrived at the 10% figure. Can you > elaborate? I assumed small, random variations in height of amplitude =CE=B4h around a reference height h0, and n =CE=B4h >> h0. Then the place where you fall before rounding is randomly distributed. You'll get movement only if you've rounded up or down by about the half-separation, which should happen a fraction 1/pixel height of the time. I have lines about 20px tall, so that's 5%; I multiply by two to account for the possibility of having rounded both up and down. If anything this should be an overestimate; but again my assumptions are probably unrealistic (eg for instance in my tex files the =CE=B4h is always positive, which might explain why I always see movement in the same direction). Best, Antoine