GNU bug report logs -
#6000
describe-text-sexp does not know window-width
Previous Next
Full log
Message #31 received at 6000 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
> `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.
That's what I thought should happen, but your proposed change is the
patch below, which seems to do the opposite? I.e., it'll always do the
[Show] button if the selected window doesn't show the current buffer...
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 85017de5d5..f92f37d53d 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -51,7 +51,8 @@ describe-text-sexp
(setq pp (substring pp 0 (1- (length pp)))))
(if (and (not (string-match-p "\n" pp))
- (<= (length pp) (- (window-width) (current-column))))
+ (eq (window-buffer) (current-buffer))
+ (<= (length pp) (- (window-width) (current-column))))
(insert pp)
(insert-text-button
"[Show]"
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
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.