bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6000: describe-text-sexp does not know window-width


From: Lars Ingebrigtsen
Subject: bug#6000: describe-text-sexp does not know window-width
Date: Thu, 03 Jun 2021 11:07:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <juri@jurta.org> writes:

>>    (with-selected-window (or (get-buffer-window "*Help*") (selected-window))
>>      (window-width))
>
> Martin referred to this bug report from bug#17831, and I noticed
> that instead of hard-coding the "*Help*" buffer name, better would be
> to use (current-buffer) because the formatted buffer is current:
>
>   (- (if (window-live-p (get-buffer-window (current-buffer) t))
>          (with-selected-window (get-buffer-window (current-buffer) t)
>            (window-width))
>        (window-width))
>      (current-column))

This sounds like a good idea to me, but there wasn't a recipe to
reproduce whatever error this bug report was talking about, so I can't
test.

Does anybody have a test case that displays the problem (in case it's
still in place after all these years)?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]