GNU bug report logs - #34513
display-line-numbers in term mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Ergus <spacibba@HIDDEN>; dated Sun, 17 Feb 2019 14:21:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 23 Oct 2019 16:50:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 23 12:50:34 2019
Received: from localhost ([127.0.0.1]:34920 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iNJqE-0004h2-5Z
	for submit <at> debbugs.gnu.org; Wed, 23 Oct 2019 12:50:34 -0400
Received: from sonic313-20.consmr.mail.ir2.yahoo.com ([77.238.179.187]:39509)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1iNJqC-0004go-7L
 for 34513 <at> debbugs.gnu.org; Wed, 23 Oct 2019 12:50:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1571849426; bh=zseSmRt3koKXLleLVwDcfGvUoMCkJDk74pdrzIFcRM4=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject;
 b=eqUb0zk0TriJ70MfgDgtXebZdhMDsUmvOC2cQrzyJ8+wZ+6kT/arAFacNFMxeR4+qqpRq4u8yCpNv2o1LUABorLQpcezW8qNX5hj6jJeSmaPOEnLjO7KZJ9fu6iweCTYYKbUoFApMpvPwbLarwb11iklPnOSegEsDKEu40aXms+uxcmrodCXC/1oeWYCo24wKRypQSMBOE9EXglXhM2mH5ZJShxMWWSFXs6ABYL5tqcqsGXpwSa934vf1yHDnHSY/cE1JMD+XOzYpd5Fi2OunF7L5+4rGcd8arsXbVXv9GfjoQ5tmGi9DXdGYBLId4POYbEtJpd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G5wVSaLYvmmIOAImwcGaR.HO
 9GUXYC8miccf85zldqjVPjI60vAkidIFXiRHj6qF3k_9rx42IcIE.szzfs5PtAQwwa3dzCwMBmqQ
 hHSmNfJT24tg5cehfHdVteEYXv_0Lv1pXJeIwN2V3gLl8YriCO5UeKKti7fZxvWt7XFHLWGK.juJ
 mD3wV1w2gk7qPL18cHuADFfRcN35SxUq9A77zw5elYn.AQ.mkFYbbQY9gOOIJ8doQ.KvWbAnGUJC
 PvUjB3DzCf_Blz5crpSSjCYdaggP.O_BvuUuCjdWB5z2vbxEIuN7BvKI8QHk5w8C4gSpY3tz1KBY
 JDYfuCA--
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic313.consmr.mail.ir2.yahoo.com with HTTP; Wed, 23 Oct 2019 16:50:26 +0000
Received: by smtp418.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID 17e6da33265e493a2346e5af5dde10de; 
 Wed, 23 Oct 2019 16:50:23 +0000 (UTC)
Date: Wed, 23 Oct 2019 18:50:05 +0200
From: Ergus <spacibba@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34513: display-line-numbers in term mode
Message-ID: <20191023165005.egxstqw3uow3uspp@Ergus>
References: <8736fkaish.fsf@HIDDEN> <83v9sgznvc.fsf@HIDDEN>
 <20191022230605.ihyzn45vloz6nkt6@Ergus> <83blu7zb3j.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <83blu7zb3j.fsf@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Wed, Oct 23, 2019 at 07:21:36PM +0300, Eli Zaretskii wrote:
>> Date: Wed, 23 Oct 2019 01:06:05 +0200
>> From: Ergus <spacibba@HIDDEN>
>> Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
>>
>> Again,
>> Could you please give a look into it?
>
>Look at what? at fixing term.el myself in this case?  Or something
>else?

At least if the fix should be in term.el or in window.el like the one
proposed by Stefan.

The lisp side is too high level, and I don't want to waste time
reinventing the wheel.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 23 Oct 2019 16:22:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 23 12:22:03 2019
Received: from localhost ([127.0.0.1]:34880 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iNJOd-0003wu-Ku
	for submit <at> debbugs.gnu.org; Wed, 23 Oct 2019 12:22:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39200)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iNJOb-0003wR-TP
 for 34513 <at> debbugs.gnu.org; Wed, 23 Oct 2019 12:22:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55749)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iNJOW-0002sZ-PX; Wed, 23 Oct 2019 12:21:56 -0400
Received: from [176.228.60.248] (port=4653 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iNJOT-00080e-55; Wed, 23 Oct 2019 12:21:55 -0400
Date: Wed, 23 Oct 2019 19:21:36 +0300
Message-Id: <83blu7zb3j.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>
In-reply-to: <20191022230605.ihyzn45vloz6nkt6@Ergus> (message from Ergus on
 Wed, 23 Oct 2019 01:06:05 +0200)
Subject: Re: bug#34513: display-line-numbers in term mode
References: <8736fkaish.fsf@HIDDEN>
 <83v9sgznvc.fsf@HIDDEN> <20191022230605.ihyzn45vloz6nkt6@Ergus>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 23 Oct 2019 01:06:05 +0200
> From: Ergus <spacibba@HIDDEN>
> Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
> 
> Again,
> Could you please give a look into it?

Look at what? at fixing term.el myself in this case?  Or something
else?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 22 Oct 2019 23:06:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 19:06:31 2019
Received: from localhost ([127.0.0.1]:60607 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iN3EV-0002dN-Bn
	for submit <at> debbugs.gnu.org; Tue, 22 Oct 2019 19:06:31 -0400
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 <spacibba@HIDDEN>) id 1iN3ES-0002d7-Na
 for 34513 <at> 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/TkQBEFEjAYGKIsnaYFsEwC6/TJBf/O1N0WtXe9jg32OPK3YDgJ27cBBxuGGYfJ6kzagF12hu0WKg5TbH+y/LxIX7hDlLTSKI8aILjsIfQHUr9mTmk5Pwh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L_HJFjxrjuQ8ewukXHVGcvT7VpM9XGG1ikP_VDxBrthWg9r2QpS8
 0AF9VtMEfDO4u_BRl4Ta2mdVL6HlzhrF1_DRXR7xh.wjr2tRdp9VBq7KFb_kTQz3gpW82HRyCeyh
 bnZVeVwlulLRu9u25IPn1yPipWtgHqZVMMFYJ2pqqITfhBvhH3TM3pu79D0.OZSqTwGbNj6x.Oic
 b4133beNMtiGKdvclbMHBGKdlPgM5vblxhCDtUnnlJpIcBjOMUNxqTlffhSFUd4.7nzG07txLcSv
 tnOscMFMTIbvjwOI3iprvDtfyAAX5pELcetnDIyPKrnk1K8P8kqNQ6nnmgYMZI8Lc5Gl9pV11c1_
 csaGB3S_v2ahoXPP398814AD9O7XaB4pXQ16Xd59JMQuQgjPZ.Hp0vIyhRDgJgBwZrT5mlOtss9Z
 _7lcss6c3Zpk-
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
Received: by smtp405.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID 44ae5f936055423944555a173303d3e5; 
 Tue, 22 Oct 2019 23:06:18 +0000 (UTC)
Date: Wed, 23 Oct 2019 01:06:05 +0200
From: Ergus <spacibba@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34513: display-line-numbers in term mode
Message-ID: <20191022230605.ihyzn45vloz6nkt6@Ergus>
References: <8736fkaish.fsf@HIDDEN>
 <83v9sgznvc.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <83v9sgznvc.fsf@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Oct 22, 2019 at 08:33:27PM +0300, Eli Zaretskii wrote:
>> From: Ergus <spacibba@HIDDEN>
>> Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
>> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 22 Oct 2019 17:33:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 13:33:38 2019
Received: from localhost ([127.0.0.1]:60425 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMy2M-000108-CD
	for submit <at> debbugs.gnu.org; Tue, 22 Oct 2019 13:33:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41382)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMy2L-0000zw-0z
 for 34513 <at> debbugs.gnu.org; Tue, 22 Oct 2019 13:33:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33754)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMy2F-0000Ah-8H; Tue, 22 Oct 2019 13:33:31 -0400
