* bug#35393: 26.2; `help-echo' text propertized with `face' is not shown in that face
@ 2019-04-23 13:10 Drew Adams
2019-04-23 13:33 ` Drew Adams
2021-06-22 14:38 ` Lars Ingebrigtsen
0 siblings, 2 replies; 3+ messages in thread
From: Drew Adams @ 2019-04-23 13:10 UTC (permalink / raw)
To: 35393
emacs -Q
C-x b foo ; buffer in fundamental mode
Type a line of arbitrary text.
Type this and evaluate it:
(put-text-property 1 10 'help-echo "ABCDEFG")
No problem. The tooltip appears as expected, using face `tooltip'.
Now try this instead:
(put-text-property 1 10
'help-echo (propertize "rstuvwxyz" 'face 'custom-changed))
The propertized string is not used. The text property `face' is set
correctly, but the tooltip displayed ignores it.
If this is not considered a bug then please consider it an enhancement
request to be able to use a propertized string.
Consider the use case of a tooltip that shows a tiny bit of code, but
with more than one line, so that alignment etc. is important. You might
well want that code to be shown in a fixed-width font. You should be
able to do this by passing a string propertized with the appropriate
face.
In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17134
Configured using:
`configure --without-dbus --host=x86_64-w64-mingw32
--without-compress-install 'CFLAGS=-O2 -static -g3''
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#35393: 26.2; `help-echo' text propertized with `face' is not shown in that face
2019-04-23 13:10 bug#35393: 26.2; `help-echo' text propertized with `face' is not shown in that face Drew Adams
@ 2019-04-23 13:33 ` Drew Adams
2021-06-22 14:38 ` Lars Ingebrigtsen
1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2019-04-23 13:33 UTC (permalink / raw)
To: 35393
Forgot to add:
Contrast this with `x-show-tip', which accepts a propertized string and shows the tooltip using it.
Why should tooltip use of `help-echo' override or
ignore any text properties on its string value?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#35393: 26.2; `help-echo' text propertized with `face' is not shown in that face
2019-04-23 13:10 bug#35393: 26.2; `help-echo' text propertized with `face' is not shown in that face Drew Adams
2019-04-23 13:33 ` Drew Adams
@ 2021-06-22 14:38 ` Lars Ingebrigtsen
1 sibling, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-22 14:38 UTC (permalink / raw)
To: Drew Adams; +Cc: 35393
Drew Adams <drew.adams@oracle.com> writes:
> Now try this instead:
>
> (put-text-property 1 10
> 'help-echo (propertize "rstuvwxyz" 'face 'custom-changed))
>
> The propertized string is not used. The text property `face' is set
> correctly, but the tooltip displayed ignores it.
So the test case here is basically:
(tooltip-show (propertize "foo" 'face 'error))
This was apparently fixed earlier this year in Emacs 28. The code is
now:
;; Use non-nil APPEND argument below to avoid overriding any
;; faces used in our TEXT. Among other things, this allows
;; tooltips to use the `help-key-binding' face used in
;; `substitute-command-keys' substitutions.
(add-face-text-property 0 (length text) 'variable-pitch t text)
So I'm closing this bug report. If this is still a problem (there's
some difference between different architectures), please respond to the
debbugs address and we'll reopen.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-22 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-23 13:10 bug#35393: 26.2; `help-echo' text propertized with `face' is not shown in that face Drew Adams
2019-04-23 13:33 ` Drew Adams
2021-06-22 14:38 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).