6

In mathematical notation, parenthesis and brackets have overloaded meaning, and when it comes to represent intervals, the parenthesis/brackets don't have to match. For example,

(1, 2]

means an interval with left open and right closed. But unfortunately, in math mode in latex mode, this becomes fairly annoying that whenever notation likes this is used, emacs highlights it as error.

For example,

enter image description here

But outside of math mode, it's really not normal if any mismatches happen. I am wondering if you guys got a way to fix it?


enabled minor modes:

Enabled minor modes: Async-Bytecomp-Package Auto-Composition Auto-Compression
Auto-Encryption Auto-Fill Auto-Revert Company Diff-Auto-Refine Electric-Indent
File-Name-Shadow Flyspell Font-Lock Global-Eldoc Global-Font-Lock Global-Git-Commit
Global-Hi-Lock Global-Undo-Tree Hi-Lock Latex-Preview-Pane Line-Number Linum
Magit-Auto-Revert Magit-File Menu-Bar Mouse-Wheel Origami Override-Global Projectile
Pyvenv Rainbow-Delimiters Save-Place Shell-Dirtrack Show-Smartparens
Show-Smartparens-Global Tex-Pdf Tool-Bar Tooltip Transient-Mark Undo-Tree Yas
Jason Hu
  • 201
  • 1
  • 8

2 Answers2

1

AFAIU the error message is sent by blink-matching-open. Calls a var holding blink-matching-check-function, which points to blink-matching-check-mismatch. Finally appears function syntax-after and the char-table.

Please consider reporting it at [email protected].

For the moment customizing var blink-matching-paren to nil avoids the error message - at some cost.

As for the face: M-x customize-face RET show-paren-mismatch RET might mitigate the distraction.

Finally M-x customize-variable RET show-paren-mode RET to off avoids the highlighting.

Andreas Röhler
  • 1,886
  • 11
  • 10
1

I encountered the same problem and found the culprit to be rainbow-delimeters, which is listed in the OP's list of minor modes.

A workaround is to disable rainbow-delimeters in LaTeX mode. In Doom Emacs, this can be accomplished by adding the following to your config.el:

(after! tex
  (remove-hook 'TeX-update-style-hook #'rainbow-delimiters-mode))