I'm trying to evaluate the differences of writing in Org and LaTeX for my Master's thesis. A feature I find very useful in Org is CDLaTeX. To have a unique workflow between the two, I'd like to use CDLaTeX also for LaTeX, instead of LaTeX-math-mode. For what I know (correct me if I'm worng), this is possible in LaTeX (AUCTeX) buffers, but the functionalities of the two packages sometimes conflicts.
My current config for AUCTeX is:
(setq TeX-auto-save t) (setq TeX-parse-self t) (setq TeX-debug-bad-boxes t) (setq-default TeX-master nil) (setq TeX-electric-math (cons "\\(" "\\)")) (setq LaTeX-electric-left-right-brace t) (setq prettify-symbols-unprettify-at-point 'right-edge) (add-hook 'LaTeX-mode-hook 'prettify-symbols-mode) (add-hook 'latex-mode-hook 'prettify-symbols-mode) (add-hook 'LaTeX-mode-hook 'turn-on-cdlatex) (add-hook 'latex-mode-hook 'turn-on-cdlatex) (defun my--LaTeX-CDLaTeX-utils-setup () "Set up variables and similar that should be active only in LaTeX (AUCTeX) buffers." (setq-local cdlatex-takeover-dollar nil cdlatex-takeover-parenthesis nil)) (add-hook 'LaTeX-mode-hook 'my--LaTeX-CDLaTeX-utils-setup) (add-hook 'latex-mode-hook 'my--LaTeX-CDLaTeX-utils-setup)
Since in Italian the apostrophe (
') is used as a punctuation mark, I'd like to have
cdlatek-math-modify disabled when non in a math environment, so that I can type apostrophized words. Instead, If I type it in a "text" area, it triggers the completion (but I don't really need the basic font formatting functions, as they are already in AUCTeX). How can I make CDLaTeX detect the difference and not kick in in text areas?
My Emacs version is
GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-07-31, Org is
Org mode version 9.5.4 (release_9.5.4-17-g6e991f @ /usr/share/emacs/29.0.50/lisp/org/)