Hello I’m having some troubles fixing the next error.
Error (use-package): aas/:config: Condition must be either nil or a function
the source of code is:
(use-package aas
:hook (LaTeX-mode . aas-activate-for-major-mode)
:hook (org-mode . aas-activate-for-major-mode)
:config
(aas-set-snippets 'org-mode
;; set condition!
:cond #'texmathp ; expand only while in math
"fr" '(yas "\\frac{$1}{$2}$0")
"lr(" '(yas "\\left( $1 \\right)$0")
"lr[" '(yas "\\left[ $1 \\right]$0")
"lr{" '(yas "\\left\\\\{ $1 \\right\\\\}$0")
"lr|" '(yas "\\left| $1 \\right|$0")
"lr<" '(yas "\\left\\langle $1 \\right\\rangle$0")
"sqr" '(yas "\\sqrt{$1}$0")
"cbr" '(yas "\\sqrt[3]{$1}$0")
"nthr" '(yas "\\sqrt[$1]{$2}$0")
"dint" '(yas "\\int_{$1}^{$2}{$3 d$4}$0")
"int" '(yas "\\int{$1 d$2}$0")
"lim" '(yas "\\lim_{$1 \\to $2}{$3}$0")
"neq" '(yas "\\neq $0")
"geq" '(yas "\\geq $0")
"leq" '(yas "\\leq $0")
"sim" '(yas "\\sim $0")
"->" '(yas "\\to $0")
"=>" '(yas "\\implies $0")
"inn" '(yas "\\in $0")
"set" '(yas "\\\\{$1 \\\\}$0")
"cc" '(yas "\\subset $0")
"EE" '(yas "\\exists $0")
"nEE" '(yas "\\nexists $0")
"VV" '(yas "\\forall $0")
"xx" '(yas "\\times $0")
"..." '(yas "\\dots $0")
";." '(yas "\\vdots $0")
";/" '(yas "\\ddots $0")
)
(aas-set-snippets 'org-mode
"mk" '(yas "$$0$")
"md" '(yas "$$ $0 $$")
))
I think the problem is in the line :cond #'texmathp.
Thanks in advance!
The problem is probably elsewhere in your config. Something somewhere is loading cdlatex, which you seem to be missing; soy no hablo Español, but I think that is what the error says.
Either install cdlatex package or fix your setup. Read the manual, about cdlatex and one that comes with org mode. You probably need to sort out your requires and package loading. Have you tried to run Emacs with --debug-init flag?
Because cdlatex is not needed for those snippets to work?
cdlatex is not need it.
the message produces when I open my config.org
here’s what the backtracer said
The manual says you have to install it:
The manual I linked you to.
Your stack trace confirms: you don’t have cdlatex installed (or not in your path) when you are trying to turn on cdlatex mode with turn-on-org-cdlatex.
If that is the best user experience or not I leave to the interested party to lift in a bugreport/request to org devs, but it is what it is, and is documented in the manual.