[emacs-w3m:13929] [emacs-w3m/emacs-w3m] Doesn't work correctly with display-line-numbers-mode (Issue #117)

Kővágó Zoltán <[email protected]> Sat, 22 Apr 2023 13:48:29 -0700
Newsgroups gmane.emacs.w3m
Message-ID <emacs-w3m/emacs-w3m/issues/[email protected]>
----==_mimepart_6444481de5e6a_6d7ec97c177260
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

Emacs 26 introduced `display-line-numbers-mode` to replace `linum-mode`. Unfortunately `display-line-numbers-mode` doesn't correct the value of `window-width`, and emacs developers consider this a feature. See https://github.com/emacsorphanage/yascroll/issues/23 and https://groups.google.com/d/msg/gnu.emacs.bug/pxOxaocXa2s/Gg4Z8N0QAAAJ

Steps to reproduce:
1. Enable `display-line-numbers-mode` globally (I did it from customize, which ends up with something like `(custom-set-variables '(display-line-numbers t))`).
2. Open a website with long lines in w3m
![screenshot](https://0x0.st/HKo0.png)
Notice that some lines are truncated

I think w3m should either subtract `line-number-display-width` from `window-width` in `w3m-display-width` or forcefully disable `display-line-numbers-mode` when it is enabled globally.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/emacs-w3m/emacs-w3m/issues/117
You are receiving this because you are subscribed to this thread.

Message ID: <emacs-w3m/emacs-w3m/issues/[email protected]>
----==_mimepart_6444481de5e6a_6d7ec97c177260
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p></p>
<p dir="auto">Emacs 26 introduced <code class="notranslate">display-line-numbers-mode</code> to replace <code class="notranslate">linum-mode</code>. Unfortunately <code class="notranslate">display-line-numbers-mode</code> doesn't correct the value of <code class="notranslate">window-width</code>, and emacs developers consider this a feature. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="567107849" data-permission-text="Title is private" data-url="https://github.com/emacsorphanage/yascroll/issues/23" data-hovercard-type="issue" data-hovercard-url="/emacsorphanage/yascroll/issues/23/hovercard" href="https://github.com/emacsorphanage/yascroll/issues/23">emacsorphanage/yascroll#23</a> and <a href="https://groups.google.com/d/msg/gnu.emacs.bug/pxOxaocXa
 2s/Gg4Z8N0QAAAJ" rel="nofollow">https://groups.google.com/d/msg/gnu.emacs.bug/pxOxaocXa2s/Gg4Z8N0QAAAJ</a></p>
<p dir="auto">Steps to reproduce:</p>
<ol dir="auto">
<li>Enable <code class="notranslate">display-line-numbers-mode</code> globally (I did it from customize, which ends up with something like <code class="notranslate">(custom-set-variables '(display-line-numbers t))</code>).</li>
<li>Open a website with long lines in w3m<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/c896d83e56d8e3bc422c7651761bb916a87790ec42d0d4af8b8ece17ba497269/68747470733a2f2f3078302e73742f484b6f302e706e67"><img src="https://camo.githubusercontent.com/c896d83e56d8e3bc422c7651761bb916a87790ec42d0d4af8b8ece17ba497269/68747470733a2f2f3078302e73742f484b6f302e706e67" alt="screenshot" data-canonical-src="https://0x0.st/HKo0.png" style="max-width: 100%;"></a><br>
Notice that some lines are truncated</li>
</ol>
<p dir="auto">I think w3m should either subtract <code class="notranslate">line-number-display-width</code> from <code class="notranslate">window-width</code> in <code class="notranslate">w3m-display-width</code> or forcefully disable <code class="notranslate">display-line-numbers-mode</code> when it is enabled globally.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />Reply to this email directly, <a href="https://github.com/emacs-w3m/emacs-w3m/issues/117">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ALIUPN5WQSU6OVQ5ULVBN3TXCQ7Z3ANCNFSM6AAAAAAXIBYK24">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ALIUPNZOYU7QE7CSZJT4YB3XCQ7Z3A5CNFSM6AAAAAAXIBYK26WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHGIHS67Y.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span>&lt;emacs-w3m/ema
 cs-w3m/issues/117</span><span>@</span><span>github</span><span>.</span><span>com&gt;</span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/emacs-w3m/emacs-w3m/issues/117",
"url": "https://github.com/emacs-w3m/emacs-w3m/issues/117",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
----==_mimepart_6444481de5e6a_6d7ec97c177260--