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
  • When starting from fundamental-mode, activating math-mode, that shouldn't happen. – Andreas Röhler Dec 6 '17 at 6:35
  • @AndreasRöhler are you saying it shouldn't complain? but it does here. – Jason Hu Dec 6 '17 at 15:25
  • @AndreasRöhler i updated with my minor modes. i did try to play with smartparen but it does not seem related. – Jason Hu Dec 6 '17 at 15:27
  • Sorry, my comment missed the point and it was to late for a delete. Probably worth a bug report. – Andreas Röhler Dec 6 '17 at 16:41
  • @AndreasRöhler i am not even sure which party should fix this. should it be the latex mode or emacs? – Jason Hu Dec 6 '17 at 16:44
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 bug-gnu-emacs@gnu.org.

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.

  • hmm... it seems caused by something else. I set that variable to nil, then reopen the file again. but i can still see those highlights. – Jason Hu Dec 6 '17 at 17:21
  • @HuStmpHrrr Customizing should affect error message - edited the answer. – Andreas Röhler Dec 6 '17 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.