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: Tue, 17 Oct 2017 14:19:14 +1000 Message-ID: <1508213954.647567.1141167720.1CC00459@webmail.messagingengine.com> References: <1508054203.3504379.1139170720.0D0E99E9@webmail.messagingengine.com> <59E32D49.4030007@gmx.at> <1508065717.3534312.1139251176.600E646A@webmail.messagingengine.com> <59E350AE.3060005@gmx.at> <1508074073.3557079.1139314312.4BFE5BC2@webmail.messagingengine.com> <83o9p8h2yv.fsf@gnu.org> <1508124120.3709085.1139805520.1F653A1C@webmail.messagingengine.com> <87efq37knc.fsf@gmail.com> <1508130850.3734431.1139876192.21CE8281@webmail.messagingengine.com> <83zi8rf8rx.fsf@gnu.org> <1508200557.2705080.1141019864.6A2B8BD5@webmail.messagingengine.com> <83bml6fqbv.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 1508214020 29414 195.159.176.226 (17 Oct 2017 04:20:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 17 Oct 2017 04:20:20 +0000 (UTC) Cc: 28844@debbugs.gnu.org, agrambot@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 17 06:20:16 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 1e4JMK-0005wg-KO for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Oct 2017 06:20:04 +0200 Original-Received: from localhost ([::1]:36332 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4JMS-0007nR-3l for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Oct 2017 00:20:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4JMM-0007nL-IB for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 00:20:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4JMI-0005Zh-11 for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 00:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35916) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4JMH-0005ZN-Ty for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 00:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e4JMH-0003B7-LA for bug-gnu-emacs@gnu.org; Tue, 17 Oct 2017 00:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Rankin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2017 04:20:01 +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.150821395812164 (code B ref 28844); Tue, 17 Oct 2017 04:20:01 +0000 Original-Received: (at 28844) by debbugs.gnu.org; 17 Oct 2017 04:19:18 +0000 Original-Received: from localhost ([127.0.0.1]:44597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4JLa-0003A7-2X for submit@debbugs.gnu.org; Tue, 17 Oct 2017 00:19:18 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:37155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4JLY-00039y-LP for 28844@debbugs.gnu.org; Tue, 17 Oct 2017 00:19:16 -0400 Original-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B04A420BBE; Tue, 17 Oct 2017 00:19:14 -0400 (EDT) Original-Received: from web1 ([10.202.2.211]) by compute3.internal (MEProxy); Tue, 17 Oct 2017 00:19:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paulwrankin.com; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=CmgscqKkv+4bH3zwR WloW+GBBHeJBY7AIuJq3V9ezdo=; b=FZ9syuVSCmf/VO8KPESdmEUyOun9LT/kH hYqv8lpFCaQvWHb3dYLPTjqD30Yi9Fq3aqsNIr4dgLNimQFQgmn9hRr3V1e4C0NB x1MXBXpoL3YOa0DUGQUBqZRUFJnBDTAeeFqnuFUvdts2aCjgVB6RjxZoHxmFCsSz EdpCXONtz0zz8Gnh4t7nT5BRxWKzQtBugItepbkenr1N4Gg0MHMYC+D5aY60fx6U mKS1cuYZapZHQOvY0zihWN0IEPVUhgnwa5GyxB29tEFKbDxL3mGLNIEXhSyd1nXb HqSTlZZvBczm9Cop2SEJ+YLiJ0cZ+XyaZnnK9IEHn1WunU/mYp3lQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=Cmgscq Kkv+4bH3zwRWloW+GBBHeJBY7AIuJq3V9ezdo=; b=lsNnk+t7uc+1kZaeDausvg vaeP52YKReaX59yEpodk6+kCO3kPKasYYNSQmtOkMzG7ftkK46fWE6cHTKydTez0 fhphaOTiAbRiGPHbKSeJMqwGMJyBm6Xu0i+8mu6MHBh084C7nomSpC9QVLLaDMq6 37r5DNhW885hSyuEdMEbkTd1/BfmCF7l3nuqpAAZggerhUxr5QrRFWIG0O6RUDSm hM2BbZDz09u3BlB0CwVXC/bsKsIdzdeK12Cn/AaUAriTJ5no9zVpKMmtpcg3SoBs jNzYmgax5wMGJj9Ojtf5cdOIU+PwptnbYa5mu1e0TcIA3huzBIah34JIm7AMzgYA == X-ME-Sender: Original-Received: by mailuser.nyi.internal (Postfix, from userid 99) id 8489A95784; Tue, 17 Oct 2017 00:19:14 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface - ajax-26fdae60 In-Reply-To: <83bml6fqbv.fsf@gnu.org> 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:138576 Archived-At: On Tue, 17 Oct 2017, at 12:41 PM, Eli Zaretskii wrote: > > Your mode updates the display on its own without notifying Emacs. The b= asic conceptual problem is that =E2=80=9Cevery time you need the value=E2= =80=9D is predicated on when display-line-numbers-mode changes the value. T= here=E2=80=99s no way for another lisp program to know when that is. >=20 > But if you always call line-number-display-width, you don't need to > know that, because that function will return the current value (which > will change to reflect the changes in the space taken by line > numbers). >=20 > So I don't think I understand the problem, and without that I cannot > think of a solution. Can you clarify the problem, please? Eli, you=E2=80=99re fundamentally misunderstanding something: 1. Your mode updates the display. 2. Another lisp program does not know your mode has updated the display. 3. Therefore, the lisp program will not know to call line-number-display-wi= dth. Your suggestion that other modes should =E2=80=9Calways=E2=80=9D call line-= number-display-width is what... to run an infinite loop waiting for your m= ode to furtively update the display and catch it then?