From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#8355: 24.0.50; Boxes in mode-line and scrolling Date: Fri, 11 Dec 2020 10:47:06 +0200 Message-ID: <835z583f1x.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23460"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 8355@debbugs.gnu.org To: Antoine Levitt Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 11 09:50:34 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 1kne8I-00060W-7o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 09:50:34 +0100 Original-Received: from localhost ([::1]:56796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kne8H-0006Q2-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 03:50:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kne5q-00033H-0K for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 03:48:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56583) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kne5p-00016p-P6 for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 03:48:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kne5p-0005e5-Ls for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 03:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Dec 2020 08:48:01 +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.160767645321662 (code B ref 8355); Fri, 11 Dec 2020 08:48:01 +0000 Original-Received: (at 8355) by debbugs.gnu.org; 11 Dec 2020 08:47:33 +0000 Original-Received: from localhost ([127.0.0.1]:39896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kne5M-0005dJ-Q1 for submit@debbugs.gnu.org; Fri, 11 Dec 2020 03:47:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kne5K-0005d4-Gp for 8355@debbugs.gnu.org; Fri, 11 Dec 2020 03:47:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58298) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kne5F-0000ok-83; Fri, 11 Dec 2020 03:47:25 -0500 Original-Received: from [176.228.60.248] (port=3258 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kne5E-0005JV-Ot; Fri, 11 Dec 2020 03:47:24 -0500 In-Reply-To: <875z58sptj.fsf@inria.fr> (message from Antoine Levitt on Fri, 11 Dec 2020 09:35:20 +0100) 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:195729 Archived-At: > From: Antoine Levitt > Cc: larsi@gnus.org, 8355@debbugs.gnu.org > Date: Fri, 11 Dec 2020 09:35:20 +0100 > > > If the changes I installed don't improve things considerably, perhaps > > I should revert them? > > It's still better than the previous behavior so I would keep it. But the > question is what is the correct thing to do. OK, thanks. > I know nothing about how it's implemented, but I would assume a simple > round-to-nearest should do the trick, at least a very high fraction of > the time? That's what I did, or at least I thought I did. > 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. I also don't understand how you arrived at the 10% figure. Can you elaborate?