GNU bug report logs - #6000
describe-text-sexp does not know window-width

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Thu, 22 Apr 2010 12:16:01 UTC

Severity: minor

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Juri Linkov <juri <at> jurta.org>, Lennart Borgman <lennart.borgman <at> gmail.com>, 6000 <at> debbugs.gnu.org
Subject: bug#6000: describe-text-sexp does not know window-width
Date: Fri, 4 Jun 2021 14:44:38 +0200
>> 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?

`describe-text-sexp' always works on the current buffer

(defun describe-text-sexp (sexp)
  "Insert a short description of SEXP in the current buffer."

so the added line will avoid the [Show] button iff the selected window
doesn't show the current buffer which should be rare enough.

martin




This bug report was last modified 3 years and 344 days ago.

Previous Next


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