From: Drew Adams <drew.adams@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 20540@debbugs.gnu.org
Subject: bug#20540: 25.0.50; Document tooltip woes, including `help-echo'
Date: Sun, 10 May 2015 07:36:25 -0700 (PDT) [thread overview]
Message-ID: <c833cbe8-b6c1-40b7-8e58-12d693fe1a9f@default> (raw)
In-Reply-To: <<83d229no4x.fsf@gnu.org>>
> You've omitted the facts you've found, for some reason. That's a
> bad idea: since no one really knows about these limitations,
Someone who understands the code (C code, IIUC) can discover them.
> if you want to raise the chances that this bug report will be acted
> upon, I urge you to describe everything you tried and found not to
> work, so that whoever takes upon this task will have the "bread-crumbs"
> to go by. Otherwise, researching this issue from scratch is an
> unpleasant task that is unlikely to find its volunteer. Thanks.
I'll try. But I don't have many such "facts". Someone familiar with
the code would need to specify what is and is not possible for users
to do. I would hope that some of the limitations would be removed,
but any limitations should be documented.
I mention here some superficial tests I tried, in case it helps.
> > 1. If you create a tooltip using, say, `x-show-tip', you can
> > control the font, text color and size, background color, etc.
> > Well, only some frame parameters seem to have any effect, when
> > passed in argument PARMS. Just which parameters can or cannot be
> > used for PARMS should be documented.
(defun foo (&optional height)
(interactive (list (and current-prefix-arg
(prefix-numeric-value current-prefix-arg))))
(unless height (setq height 1))
(x-show-tip (propertize (string (char-after))
'face `(:foreground "red"
:height ,(* 200 height)))))
Other face parameters (e.g. :font) do not seem to be reflected.
Likewise frame parameters (arg PARMS). I also tried binding
`tooltip-frame-parameters' in such a function, but couldn't get that to
change the tooltip frame parameters either.
I also tried customizing face `tooltip', but that seems to have no
effect for `x-show-tip' or for `help-echo' tooltips for `tooltip-mode'.
Perhaps that is normal for MS Windows, but I don't see any doc about it.
> > 2. The word `tooltip' is hardly mentioned in the doc. Another doc
> > fix would be to document `tooltip-mode' properly in the Elisp manual,
> > saying which frame parameters you can use for `tooltip-frame-parameters',
> > etc.
The only "facts" here are from searching the Emacs and Elisp manuals.
The Emacs manual has node `Tooltips', and there are other places where
"tooltip" is mentioned, but they essentially refer to node `Tooltips'.
The Elisp manual, which is really what I care about in this context,
has a few occurrences of "tooltip", which say that tooltip frames do
not count for this or that operation. E.g. `Deleting Frames' says
"Unless FRAME is a tooltip...".
Node `Special Properties' mentions the word in passing, and sends you
to the Emacs manual, node `Tooltips'. IOW, nothing technical about
tooltips here - just mention of what a tooltip is. Other occurrences
of the term in the Elisp manual do not add anything in this regard.
> > 3. A related bug in `tooltip.el' is that the defcustom for
> > `tooltip-frame-parameters' has no :type. Impossible for a user to
> > customize the value properly using Customize. And no help about
> > which parameters can be used effectively (see #2, above).
That fact is expressed clearly enough, no?
> > 4. `help-echo': No doc saying whether the string can be
> > propertized, and if so, which properties have any effect.
That fact is expressed clearly enough, no?
> > Although `x-show-tip' seems to let you change the char size, color,
> > background color, etc., and you can use property `display' with
> > `help-echo',
Do you need an example of using `display' with `help-echo'? I use
a sexp like this for `help-echo' in dired+.el, to show a thumbnail
preview of an image file on mouseover:
(propertize " " 'display (create-image file))
> > apparently you cannot change the face attributes of the `help-echo'
> > string so that the appearance changes. This is quite a limitation,
> > AFAICT.
(defun foo ()
(interactive)
(add-text-properties
(line-beginning-position) (+ 20 (line-beginning-position))
`(mouse-face underline help-echo
,(propertize (word-at-point)
'face '(:foreground "red" :height 200)))))
The tooltip does not reflect what `propertize' should do here.
> > All of this kind of thing should be documented: what you can and
> > cannot do - which parameters have an effect. You can make
> > `help-echo' show an image instead of text,
See above.
> > but you cannot simply change the text appearance of a `help-echo'
> > string? How are users supposed to guess what is possible?
> > Should be documented.
HTH. I don't really know what is allowed and what is not - or why.
next parent reply other threads:[~2015-05-10 14:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<795eb88f-e9e7-4728-82d8-32d0caea52fb@default>
[not found] ` <<83d229no4x.fsf@gnu.org>
2015-05-10 14:36 ` Drew Adams [this message]
2015-05-10 15:26 ` bug#20540: 25.0.50; Document tooltip woes, including `help-echo' Eli Zaretskii
[not found] ` <<83bnhso5u8.fsf@gnu.org>
2015-05-10 16:11 ` Drew Adams
2015-05-09 23:27 Drew Adams
2015-05-10 2:48 ` Eli Zaretskii
2015-05-10 14:38 ` Eli Zaretskii
2021-06-22 14:42 ` Lars Ingebrigtsen
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=c833cbe8-b6c1-40b7-8e58-12d693fe1a9f@default \
--to=drew.adams@oracle.com \
--cc=20540@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.