4

I have multiple overlays with 'help-echo strings covering the same region. Can I make Emacs show all these strings in the mouseover tooltip? By default it only shows the one coming from the highest priority overlay.

EDIT: The context is FlyCheck: a checker reports errors and warnings for the same position in the buffer, and the tooltip for that position only mentions the errors.

Clément
  • 3,924
  • 1
  • 22
  • 37

2 Answers2

5

The help-echo property can be a function that returns the actual string to display, so you could add an additional overlay with higher priority with a special help-echo property which will compute the union/concatenation of all the help-echo properties it covers.

Stefan
  • 26,154
  • 3
  • 46
  • 84
1

No, not unless you run some code that combines the overlays, e.g., replacing some with one.

For example, get the help-echo property from whichever you like, and add the text in it to the help-echo property of whichever overlay has the highest priority. Or create an overlay with a higher priority than the others, and whose help-echo property has all of the text that you want, derived from the property on the other overlays.

Overlay priorities are designed to let you mask one overlay by another. That masking includes their help-echo strings.

(But it might be that if you describe your exact context in more detail there is another solution.)

Drew
  • 75,699
  • 9
  • 109
  • 225
  • Great answer, thanks. The context is flycheck, so I guess that means I'll need to make a feature request or a patch :) – Clément Aug 14 '15 at 01:51