From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#34513: display-line-numbers in term mode Date: Wed, 23 Oct 2019 01:06:05 +0200 Message-ID: <20191022230605.ihyzn45vloz6nkt6@Ergus> References: <8736fkaish.fsf@aol.com> <83v9sgznvc.fsf@gnu.org> Reply-To: Ergus Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="45944"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: 34513@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 23 01:07:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iN3FK-000Bos-MH for geb-bug-gnu-emacs@m.gmane.org; Wed, 23 Oct 2019 01:07:22 +0200 Original-Received: from localhost ([::1]:48538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iN3FI-00079R-Gk for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Oct 2019 19:07:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60879) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iN3F1-000793-EX for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 19:07:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iN3F0-00027f-99 for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 19:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51786) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iN3F0-00027T-5l for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 19:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iN3Ez-0002e9-VO for bug-gnu-emacs@gnu.org; Tue, 22 Oct 2019 19:07:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Oct 2019 23:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34513 X-GNU-PR-Package: emacs Original-Received: via spool by 34513-submit@debbugs.gnu.org id=B34513.157178559110133 (code B ref 34513); Tue, 22 Oct 2019 23:07:01 +0000 Original-Received: (at 34513) by debbugs.gnu.org; 22 Oct 2019 23:06:31 +0000 Original-Received: from localhost ([127.0.0.1]:60607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iN3EV-0002dN-Bn for submit@debbugs.gnu.org; Tue, 22 Oct 2019 19:06:31 -0400 Original-Received: from sonic303-21.consmr.mail.ir2.yahoo.com ([77.238.178.202]:34413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iN3ES-0002d7-Na for 34513@debbugs.gnu.org; Tue, 22 Oct 2019 19:06:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1571785582; bh=q+DvAClcuU4xyKqiHxE+xqby4tLgFG6pEdvGaoCkBXI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=HqZsuRrfCr7J82zxO0Ap0cp7DJliL1isbreKZumsP4iqPcDwQzOYbO+5pEUXPzYA8xuECiXqoVO4G04lOQilqNLHBiFuSXs/TkQ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zUe9iTFlg1CCAd9wjXaBzAe93tqeuLv4ywHoL7d Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ir2.yahoo.com with HTTP; Tue, 22 Oct 2019 23:06:22 +0000 Original-Received: by smtp405.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 44ae5f936055423944555a173303d3e5; Tue, 22 Oct 2019 23:06:18 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83v9sgznvc.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: 209.51.188.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:170015 Archived-At: On Tue, Oct 22, 2019 at 08:33:27PM +0300, Eli Zaretskii wrote: >> From: Ergus >> Cc: 34513@debbugs.gnu.org, monnier@iro.umontreal.ca >> Date: Thu 01 Jan 1970 01:00:00 AM CET >> > Window width changes are unrelated to line numbers, right? >> > >> > Is window-size-change-functions what you want? >> >> Yes they are unrelated, but the issue is the same... > >No, the issue is not the same. When a window is resized, it is >completely redrawn, and as part of that the line numbers are >recalculated and redisplayed. That's because line-number display is >an inherent part of redisplay. > Hi: I don't have too much time to be looking into this. But actually one of the issues I had with the Stefan's solution is that sometimes I get: Error adjusting window size: (wrong-type-argument wholenump 78.0) Actually very often. On the other hand, I am not sure that the fix will be needed in lisp/window.el as it may affect many other things around. Maybe we need the change in term.el itself as it seems to be the only one with the issue. Otherwise the fix you made for tabulated-list.el will be needed as a function in some other place we can access from term-mode. Could you please give a look into it? >> Actually on a windows resize the term-line width is not updated >> either. So the new outputs after that assume the same window width. The >> line-number-width is just another side of the same problem where the >> line-width is not recalculated.. >> >> On window increase size the issue is not so annoying (it is not right, >> but it works) but on window decrease size (or line-number-width >> increase) it is worth because the lines adds a \ and break. >> >> So a right fix maybe should recalculate the line-width more dynamically >> (for example when inserting RET in term mode) > >So is window-size-change-functions what you need to use to hook into >the size changes? Yes I suppose it is. But I have not clear how to use it :(. Again, Could you please give a look into it? Please.