Received: from [176.228.60.248] (port=1171 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iMy2E-0007zs-K2; Tue, 22 Oct 2019 13:33:31 -0400
Date: Tue, 22 Oct 2019 20:33:27 +0300
Message-Id: <83v9sgznvc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>
In-reply-to: <8736fkaish.fsf@HIDDEN> (message from Ergus on Thu 01 Jan 1970
 01:00:00 AM CET)
Subject: Re: bug#34513: display-line-numbers in term mode
References: <8736fkaish.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ergus <spacibba@HIDDEN>
> Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
> 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.

> 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 22 Oct 2019 16:54:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 12:54:00 2019
Received: from localhost ([127.0.0.1]:60413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMxPz-0008Sb-NW
	for submit <at> debbugs.gnu.org; Tue, 22 Oct 2019 12:54:00 -0400
Received: from sonic313-20.consmr.mail.ir2.yahoo.com ([77.238.179.187]:45340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1iMxPx-0008SL-HD
 for 34513 <at> debbugs.gnu.org; Tue, 22 Oct 2019 12:53:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1571763231; bh=tWazx1lb1qObFUkJB8zMI6irf/vs+KPwbHyfdWo+P30=;
 h=From:To:Cc:Subject:Date:From:Subject;
 b=bIpxKIa79YY6kjj6oESaEAhzJmhlGcIFb3xsYG+uzRMAls0r7RCfyGzqLoKZpcfdLEVwJ/hng1+B4n4k2/gJ2efB7tZ1ILdaHmTtWz1Cz221qQj4HjuPFQE6lQwL4YXU+wFyqdJ+df5xSoVEjaJn+Kt1nzrCneoqVS3Cv61GupqLNY95+thw+4q67r1AXVPWz+3a6V8vLUUeMTUZnOUfIaS3Cn97IBa1K31aRKCrVmEMXrCk7jvhTb9+fHKa54mLg0RBgJrkZwJBLyVZQ4sxY2oLmVi8xHmqE2pg+UYOXiaAGFqItV1kmV+KS120Z8k2VoNvoqzltxyX5pRLnF47aA==
X-YMail-OSG: Gd632DAVM1mCcC98iJ2XJ7JkBkUYsWnpRQBiZVrENjv.WwXZ.RU0YUSKyncPh1c
 VxCrqzFRbefQ4xP6_auBf3pH8SsR5iA1K5u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lr1fOE2nGcZTConpCTBphDAVdGZA9zzuky2ZMtco0nVkbY6NpC0oXBEe8IvJrg7h_reqmztxWA9y
 Sz4N8GuVQnLn2IAeHrduM3n9QeMLD5UOgGbIKZGobc1C3eCtay.u1k0LUPFGhKK6nR.rtmPeLA.v
 9izNr475OMyZSdzz9Qirqbf1GfbsvfhZ5bTJ9ULV.RAa9ST.aVc74TE_fjhhp1.iygW9P0UwMvgt
 D55iA1YNb
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic313.consmr.mail.ir2.yahoo.com with HTTP; Tue, 22 Oct 2019 16:53:51 +0000
Received: by smtp420.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID f144fb2fe5664c121caf57b0131fcdac; 
 Tue, 22 Oct 2019 16:53:48 +0000 (UTC)
User-agent: mu4e 1.2.0; emacs 27.0.50
From: Ergus <spacibba@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34513: display-line-numbers in term mode
Date: Thu 01 Jan 1970 01:00:00 AM CET
Message-ID: <8736fkaish.fsf@HIDDEN>
Flags: draft, seen
Maildir: /AOL/Drafts
X-Spam-Score: 2.5 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  --text follows this line--: --text follows this line-- Hi
 Eli: MIME-Version: 1.0 Content-Type: text/plain Eli Zaretskii writes: >> Date:
 Mon, 21 Oct 2019 23:44:11 +0200 >> From: Ergus >> Cc: 34513 <at> debbugs.gnu.org,
 monnier@HIDDEN >> >> >You can see the various solutions in
 tabulated-list.el. I wrote them >> >because [...] 
 Content analysis details:   (2.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
 blocked.  See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information. [URIs: umontreal.ca]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
 no trust [77.238.179.187 listed in list.dnswl.org]
 0.4 INVALID_DATE           Invalid Date: header (not RFC 2822)
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [77.238.179.187 listed in wl.mailspike.net]
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (spacibba[at]aol.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
 date
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  --text follows this line--: --text follows this line-- Hi
   Eli: MIME-Version: 1.0 Content-Type: text/plain Eli Zaretskii writes: >> Date:
    Mon, 21 Oct 2019 23:44:11 +0200 >> From: Ergus >> Cc: 34513 <at> debbugs.gnu.org,
    monnier@HIDDEN >> >> >You can see the various solutions in tabulated-list.el.
    I wrote them >> >because [...] 
 
 Content analysis details:   (1.5 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was
                             blocked.  See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: gnu.org]
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/,
                              no trust
                             [77.238.179.187 listed in list.dnswl.org]
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
                             [77.238.179.187 listed in wl.mailspike.net]
  0.4 INVALID_DATE           Invalid Date: header (not RFC 2822)
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
                             provider (spacibba[at]aol.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
  2.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received:
                             date
 -1.0 MAILING_LIST_MULTI     Multiple indicators imply a widely-seen list
                             manager

--text follows this line--: --text follows this line--
Hi Eli: 
MIME-Version: 1.0
Content-Type: text/plain

Eli Zaretskii <eliz@HIDDEN> writes:

>> Date: Mon, 21 Oct 2019 23:44:11 +0200
>> From: Ergus <spacibba@HIDDEN>
>> Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
>>
>> >You can see the various solutions in tabulated-list.el.  I wrote them
>> >because features like package.el need to react to the changing width
>> >of the line numbers.
>> >
>> >In addition to the change in the line numbers display width due to
>> >scrolling, there are changes due to resizing the default font.
>> >
>> Hi Eli:
>>
>> I see that, but what about when the window width changes? Are there any
>> hook we ca use?
>
> 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... when and how to
trigger a line-width update/recalculation.

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)

Does it makes sense?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 22 Oct 2019 15:11:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Oct 22 11:11:47 2019
Received: from localhost ([127.0.0.1]:60319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMvp4-0005xF-W5
	for submit <at> debbugs.gnu.org; Tue, 22 Oct 2019 11:11:47 -0400
Received: from eggs.gnu.org ([209.51.188.92]:45424)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMvp2-0005x2-V4
 for 34513 <at> debbugs.gnu.org; Tue, 22 Oct 2019 11:11:45 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58500)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMvox-00035O-5z; Tue, 22 Oct 2019 11:11:39 -0400
Received: from [176.228.60.248] (port=4343 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iMvou-0006GC-VX; Tue, 22 Oct 2019 11:11:37 -0400
Date: Tue, 22 Oct 2019 18:11:34 +0300
Message-Id: <835zkg24t5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>
In-reply-to: <20191021214411.mxmsoptcdppamhlf@Ergus> (message from Ergus on
 Mon, 21 Oct 2019 23:44:11 +0200)
Subject: Re: bug#34513: display-line-numbers in term mode
References: <20191020225446.xv2abiyah3dw7q4y@Ergus>
 <838spe4mm4.fsf@HIDDEN> <20191021214411.mxmsoptcdppamhlf@Ergus>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 21 Oct 2019 23:44:11 +0200
> From: Ergus <spacibba@HIDDEN>
> Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
> 
> >You can see the various solutions in tabulated-list.el.  I wrote them
> >because features like package.el need to react to the changing width
> >of the line numbers.
> >
> >In addition to the change in the line numbers display width due to
> >scrolling, there are changes due to resizing the default font.
> >
> Hi Eli:
> 
> I see that, but what about when the window width changes? Are there any
> hook we ca use?

Window width changes are unrelated to line numbers, right?

Is window-size-change-functions what you want?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 21 Oct 2019 21:44:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 17:44:35 2019
Received: from localhost ([127.0.0.1]:58028 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMfTe-0006H4-P6
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 17:44:35 -0400
Received: from sonic302-21.consmr.mail.ir2.yahoo.com ([87.248.110.84]:36558)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1iMfTb-0006Gp-JT
 for 34513 <at> debbugs.gnu.org; Mon, 21 Oct 2019 17:44:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1571694265; bh=Ju3534FR9AOKdHMEoTdNsghwcv9kCksucBE5uzQ+2SY=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject;
 b=n/DWQRQU3puggxKUO3lIaSe4+UYzhRpyw3goiPESmXthIzVx4DCC6Pg2IgaWXUCYbotdYHc/xieShVtBCCYaIpo19iIBB2/AkqO033G37LQI410gkzq6Ec9rDgiVJQutaihUkawfaG4hMDf5I50XZ1jwoyIo/Zf4yKviulerShZx4pMOkTpif2nlzjplO/BpX0sxD7ZRFjoytCQUnFDU2vTg6QPJW8ONXHLPkE0e7hHZv7krT/xU+cgsdBB9SKwRvcrtqPwXVKfl1/abtbPwWcgYiyRQVyWGKeAWu46nn30GcUDaOZa35y//Cybo7OXESuv8FA+43ZVAWvyMJ0X5cg==
X-YMail-OSG: o1IrTZQVM1ksHeoivQroS2QVHk2dn1VS6nemYWf.g0T8NN2fw2ojMYnn7rkdVEx
 ocA9hZnRQJsGRua1V7Fmc9BqvmgkQU0JWfJ526lktxN8zj.nl4lh3SMtWjjQnogQXZd8jQQ9HB1p
 4EBnexura05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V3R.
 2gSFYN0jUK2Ryos0HDLwW0_Pi11zmDnXpsIe5gc2Y6FIWf9ClPnloNPxKSSsmV4ZuVE6rv.bE2D6
 H2GONkquIIm0ZTuGCpECYt5XEl5XXa4QlJVt75QbVKC.wdTto.P1qXqRCTChh7R7Rc1fFkrsdoYO
 M76F4iJXjV4DkKN4w
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic302.consmr.mail.ir2.yahoo.com with HTTP; Mon, 21 Oct 2019 21:44:25 +0000
Received: by smtp420.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID 3e7708e5e20a36a398379f478236de73; 
 Mon, 21 Oct 2019 21:44:25 +0000 (UTC)
Date: Mon, 21 Oct 2019 23:44:11 +0200
From: Ergus <spacibba@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34513: display-line-numbers in term mode
Message-ID: <20191021214411.mxmsoptcdppamhlf@Ergus>
References: <20191020225446.xv2abiyah3dw7q4y@Ergus>
 <838spe4mm4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
In-Reply-To: <838spe4mm4.fsf@HIDDEN>
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Mon, Oct 21, 2019 at 09:51:47AM +0300, Eli Zaretskii wrote:
>> Date: Mon, 21 Oct 2019 00:54:46 +0200
>> From: Ergus <spacibba@HIDDEN>
>> Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
>>
>> I have tried the quick solution Stefan proposed to this but there are
>> still limitations when the number column width change and some
>> others when resizing the window. Does anyone has a way to improve
>> this?
>
>You can see the various solutions in tabulated-list.el.  I wrote them
>because features like package.el need to react to the changing width
>of the line numbers.
>
>In addition to the change in the line numbers display width due to
>scrolling, there are changes due to resizing the default font.
>
Hi Eli:

I see that, but what about when the window width changes? Are there any
hook we ca use?

>> On the other hand I wanted to ask if new changes like dfci must be
>> disabled in term-mode by default or we let that configuration to the
>> user?
>
>This is a different issue, unrelated to this bug report.  Let's
>discuss it separately, probably on emacs-devel.
>
>Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 21 Oct 2019 06:52:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 21 02:52:05 2019
Received: from localhost ([127.0.0.1]:55640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMRXx-0004h8-JM
	for submit <at> debbugs.gnu.org; Mon, 21 Oct 2019 02:52:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35320)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iMRXv-0004ga-Vn
 for 34513 <at> debbugs.gnu.org; Mon, 21 Oct 2019 02:52:04 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60633)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iMRXq-0004OJ-GV; Mon, 21 Oct 2019 02:51:58 -0400
Received: from [176.228.60.248] (port=4133 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iMRXn-0005KP-JP; Mon, 21 Oct 2019 02:51:57 -0400
Date: Mon, 21 Oct 2019 09:51:47 +0300
Message-Id: <838spe4mm4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>
In-reply-to: <20191020225446.xv2abiyah3dw7q4y@Ergus> (message from Ergus on
 Mon, 21 Oct 2019 00:54:46 +0200)
Subject: Re: bug#34513: display-line-numbers in term mode
References: <20191020225446.xv2abiyah3dw7q4y@Ergus>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Mon, 21 Oct 2019 00:54:46 +0200
> From: Ergus <spacibba@HIDDEN>
> Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
> 
> I have tried the quick solution Stefan proposed to this but there are
> still limitations when the number column width change and some
> others when resizing the window. Does anyone has a way to improve
> this?

You can see the various solutions in tabulated-list.el.  I wrote them
because features like package.el need to react to the changing width
of the line numbers.

In addition to the change in the line numbers display width due to
scrolling, there are changes due to resizing the default font.

> On the other hand I wanted to ask if new changes like dfci must be
> disabled in term-mode by default or we let that configuration to the
> user?

This is a different issue, unrelated to this bug report.  Let's
discuss it separately, probably on emacs-devel.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 20 Oct 2019 22:55:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 20 18:55:11 2019
Received: from localhost ([127.0.0.1]:55450 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iMK6R-0005Zw-A4
	for submit <at> debbugs.gnu.org; Sun, 20 Oct 2019 18:55:11 -0400
Received: from sonic311-31.consmr.mail.ir2.yahoo.com ([77.238.176.163]:42482)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1iMK6P-0005Zg-Bh
 for 34513 <at> debbugs.gnu.org; Sun, 20 Oct 2019 18:55:10 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1571612102; bh=G9sXnKw+0LuahClXZBJ1immGRNmMNchf+FBoqO8Y4wc=;
 h=Date:From:To:Cc:Subject:From:Subject;
 b=DshquI+X04lZWIJ8zvuju+SNlzIXi0Joitx/k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K.i
 CCDgPe..bSEO7BgesRU4WxlJkfo53CoLfzhtUGzsDaHZy2FPYNUtNrSGor33lGZPDLXnQTiro2AS
 aFKkW6..hryAfTJoFnX05ERDMv22c3.lAsYSiXEXrc2S5KVUts9PMLpuUExegY18D57Wmg0zxIOy
 NGgYxwjOjLXpqVjpxuI9llQgi.TUtWyqZP1ZUNDyGS_IbSLvCFCvGi4x6EudhxZ_2Aj.w_QDyC1a
 97dLuXbGgRPdf08fuUjp0hl6OVRkg6lYEh8.m9WXH3Lpv676lfGF_nFd_rpo.dScTNqL97xj6X5G
 HrkQOLAT3xQEjKV8Bk02G3ZqnXMqs4Yr0fS0TrtJfU1AuYi96_9nTGrI80FUogdnGYmq6VOoyaI_
 FGEHVSY58DMSBJBzAGfNpYT.dnCTmmFv0_Vi90Qv5mnqmFC8_fglv1VQkVYJVWS31_hTVjWL_1ZP
 _c0FZsI5mA.cXZPhGP8wuxa760L__7V6SiAgp.pzcSd.oaCdogPUKKPLerSdjmeNLA3dv3CEpDZg
 WZwoxFDjhz4_In1.h7p.w_PWt18x6usR.nfe2Vi1P4EMmrUX.WYerjWjfUOsEps.etHUdiPLBSsl
 10QuzcSx3xyHv.rI-
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic311.consmr.mail.ir2.yahoo.com with HTTP; Sun, 20 Oct 2019 22:55:02 +0000
Received: by smtp411.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA
 ID 7aad4af339bf6423db82158287a318d8; 
 Sun, 20 Oct 2019 22:54:59 +0000 (UTC)
Date: Mon, 21 Oct 2019 00:54:46 +0200
From: Ergus <spacibba@HIDDEN>
To: 34513 <at> debbugs.gnu.org
Subject: Re: bug#34513: display-line-numbers in term mode
Message-ID: <20191020225446.xv2abiyah3dw7q4y@Ergus>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: NeoMutt/20180716
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi:

I have tried the quick solution Stefan proposed to this but there are
still limitations when the number column width change and some
others when resizing the window. Does anyone has a way to improve
this?

I think that this must be simple enough to fix quickly in order to not
pass this to emacs 27.

On the other hand I wanted to ask if new changes like dfci must be
disabled in term-mode by default or we let that configuration to the
user?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 19:04:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 14:04:19 2019
Received: from localhost ([127.0.0.1]:54351 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz4V9-0008Ck-5t
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 14:04:19 -0500
Received: from userp2120.oracle.com ([156.151.31.85]:56738)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1gz4V6-0008CN-ED
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 14:04:17 -0500
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1RIwf6E176391;
 Wed, 27 Feb 2019 19:04:08 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=GNtTcAXwL4LQQtHDtW80nzVUAr+vJRVUvfl9b7YsXGQ=;
 b=m86L+ecUZdtDtXiARR9TUTGG5nKpl+yrnKvIBwWBn/nd9xut6OJUQ7Uieg8wm876Cp4u
 0ntAwXgQU/LzV9CR/6LIAmavXH/+EMP4VXUNrBJHk0Wrjr3moBKBnxHJ7nx+qzjN8uR4
 wZjmPJQzfn4d9rdJkNJTGWT/mTWxEm1w5gpTA1v2K4asw15E0K7kjTrSqbZ6rhR/qqpn
 htHU2gCUZYxkeTbdy7CUjKAQQEKd8W5YeITfP58lnCzr+hImE/Sl8J+d1fVn8Qr/g8hV
 cFO/eKQbkGB7D9+nrPd1T41au6jEqC31qFUEfeMPAdXBMvpfS7dw8/RvqywJUIxb+auQ 7A== 
Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])
 by userp2120.oracle.com with ESMTP id 2qtxtrvpd4-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 27 Feb 2019 19:04:08 +0000
Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72])
 by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x1RJ43NX000949
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 27 Feb 2019 19:04:03 GMT
Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21])
 by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1RJ41OB021116;
 Wed, 27 Feb 2019 19:04:02 GMT
MIME-Version: 1.0
Message-ID: <6e9ab433-29e9-4165-ab0a-2536994228e0@default>
Date: Wed, 27 Feb 2019 11:04:01 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Drew Adams <drew.adams@HIDDEN>
Subject: RE: bug#34513: display-line-numbers in term mode
References: <<<20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN>>> <<<83h8cpkyi8.fsf@HIDDEN>
 <jwvimx5chq5.fsf-monnier+emacs@HIDDEN>>> <<<8336o9kvph.fsf@HIDDEN>
 <jwvva15b17z.fsf-monnier+emacs@HIDDEN>>> <<<831s3tkufj.fsf@HIDDEN>>>
 <<9f8f0712-1187-4ce3-bd2c-af44cf00927d@default>> <<83wolljdpe.fsf@HIDDEN>>
In-Reply-To: <<83wolljdpe.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4810.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9180
 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015
 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=870 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000
 definitions=main-1902270128
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> > What's unclear about, say, `line-number-width'?
>=20
> It's not unclear, it's wrong.

I didn't realize that this is a minor-mode global
function.

Emacs convention says that the names of global
symbols (such as this) should start with either
the mode name OR an abbreviation.

The mode name `display-line-numbers' (mode) is
long enough to deserve an abbreviation for use
as prefix.  Please consider coming up with one.

Maybe something like `linenum-' or `line-number-'.

In that case, this function could be called just
`linenum-width' or `linenum-number-width'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 18:20:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 13:20:26 2019
Received: from localhost ([127.0.0.1]:54325 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz3og-00071b-8Z
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 13:20:26 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51944)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gz3oe-00071K-Rp
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 13:20:25 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53371)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gz3oY-0006ex-0n; Wed, 27 Feb 2019 13:20:18 -0500
Received: from [176.228.60.248] (port=1188 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gz3oX-0007jj-1U; Wed, 27 Feb 2019 13:20:17 -0500
Date: Wed, 27 Feb 2019 20:20:13 +0200
Message-Id: <83wolljdpe.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Drew Adams <drew.adams@HIDDEN>
In-reply-to: <9f8f0712-1187-4ce3-bd2c-af44cf00927d@default> (message from Drew
 Adams on Wed, 27 Feb 2019 10:00:25 -0800 (PST))
Subject: Re: bug#34513: display-line-numbers in term mode
References: <<20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN>> <<83h8cpkyi8.fsf@HIDDEN>
 <jwvimx5chq5.fsf-monnier+emacs@HIDDEN>> <<8336o9kvph.fsf@HIDDEN>
 <jwvva15b17z.fsf-monnier+emacs@HIDDEN>> <<831s3tkufj.fsf@HIDDEN>>
 <9f8f0712-1187-4ce3-bd2c-af44cf00927d@default>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Date: Wed, 27 Feb 2019 10:00:25 -0800 (PST)
> From: Drew Adams <drew.adams@HIDDEN>
> Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN
> 
> What's unclear about, say, `line-number-width'?

It's not unclear, it's wrong.

And even if we disregard the fact that it's wrong, it still includes
"line-number", which is why "display-line-numbers-number-width" gives
me nausea.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 18:15:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 13:15:46 2019
Received: from localhost ([127.0.0.1]:54321 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz3k9-0006ur-RV
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 13:15:46 -0500
Received: from eggs.gnu.org ([209.51.188.92]:50925)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gz3k7-0006ud-VO
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 13:15:44 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53322)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gz3js-0003PQ-TX; Wed, 27 Feb 2019 13:15:30 -0500
Received: from [176.228.60.248] (port=4798 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gz3jh-0006SG-N5; Wed, 27 Feb 2019 13:15:24 -0500
Date: Wed, 27 Feb 2019 20:15:13 +0200
Message-Id: <83y361jdxq.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ergus <spacibba@HIDDEN>
In-reply-to: <20190227174656.ysbxuhz332gvhkpq@Ergus> (message from Ergus on
 Wed, 27 Feb 2019 18:46:56 +0100)
Subject: Re: bug#34513: Fwd: Re: bug#34513: display-line-numbers in term mode
References: <20190217141940.62v754v46qwfcs2i@Ergus>
 <20190227174656.ysbxuhz332gvhkpq@Ergus>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Date: Wed, 27 Feb 2019 18:46:56 +0100
> From: Ergus <spacibba@HIDDEN>
> 
> Yes I see the limitations, specially when the
> (line-number-display-width) changes due to user interaction. The problem
> is that for a real fix maybe it needs a hook like
> line-number-display-width-change (or equivalent) where to add actions, I
> suppose there are potentially other modes with same issue.

There's no such hook (and providing it would be very hard and largely
useless, as I explained in the past).  Modes which need such
adjustments can use window-scroll-functions and/or
pre-redisplay-functions.  You can see an example in tabulated-list.el.

> The simplest to do (in my opinion) is to make the numbers not available
> at all in term mode and avoid display-line-numbers to be enabled in term
> mode.

Based on prior experience, I very much doubt that this solution will
be accepted by the community.  It's better to allow turning on line
numbers in this mode as well.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 18:00:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 13:00:41 2019
Received: from localhost ([127.0.0.1]:54311 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz3VY-0006W8-BN
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 13:00:40 -0500
Received: from userp2120.oracle.com ([156.151.31.85]:45852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1gz3VW-0006Vv-HI
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 13:00:39 -0500
Received: from pps.filterd (userp2120.oracle.com [127.0.0.1])
 by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1RHxNHJ125735;
 Wed, 27 Feb 2019 18:00:30 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=mime-version :
 message-id : date : from : sender : to : cc : subject : references :
 in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02;
 bh=sl1uNlBL2ghexEg33HFEnyctpWnilPS9hEBg0o1DUpA=;
 b=3rgvYgOOSzdw2K/R1X4fEd9Km3QyWykNDHdDJIyrZB8XYuRHWOwO7ujeUalBhjjUkeAr
 7uIg9MJAIHuPWMMv3N1G3GykTxMygeOfW1DdXg0xlh3JoMHEUg7nM4av9JUdVpqRsLtI
 nJ2IRnjMvsuKxkpsi6eo3YpQqGpE3cd4aZqjnLotDZuCtRsKjaUd8z7ocPa6/bOJMlER
 cCzBkG98XPhju7EyN4+HIlCez9FS2sflD3TNB1UZt+LWAHED2NHDFXWhMLoghLFi131J
 nbH8hLWHY7WuZ+AlklENvQq2do69BshtXHsGTL5WX0iKv4sP+NsaVF2in+FMNzjO/y9O mA== 
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234])
 by userp2120.oracle.com with ESMTP id 2qtxtrvbpe-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 27 Feb 2019 18:00:29 +0000
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])
 by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1RI0S0U018245
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 27 Feb 2019 18:00:29 GMT
Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21])
 by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x1RI0RcD026594;
 Wed, 27 Feb 2019 18:00:28 GMT
