[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: |
Fri, 04 Jun 2021 11:49:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
martin rudalics <rudalics@gmx.at> writes:
> and M-x foo in some window. Dependent on the width of that window,
> `describe-text-sexp' will decide whether to insert the expression in
> *foo* or display a "Show" button instead. When you eventually display
> *foo* you will see the result. I think a simple check like
>
> (if (and (not (string-match-p "\n" pp))
> (eq (window-buffer) (current-buffer))
> (<= (length pp) (- (window-width) (current-column))))
> (insert pp)
>
> should work.
Hm... this will always insert the [Show] button if the *foo* buffer
isn't the current buffer? Is that what we want here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no