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 09:35:20 +0100 Message-ID: <875z58sptj.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40195"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 0.9.17; emacs 28.0.50 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 09:54:05 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 1kneBh-000AMI-9x for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 09:54:05 +0100 Original-Received: from localhost ([::1]:33258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kneBg-00005D-Bb for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Dec 2020 03:54:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knduE-0005GZ-Bm for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 03:36:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56563) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1knduE-00040p-3G for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 03:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1knduE-0005Lt-07 for bug-gnu-emacs@gnu.org; Fri, 11 Dec 2020 03:36: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 08:36: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.160767573220532 (code B ref 8355); Fri, 11 Dec 2020 08:36:01 +0000 Original-Received: (at 8355) by debbugs.gnu.org; 11 Dec 2020 08:35:32 +0000 Original-Received: from localhost ([127.0.0.1]:39876 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kndtj-0005L6-JL for submit@debbugs.gnu.org; Fri, 11 Dec 2020 03:35:31 -0500 Original-Received: from mail-wr1-f44.google.com ([209.85.221.44]:38406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kndtg-0005Kp-To for 8355@debbugs.gnu.org; Fri, 11 Dec 2020 03:35:30 -0500 Original-Received: by mail-wr1-f44.google.com with SMTP id r7so8132441wrc.5 for <8355@debbugs.gnu.org>; Fri, 11 Dec 2020 00:35:28 -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; bh=GjuT9R341ZtfivZVZq1B4MANIB40KAgfB0zBvjU3al8=; b=YTB0Oa5IbNUv/8i0kR4+WHBY3AAK3vTEPldAD9sYE1DKUoVeLKeQgRMbDkug+IO9Ya 71VfbPXpRjY0e8pqMFbEQQJwh6Insn7ItCr9CEThCcFGyYG3yaDUTp/YKDKUjRUvHp7d yYl6rgtZ3XSloRXIv/CYS9HkVAV4NFmKI+5jH8tYOq5gPJSmuAuonwo+qaCxa40gf1bi +B7LjhcsPVyR+gzVHOMuJVVk+b9WbEPzh7r2JHCAH2dZRPrtretAIZAfmWV8+s2IVF4j XuDyEo2afvvb80g/6adgEgPilqgyMnpZClGN1ccjRqglt38xsIWnxG6GuX5H8ISv5AoR XJYQ== 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; bh=GjuT9R341ZtfivZVZq1B4MANIB40KAgfB0zBvjU3al8=; b=soMquC7BB2EX0bcWrrDbcowNmlwvN8n3FWk3d5L7WGcimdsILcZlPR2j2jhifgL0zR +VUCBzP9x+EZiXOuHEK9pkQwWLbYNc+tjZwxqslJ5HWLRj6R00A9hl3pgAoYpr9/efoM Y4VL+khJdv8vCt40acESsUwnrhN8EVyh49GpR7BHcifO+H0hDHKEnk+6l9+CKie5rvKj nEKynpaBBQJI4KhRE7p1org6Ee5oq+CYb8ki6AW3lq0TComxqqWBSguCPRYa6vpcgb69 WTOWfX3yHxCeQ5xvWqCPeoPY3vGDDi9lb268xLcZtxG/gZwSPN3urwDTQa6HEnGT/B/d Zg+Q== X-Gm-Message-State: AOAM533PHOdM56iAjOjZPisi1o1Vz1Zt6XZosy8HxCq3cRhJjrrpWM+X 3SHG7fL5fFCVWeLPoHpP3BzmxRP4zyUBtg== X-Google-Smtp-Source: ABdhPJzVhYD3COQ/YXpZflT+KjFPE2HOxJ9/b5ni7XGFlDn/TYn1JCAzQ7rigWex9iNx6aJev5otQA== X-Received: by 2002:adf:f344:: with SMTP id e4mr11426580wrp.25.1607675722687; Fri, 11 Dec 2020 00:35:22 -0800 (PST) Original-Received: from epsilon (58.32.23.109.rev.sfr.net. [109.23.32.58]) by smtp.gmail.com with ESMTPSA id k2sm13974847wru.43.2020.12.11.00.35.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Dec 2020 00:35:21 -0800 (PST) In-reply-to: <83wnxq49n5.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:195730 Archived-At: 10 December 2020 04:34 +01, Eli Zaretskii: >> From: Antoine Levitt >> Cc: Eli Zaretskii , 8355@debbugs.gnu.org >> Date: Wed, 09 Dec 2020 21:47:48 +0100 >> >> movement does remain the rule and no movement the exception. > > IME, with that file and the default settings, it's the other way > around. > > 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. 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? 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. Best, Antoine