MIME-Version: 1.0
Message-ID: <9f8f0712-1187-4ce3-bd2c-af44cf00927d@default>
Date: Wed, 27 Feb 2019 10:00:25 -0800 (PST)
From: Drew Adams <drew.adams@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Subject: RE: bug#34513: display-line-numbers in term mode
References: <<20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN>> <<83h8cpkyi8.fsf@HIDDEN>
 <jwvimx5chq5.fsf-monnier+emacs@HIDDEN>> <<8336o9kvph.fsf@HIDDEN>
 <jwvva15b17z.fsf-monnier+emacs@HIDDEN>> <<831s3tkufj.fsf@HIDDEN>>
In-Reply-To: <<831s3tkufj.fsf@HIDDEN>>
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1  (1003210) [OL
 16.0.4810.0 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9180
 signatures=668685
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0
 priorityscore=1501 malwarescore=0
 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011
 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000
 definitions=main-1902270123
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> My problem was, and is, that the name should include "display-width",
> since that's what the function provides.  And the problem, of course,
> is that "display-line-numbers-" already includes "display" and
> "line-number", so repeating any of that produces problematic names.

Not following this thread.  Feel free to ignore.

Why does the name need to include "display-width"?
What's unclear about, say, `line-number-width'?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 17:47:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 12:47:11 2019
Received: from localhost ([127.0.0.1]:54306 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz3IU-0006CL-Vc
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:47:11 -0500
Received: from sonic302-21.consmr.mail.ir2.yahoo.com ([87.248.110.84]:36493)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1gz3IS-0006C7-EB
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:47:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1551289622; bh=yfU2b3YUq9L6OpiYOPmAmgUz3TwYBhwD5HAj5kXROIU=;
 h=Date:From:To:Subject:From:Subject;
 b=EUemOXTsKdsCRksklwtosdKMZRpPtOnzMRsfSDLKg77CRvuCJINEMl55Mk630n4qYxQ3+hi7lg5aqzFzMbV/ISLebIqe5N43X0y7efg3TmiqUoGNXOuMaTy0hiHqBN/TZ6asaMe++95jiCfFlW3qfFf6M88jlBKCYKkreQSL1j8OjxLOjXVjsCdOjaNAk6FxfHA2pptN+6OUf0NW9DNDDKtimgRfHBMTxckpV+pF6jKn4KfqfatYP+MoZWiAdGfE2mP9ECQhe23DqWFcXLdI3Jnj8DQHk+WacEJQKBXUQYCLb3s2IxVNfQNI1amkx7FkkKJ+kayYjrM3Od6LNjFkZA==
X-YMail-OSG: d5L03SUVM1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becghrFQksXOm73S8w--
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic302.consmr.mail.ir2.yahoo.com with HTTP; Wed, 27 Feb 2019 17:47:02 +0000
Received: from 2.152.205.184.dyn.user.ono.com (EHLO Ergus) ([2.152.205.184])
 by smtp402.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID
 c7e69db5c44fa8a0d293855f7ec01184 for <34513 <at> debbugs.gnu.org>;
 Wed, 27 Feb 2019 17:47:00 +0000 (UTC)
Date: Wed, 27 Feb 2019 18:46:56 +0100
From: Ergus <spacibba@HIDDEN>
To: 34513 <at> debbugs.gnu.org
Subject: Fwd: Re: bug#34513: display-line-numbers in term mode
Message-ID: <20190227174656.ysbxuhz332gvhkpq@Ergus>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: NeoMutt/20180716
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 34513
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Yes I see the limitations, specially when the
(line-number-display-width) changes due to user interaction. The problem
is that for a real fix maybe it needs a hook like
line-number-display-width-change (or equivalent) where to add actions, I
suppose there are potentially other modes with same issue. But I think
this is a bit overkill because it will require a redraw and the previous
lines will be modified.

The simplest to do (in my opinion) is to make the numbers not available
at all in term mode and avoid display-line-numbers to be enabled in term
mode. It will keep both the display-line-numbers and term.el
implementations simpler. If a user really needs the numbers in the
future then we can consider other solutions. But it makes not too much
sense actually to have the line numbers in term mode.

My report was because I faced the existent issue by default and it
required an action in my config to avoid exposing it, not because
I wanted the numbers.

But again, you have much much more experience on this and a better
opinion about what should be there or not.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 17:33:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 12:33:39 2019
Received: from localhost ([127.0.0.1]:54292 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz35O-0005si-Uh
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:33:39 -0500
Received: from eggs.gnu.org ([209.51.188.92]:40086)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gz35L-0005sU-U1
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:33:36 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52814)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gz35A-0004GA-H8; Wed, 27 Feb 2019 12:33:29 -0500
Received: from [176.228.60.248] (port=2175 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gz356-0006kN-Og; Wed, 27 Feb 2019 12:33:23 -0500
Date: Wed, 27 Feb 2019 19:33:36 +0200
Message-Id: <831s3tkufj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvva15b17z.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 27 Feb 2019 12:21:26 -0500)
Subject: Re: bug#34513: display-line-numbers in term mode
References: <20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN> <83h8cpkyi8.fsf@HIDDEN>
 <jwvimx5chq5.fsf-monnier+emacs@HIDDEN> <8336o9kvph.fsf@HIDDEN>
 <jwvva15b17z.fsf-monnier+emacs@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: spacibba@HIDDEN, 34513 <at> debbugs.gnu.org
> Date: Wed, 27 Feb 2019 12:21:26 -0500
> 
> >> How 'bout display-line-numbers-width or display-line-numbers-current-width?
> > I think I considered those at the time, but found them not descriptive
> > enough.
> 
> And how 'bout now?

Same.

My problem was, and is, that the name should include "display-width",
since that's what the function provides.  And the problem, of course,
is that "display-line-numbers-" already includes "display" and
"line-number", so repeating any of that produces problematic names.

> At first, TAB completion gave me the impression that there was simply no
> way to know from Elisp the actual width, because the list of completions
> seemed long enough to have the appearance of exhaustiveness.

Maybe just mentioning the variable in the doc string of
display-line-numbers-mode would be "good enough".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 17:21:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 12:21:35 2019
Received: from localhost ([127.0.0.1]:54281 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz2tj-0005aH-I1
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:21:35 -0500
Received: from chene.dit.umontreal.ca ([132.204.246.20]:47481)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gz2tf-0005a7-L1
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:21:33 -0500
Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca
 [132.204.27.242])
 by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1RHLRsm006493;
 Wed, 27 Feb 2019 12:21:27 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
 id EE220AE0E9; Wed, 27 Feb 2019 12:21:26 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34513: display-line-numbers in term mode
Message-ID: <jwvva15b17z.fsf-monnier+emacs@HIDDEN>
References: <20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN> <83h8cpkyi8.fsf@HIDDEN>
 <jwvimx5chq5.fsf-monnier+emacs@HIDDEN> <8336o9kvph.fsf@HIDDEN>
Date: Wed, 27 Feb 2019 12:21:26 -0500
In-Reply-To: <8336o9kvph.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 27 Feb
 2019 19:06:02 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 2 Rules triggered
	EDT_SA_DN_PASS=0, RV6492=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6492> : inlines <7025> : streams
 <1814269> : uri <2803177>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> How 'bout display-line-numbers-width or display-line-numbers-current-width?
> I think I considered those at the time, but found them not descriptive
> enough.

And how 'bout now?

> And please remember that originally the code was entirely in C, so
> there was no "package name" to use as prefix.

Oh, of course.  But I think in the current context, it would be good to
bring that variable into the "display-line-numbers" prefix.

At first, TAB completion gave me the impression that there was simply no
way to know from Elisp the actual width, because the list of completions
seemed long enough to have the appearance of exhaustiveness.

>> >> -	   (ncols (/ window-width font-width)))
>> >> +	   (ncols (- (/ window-width font-width) (line-number-display-width))))
>> > I think you want (line-number-display-width 'columns), since this
>> > wants the canonical column units, right?
>> Could be, I don't know.  I don't know that all callers of
>> window-max-chars-per-line want that either.
> I hope someone does know.

So do I.  Martin maybe?


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 17:06:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 12:06:16 2019
Received: from localhost ([127.0.0.1]:54270 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz2et-0005Eq-J1
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:06:15 -0500
Received: from eggs.gnu.org ([209.51.188.92]:60999)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gz2es-0005Ec-BL
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 12:06:14 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52365)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gz2eW-0003Jc-BH; Wed, 27 Feb 2019 12:05:54 -0500
Received: from [176.228.60.248] (port=4445 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gz2eR-0002D2-FM; Wed, 27 Feb 2019 12:05:51 -0500
Date: Wed, 27 Feb 2019 19:06:02 +0200
Message-Id: <8336o9kvph.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvimx5chq5.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 27 Feb 2019 11:40:04 -0500)
Subject: Re: bug#34513: display-line-numbers in term mode
References: <20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN> <83h8cpkyi8.fsf@HIDDEN>
 <jwvimx5chq5.fsf-monnier+emacs@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: spacibba@HIDDEN, 34513 <at> debbugs.gnu.org
> Date: Wed, 27 Feb 2019 11:40:04 -0500
> 
> How 'bout display-line-numbers-width or display-line-numbers-current-width?

I think I considered those at the time, but found them not descriptive
enough.

And please remember that originally the code was entirely in C, so
there was no "package name" to use as prefix.  display-line-numbers.el
and display-line-numbers-mode were born much later.

> >> -	   (ncols (/ window-width font-width)))
> >> +	   (ncols (- (/ window-width font-width) (line-number-display-width))))
> > I think you want (line-number-display-width 'columns), since this
> > wants the canonical column units, right?
> 
> Could be, I don't know.  I don't know that all callers of
> window-max-chars-per-line want that either.

I hope someone does know.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 16:40:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 11:40:13 2019
Received: from localhost ([127.0.0.1]:54239 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz2Fh-0004YQ-4f
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 11:40:13 -0500
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:35843)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gz2Fe-0004YH-EX
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 11:40:11 -0500
Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca
 [132.204.27.242])
 by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1RGe4dl000632;
 Wed, 27 Feb 2019 11:40:04 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
 id 733E3AE0E9; Wed, 27 Feb 2019 11:40:04 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#34513: display-line-numbers in term mode
