From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Rankin Newsgroups: gmane.emacs.bugs Subject: bug#28844: 26.0.90; display-line-numbers-mode should call window-configuration-change-hook Date: Fri, 08 Dec 2017 12:14:02 +1000 Message-ID: <1512699242.3658603.1198014544.7EB49FB0@webmail.messagingengine.com> References: <1508054203.3504379.1139170720.0D0E99E9@webmail.messagingengine.com> 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 1512699314 22139 195.159.176.226 (8 Dec 2017 02:15:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 8 Dec 2017 02:15:14 +0000 (UTC) To: 28844@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 08 03:15:09 2017 Return-path: Envelope-to: geb-bug-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 1eN8Bx-0005Zq-3D for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Dec 2017 03:15:09 +0100 Original-Received: from localhost ([::1]:35260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN8C4-0007hl-4x for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Dec 2017 21:15:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eN8Bu-0007gm-33 for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 21:15:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eN8Bq-0003RX-Un for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 21:15:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42525) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eN8Bq-0003RR-Pn for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 21:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eN8Bq-0004WT-Jc for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2017 21:15:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <1508054203.3504379.1139170720.0D0E99E9@webmail.messagingengine.com> Resent-From: Paul Rankin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Dec 2017 02:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28844 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28844-submit@debbugs.gnu.org id=B28844.151269924517291 (code B ref 28844); Fri, 08 Dec 2017 02:15:02 +0000 Original-Received: (at 28844) by debbugs.gnu.org; 8 Dec 2017 02:14:05 +0000 Original-Received: from localhost ([127.0.0.1]:51203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN8Au-0004Up-4f for submit@debbugs.gnu.org; Thu, 07 Dec 2017 21:14:05 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:45607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eN8As-0004Uh-Uy for 28844@debbugs.gnu.org; Thu, 07 Dec 2017 21:14:03 -0500 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B206E20AAB; Thu, 7 Dec 2017 21:14:02 -0500 (EST) Original-Received: from web5 ([10.202.2.215]) by compute3.internal (MEProxy); Thu, 07 Dec 2017 21:14:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=cc:content-transfer-encoding:content-type:date:from :message-id:mime-version:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=mXnlcLlamwpb4Op+QEbx4CUYqO0/Xe/v1685jyfus 6U=; b=BMCJ+uXJCp0ZDL5xrCtrhiVZh966cA9O8txsKu+MgnsOkFD8UyAKlp4QL r7NTbDN7R3KV8YXI+e/7kFnR6TqWiVbwO4Wdio1tTJy2JeqEPH2Voe1XPa/cw9CM 0XoMRM2jcGD5WfjEd8AS7vlInznq9sNrH+8FmE4R/psGRNKv68h9fxGGTv1eC6m0 8293gwZn304IBjqSg4gPPwDAenoDt+KkdPaj6ysyGMnZMKlp2B0BBv7ARqTbh6+E g9rfmxLGiwiMc91McPHQfHGh5tnaINoykBRgA2smRGALTlvgH+5HDNSEeoraBK4T mDcLwl+SkXk1RwgI6x/O4kauc6klw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=mXnlcLlamwpb4Op+QEbx4CUYqO0/X e/v1685jyfus6U=; b=r0urlc5eYCvU6EYJnt9iO7DFjFz7PnOe3nknsNwT9t/vy Iw1IZntVRge7lGGonK+Yi7h2hIyWvNlOCdVBt/vupDUNH33KlyFVKJcGcyPQn6f4 UJV3dm0z/QlJks4VQWDTfKUW/GF7ghc1A5lMHmXApLVd2WRpDUsN2kiiIs/aP9/u h4NYySaLj+ks47bBEJb+xTykYLJDkrI+Da06ntPxnN9FhmdztWBssX+RE75XB6J2 y6OThn0cPHOMHbf9rScHaIbmjK7+g04LiNDLGgdgNqElNf0gHLFY1UrvrrF9SaGe fmMVCiGcVCUP6snULF3+O6ZA8IkNnV8Hgb+myI27Q== X-ME-Sender: Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id 882469E087; Thu, 7 Dec 2017 21:14:02 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface - ajax-1b87d328 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140797 Archived-At: Eli, I understand that your blindness to this bug is probably due to your o= wn bias. I get it, you wrote the code, you enjoyed the previously mentioned= reddit upvotes for it, I understand you don=E2=80=99t want to admit that y= our code has flaws. But you need to understand that your way of seeing thin= gs is subjective and not universal. The bug is that when the user scrolls up or down, past a point where the wi= dth of the line numbers changes from e.g. 99 to the number width from 2 to = 3 thus making the width of line number display change from 4 to 5, display-= line-numbers-mode necessarily changes the window display configuration to a= ccommodate this character. However, display-line-numbers-mode doesn=E2=80=99t appear to tell the rest = of Emacs about this change, so even if we all wanted to accommodate your di= splay changes, as far as I can tell, we cannot. It=E2=80=99s nice that you added the token function line-number-display-wid= th, but aside from the bug with its return value being off by 2 (#29597), t= his function is not useful unless other lisp programs know *when* to call i= t. The easiest solution, the one that baffles me why you haven=E2=80=99t just = included already rather than continue to argue with me, is that when displa= y-line-numbers-mode changes the window, you run window-configuration-change= -hook. If, for some Eli-reason, you don=E2=80=99t want to run window-configuration= -change-hook, you can add a simple hook, which gets run whenever display-li= ne-numbers-mode needs to change the window configuration. Then other lisp p= rograms can call line-number-display-width, and provided its bug gets fixed= and it returns the correct width, everyone is happy. Is there anything about this that=E2=80=99s not clear to you?