1 line
2 KiB
Plaintext
1 line
2 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p>Evaluating <code>(window-text-width)</code> for a fullscreen window returns 238, which indicates that 238 columns of characters should be able to be displayed on one line. However, using <code>count-words-region</code>, I can see that I can actually only fit 234 characters on a line without it causing wrapping (I'm using global-visual-line-mode, although this problem persists when it's off). This causes problems with any functionality that tries to right align content - for instance, org-agenda will try to align content so that the last character in a heading's tags is on column 238 (i.e. on the right side of the screen), but since column 238 is actually <em>beyond</em> the right side of the screen, the tags end up on the following visual line. Instead of</p> <pre><code>* TODO my task a :@home: * TODO my task b :@work: </code></pre> <p>I end up with</p> <pre><code>* TODO my task a :@home: * TODO my task b :@work: </code></pre> <p>...which is significantly less information dense and generally uglier. I was content to set <code>org-agenda-tags-column</code> to 0, but I've recently picked up ledger, and this issue has also started messing up the formatting in its reports. This also happens regardless of how I split windows - if I split vertically, window-text-width reports a width of 118, but I can actually only fit 114 columns. Has anyone run into this before, or have tips for where to start looking? This seems like such a finicky, low-level thing I don't have much hope - especially since I haven't futzed around with any obvious culprits like font settings.</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/summetria"> /u/summetria </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/r7htcv/windowtextwidth_thinks_my_screen_is_wider_than_it/">[link]</a></span>   <span><a href="https://www.reddit.com/r/emacs/comments/r7htcv/windowtextwidth_thinks_my_screen_is_wider_than_it/">[comments]</a></span> |