Message-ID: <jwvimx5chq5.fsf-monnier+emacs@HIDDEN>
References: <20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN> <83h8cpkyi8.fsf@HIDDEN>
Date: Wed, 27 Feb 2019 11:40:04 -0500
In-Reply-To: <83h8cpkyi8.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 27 Feb
 2019 18:05:35 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 2 Rules triggered
	EDT_SA_DN_PASS=0, RV6492=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6492> : inlines <7024> : streams
 <1814266> : uri <2803160>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> PS: Why is the function called `line-number-display-width` when
>> everything else seems to use the `display-line-number` prefix?
> Because display-line-numbers-line-number-display-width is a mouthful
> that I couldn't live with, and also repeats 3 words twice each.

That would be awful, indeed.

How 'bout display-line-numbers-width or display-line-numbers-current-width?

>> -	   (ncols (/ window-width font-width)))
>> +	   (ncols (- (/ window-width font-width) (line-number-display-width))))
> I think you want (line-number-display-width 'columns), since this
> wants the canonical column units, right?

Could be, I don't know.  I don't know that all callers of
window-max-chars-per-line want that either.


        Stefan




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 16:05:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 11:05:54 2019
Received: from localhost ([127.0.0.1]:54182 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz1iU-0001gF-0O
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 11:05:54 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47075)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1gz1iR-0001g2-Vb
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 11:05:52 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51549)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1gz1i6-00008t-Br; Wed, 27 Feb 2019 11:05:34 -0500
Received: from [176.228.60.248] (port=4451 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1gz1hv-0003LT-Er; Wed, 27 Feb 2019 11:05:26 -0500
Date: Wed, 27 Feb 2019 18:05:35 +0200
Message-Id: <83h8cpkyi8.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-reply-to: <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 27 Feb 2019 10:26:04 -0500)
Subject: Re: bug#34513: display-line-numbers in term mode
References: <20190217141940.62v754v46qwfcs2i@Ergus>
 <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org, spacibba@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Stefan Monnier <monnier@HIDDEN>
