4

I've noticed that at least on Mac, Mathematica automatically displays the blue spelling tooltip on misspelled words, but actually there's a much nicer, more reliable and faster tooltip when one uses the right click.

blue tooltip enter image description here

There are a lot of glitches with the blue tooltips and I'd gladly just disable them for spelling (not for syntax). How can I do it?

Alexey Popkov
  • 61,809
  • 7
  • 149
  • 368
Ranza
  • 1,205
  • 9
  • 22
  • It is just a setting in the preferences of Mathematica. "Check spelling as you type". – SHuisman Sep 10 '19 at 18:14
  • 2
    @SHuisman I know about this, but this disables the nice "red wavy-underline" effect which indicates that a word needs fixing... so this is not the solution I'm looking for. – Ranza Sep 10 '19 at 18:39

1 Answers1

5

Evaluating the following once should do the trick for you:

CurrentValue[$FrontEnd, {SpellingOptions, 
   "AutoSpellCheckPopupDelay"}] = Infinity
ihojnicki
  • 3,026
  • 1
  • 16
  • 11
  • Close, but it doesn't really disable the spellchecking tooltip which is visible by the time delay it takes for the right-click menu to appear (there's a significant hiccup before it appears on incorrectly spelled words). – Ranza Sep 12 '19 at 14:06
  • @Ranza On Windows it seems to do the trick, no tooltip after evaluating the code. – Alexey Popkov Sep 12 '19 at 16:41
  • @AlexeyPopkov I think you must have a rather fast machine, on mine I notice a significant lag when right-clicking. That being said I'll accept the question if no better solution is found. – Ranza Sep 12 '19 at 16:52
  • @Ranza I checked the code at 11-old time Lenovo laptop with Windows 7 and Mathematica 12.0 installed. I do not think that the difference is due to machine's performance. – Alexey Popkov Sep 12 '19 at 18:41
  • @AlexeyPopkov I'm seeing difference on Mac, maybe the implementations differ. If infinite time is set no execution should take place. Just to be sure - try going over a correctly spelled word as fast as you can and then right click, then do the same with a one that's misspelled. That's when I see a difference. – Ranza Sep 12 '19 at 18:45
  • @Ranza there shouldn't be a platform difference, and I certainly cannot reproduce your reported behavior on my Mac. Something else is happening here... – ihojnicki Sep 12 '19 at 22:19
  • 1
    @ihojnicki, @AlexeyPopkov This is weird indeed, I've made a gif to show you what is happening in my case (red blink indicates a right click). You might argue that this is a regular dictionary lookup, but this lag only occurs in MMA... Do you know how to investigate what is being run when I right click? Perhaps somehow inject the Trace command? – Ranza Sep 13 '19 at 14:11
  • @Ranza Trace is for tracing evaluation in the Kernel, I don't know an analog for the FrontEnd (but would like to know if it exists). – Alexey Popkov Sep 14 '19 at 03:06
  • @AlexeyPopkov and Ranza, the LinkSnooper is the only thing available, won't show FE specific actions but if the delay is caused by FE-K communication then you will be able to pin point it. – Kuba Sep 18 '19 at 12:29
  • Thanks Kuba, always nice to learn some new things! Following this solution I have not seen any output when right clicking with finite and infinite AutoSpellCheckPopupDelay. I've also checked ContextMenus.tr and when I disable MenuListSpellingSuggestions MenuItem the delay decreases by 60-70%, so I guess... that I should get a new mac and stop whining, as the lookup appears to take some time. – Ranza Sep 19 '19 at 20:14