From: Lars Ingebrigtsen <larsi@gnus.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 6000@debbugs.gnu.org, Lennart Borgman <lennart.borgman@gmail.com>
Subject: bug#6000: describe-text-sexp does not know window-width
Date: Fri, 04 Jun 2021 11:49:20 +0200 [thread overview]
Message-ID: <87v96uyn6n.fsf@gnus.org> (raw)
In-Reply-To: <148710df-bd9c-0ddb-f00b-a2e429d600dd@gmx.at> (martin rudalics's message of "Fri, 4 Jun 2021 11:18:35 +0200")
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
next prev parent reply other threads:[~2021-06-04 9:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 12:15 bug#6000: describe-text-sexp does not know window-width Lennart Borgman
2014-07-01 23:37 ` Juri Linkov
2021-06-03 9:07 ` Lars Ingebrigtsen
2021-06-03 20:25 ` Juri Linkov
2021-06-04 9:18 ` martin rudalics
2021-06-04 9:49 ` Lars Ingebrigtsen [this message]
2021-06-04 12:44 ` martin rudalics
2021-06-06 9:03 ` Lars Ingebrigtsen
2021-06-06 7:42 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v96uyn6n.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=6000@debbugs.gnu.org \
--cc=lennart.borgman@gmail.com \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.