smartparens icon indicating copy to clipboard operation
smartparens copied to clipboard

TeX-electric-math and smartparens in auctex

Open slyfr opened this issue 5 years ago • 1 comments

Expected behavior

When setting the variable TeX-electric-math to (cons "\\(" "\\)")) in auctex modifies the behavior of $. When hitting $, \(\) should be inserted.

Actual behavior

When typing $ \(\)\) is inserted.

Steps to reproduce the problem

  • Enter LaTeX-mode with auctex.
  • change the value of TeX-electric-math M-:
  (setq TeX-electric-math (cons "\\(" "\\)"))
  • type $

Backtraces if necessary (M-x toggle-debug-on-error)

Environment & version information

In recent enough smartparens you can call M-x sp-describe-system to generate this report. Please fill manually what we could not detect automatically. Edit the output as you see fit to protect your privacy.

  • smartparens version: 20201217.1033
  • Active major-mode: latex-mode
  • Smartparens strict mode: t
  • Emacs version (M-x emacs-version): GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19
  • Starterkit/Distribution: Spacemacs
  • OS: gnu/linux

slyfr avatar Jan 02 '21 12:01 slyfr

With the new update of Auctex (version >= 14), I believe it should work correctly if we remove TeX-insert-dollar from sp--special-self-insert-commands. @Fuco1 any thoughts?

vqhuy avatar Aug 21 '24 17:08 vqhuy