> Date: Wed, 27 Feb 2019 10:26:04 -0500
> Cc: 34513 <at> debbugs.gnu.org
> 
> PS: Why is the function called `line-number-display-width` when
> everything else seems to use the `display-line-number` prefix?  

Because display-line-numbers-line-number-display-width is a mouthful
that I couldn't live with, and also repeats 3 words twice each.

> -	   (ncols (/ window-width font-width)))
> +	   (ncols (- (/ window-width font-width) (line-number-display-width))))

I think you want (line-number-display-width 'columns), since this
wants the canonical column units, right?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at 34513 <at> debbugs.gnu.org:


Received: (at 34513) by debbugs.gnu.org; 27 Feb 2019 15:26:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 27 10:26:12 2019
Received: from localhost ([127.0.0.1]:54156 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gz162-0000jB-Q6
	for submit <at> debbugs.gnu.org; Wed, 27 Feb 2019 10:26:11 -0500
Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49393)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1gz15z-0000j2-Ve
 for 34513 <at> debbugs.gnu.org; Wed, 27 Feb 2019 10:26:09 -0500
Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca
 [132.204.27.242])
 by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id x1RFQ4lp015228;
 Wed, 27 Feb 2019 10:26:04 -0500
Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848)
 id 4AB41AE0E9; Wed, 27 Feb 2019 10:26:04 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Ergus <spacibba@HIDDEN>
Subject: Re: bug#34513: display-line-numbers in term mode
Message-ID: <jwvbm2xdzx5.fsf-monnier+emacs@HIDDEN>
References: <20190217141940.62v754v46qwfcs2i@Ergus>
Date: Wed, 27 Feb 2019 10:26:04 -0500
In-Reply-To: <20190217141940.62v754v46qwfcs2i@Ergus> (Ergus's message of "Sun, 
 17 Feb 2019 15:19:40 +0100")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 5
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 2 Rules triggered
	EDT_SA_DN_PASS=0, RV6492=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6492> : inlines <7024> : streams
 <1814261> : uri <2803127>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 34513
Cc: 34513 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> display-line-number-mode produces bad term buffers with extra breaks.
> When using global-display-line-numbers there are some issues in term
> mode because of the extra columns needed by the numbers.
>
> The lines are broken because "tput cols" and $COLUMNS report the total
> width of the window, but it does not take into account the 3/4 (or more)
> chars taken by the line number. So longer lines need to be broken to fit.

So it seems that some of the problems are due to the process not being
told the size of the really usable text area.  This is done normally via
window-adjust-process-window-size-function which in turns calls
window-adjust-process-window-size which then calls
window-max-chars-per-line but that function does not take
display-line-numbers-width into account.

So maybe a simple fix is the patch below, but I'm not sure it's always
the right thing to do (and the width won't be automatically updated when
the (line-number-display-width) changes).


        Stefan


PS: Why is the function called `line-number-display-width` when
everything else seems to use the `display-line-number` prefix?  
It makes it more difficult to find.


diff --git a/lisp/window.el b/lisp/window.el
index 07a0f713c4..906e9012fe 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2132,7 +2132,7 @@ window-max-chars-per-line
   (with-selected-window (window-normalize-window window t)
     (let* ((window-width (window-body-width window t))
 	   (font-width (window-font-width window face))
-	   (ncols (/ window-width font-width)))
+	   (ncols (- (/ window-width font-width) (line-number-display-width))))
       (if (and (display-graphic-p)
 	       overflow-newline-into-fringe
                (not




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 17 Feb 2019 14:20:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 17 09:20:07 2019
Received: from localhost ([127.0.0.1]:50838 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gvNId-0001Mi-EI
	for submit <at> debbugs.gnu.org; Sun, 17 Feb 2019 09:20:07 -0500
Received: from eggs.gnu.org ([209.51.188.92]:36739)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <spacibba@HIDDEN>) id 1gvNIY-0001M5-U3
 for submit <at> debbugs.gnu.org; Sun, 17 Feb 2019 09:20:05 -0500
Received: from lists.gnu.org ([209.51.188.17]:39310)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <spacibba@HIDDEN>) id 1gvNIS-00054l-IN
 for submit <at> debbugs.gnu.org; Sun, 17 Feb 2019 09:19:57 -0500
Received: from eggs.gnu.org ([209.51.188.92]:51116)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <spacibba@HIDDEN>) id 1gvNIR-0003pO-Nx
 for bug-gnu-emacs@HIDDEN; Sun, 17 Feb 2019 09:19:56 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <spacibba@HIDDEN>) id 1gvNIP-00053R-Fa
 for bug-gnu-emacs@HIDDEN; Sun, 17 Feb 2019 09:19:55 -0500
Received: from sonic314-19.consmr.mail.ir2.yahoo.com ([77.238.177.145]:38544)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <spacibba@HIDDEN>) id 1gvNIL-00051R-Jq
 for bug-gnu-emacs@HIDDEN; Sun, 17 Feb 2019 09:19:51 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048;
 t=1550413186; bh=CBaTQO3MjWCUoilI39BlrgEP6455+toRSQts6MZ+PcQ=;
 h=Date:From:To:Subject:From:Subject;
 b=VovIIk9OgdtzrqyejRq2kkpOvrGUabxR8U/TEgKZ74KjJKRcMqy1kZrKSNzemlKkaaQDyAScewWvY+s5Nsxk9JsWsqQZ3U4X57IEkm+PxQRLYtTrisuP+KW00sazDzrNpYg4VirqF4yk2I0E4RoF4vCdGevTA2DSD3+g+wsfKpiyOmXQ1pNatwSDsVaJKTvNBwRADDc9aRLjjiqhmnGI3AyJdBsINpg7CaIKbP3ZG59d2i7kTMUxj9z60ugsVGLBFVOIHpY5inKdwt2Xur4YxUnrLKrN52sRTRHwPcczYB2tbR+QZQLcyo5Ix64eK8cMfZwdFrGaQg9n2JuQB+3chw==
X-YMail-OSG: 7AA_3SsVM1m2rB5yrAxLRTAB1u9y2La7iyJ9CqT_4AQqU9Z430TFOoNicIcRll.
 jkeXTDRZxMVZC5tCSb8lD_Gzi7gDk1tzSXRscp9tQ9JzPzG91.jYM71MF0EzGILERMC.gxo0mCuH
 buq_U3Z4DNJ2ye9OMt7Vnt8a7Uxjc_AZCuu2Rjs7OsvLswojgOcNHpoYhgfzzk4CUF0ZRjIq2uKp
 oS.28JAul3Pkg3EAtXvPaGP4A3YbUJMulywnEft_OdwXBssSUUwWhx.qxcO7nXA48ytdDxIt1z1B
 R_is65QWa2bwOD1jRY0_IxTbVidtkujsYiRuE8eq44dSVoWgrHvQCfX.J6Jf600ITM1N_pV_31_s
 3_9EXbZ8xTVJCFtbmmPgatHahKGyjofY6.NiGCMYYE1fXABPgoNlgP1_89FI1Vc._wMelGa.UU0j
 EeI_9OdUP28iKLBXs6kh60hJs2KeLwwQoCTyIjxR9tXvHu_5_yLrx3K0UYgY0jAUVvRzCtbWEvRL
 gtAVuutUJtX1OIc53mLVUWjo8QRLbisv0YI8sNLUJUkg4ohYjpIbgyMhvGRmO0Vg2VTJbztxz3yv
 3C7W2JHzURr_TsNStSv9ScJHVWiUKsGxdQeH21Qr6u..BIrq2jwTlWLxyJIYDIEyJ.8lNDCezlZh
 P4enDFHZaf8MCpHsN9Q3bxy6jhxcHhu4pCApdVN1LeNmy2Z21mqd2C6Xu0w15hzOGqpSVDar7Mn9
 o0JAG4L4uioxGQx5drhulhApcOEG6IaD.A5o3miMzScTLADW7u7TtwgyVfgDFH1E.Pw0ku2MqNgu
 FgLJ1DZnhWDA1uPzT6f3xcDujKz9AxbpqAF7pSQrWq02nS7c9_6.vRwNMETIvwHunaXQelYsjCHI
 LZPtp6TNScuA32ISdAZIQHYqbjMczEefFk1HZ_sU_BPwEGHESU02p_cb.Bzq68vLIO_1VFP5n31b
 0dPNSyKM0_QcoMTNLbjjeFoa4eQ4yElQ._OgDZOAOU7pe8illq3iZZCfzhXyUv7IvkTcPv_bkBWi
 s7.LiJnJMSSz8cREHVgfM3w--
Received: from sonic.gate.mail.ne1.yahoo.com by
 sonic314.consmr.mail.ir2.yahoo.com with HTTP; Sun, 17 Feb 2019 14:19:46 +0000
Received: from 2.152.205.184.dyn.user.ono.com (EHLO Ergus) ([2.152.205.184])
 by smtp419.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID
 226744643baa417e851f03f3b49faedf for <bug-gnu-emacs@HIDDEN>;
 Sun, 17 Feb 2019 14:19:43 +0000 (UTC)
Date: Sun, 17 Feb 2019 15:19:40 +0100
From: Ergus <spacibba@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: display-line-numbers in term mode
Message-ID: <20190217141940.62v754v46qwfcs2i@Ergus>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Disposition: inline
User-Agent: NeoMutt/20180716
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-Received-From: 77.238.177.145
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

display-line-number-mode produces bad term buffers with extra breaks.

When using global-display-line-numbers there are some issues in term
mode because of the extra columns needed by the numbers.

The lines are broken because "tput cols" and $COLUMNS report the total
width of the window, but it does not take into account the 3/4 (or more)
chars taken by the line number. So longer lines need to be broken to fit.

The problem is worst when trying to use for example mocp or similar
curses bases applications. Or in zsh that uses an alternative to
readline to select with tabs.

A workaround is be to disable the numbers in term-mode with a hook (this
hides the problem). But a proper fix (maybe) could be to inform properly the
number of columns to the terminal process.

To reproduce this issue just:
1) open emacs, 
2) enable display-line-numbers-mode
3) M-x term. 

Any curses based program there should expose the issue easily.

I tried with emacs 26.1 and the master branch too.

Regards




Acknowledgement sent to Ergus <spacibba@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#34513; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.