Closed roiholtzman closed 3 years ago
I have disabled company mode for org files which solves the problem.
(defun zz/adjust-org-company-backends ()
(remove-hook 'after-change-major-mode-hook '+company-init-backends-h)
(setq-local company-backends nil))
(add-hook! org-mode (zz/adjust-org-company-backends))
However, I still see that there are bugs with org mode when inserting parenthesis (inserting (
in math inline mode does not give a closing parenthesis, deleting $
does not delete the closing $
etc.). Probably there are some clashes with smartparnes, but I don't know how to solve them...
Have you looked at Doom's configuration for cdlatex? Some parts are disabled due to conflict with other packages. It might provide some insight.
https://github.com/hlissner/doom-emacs/blob/develop/modules/lang/latex/config.el#L184-L210 EDIT: fixed link
Have you looked at Doom's configuration for cdlatex? Some parts are disabled due to conflict with other packages. It might provide some insight.
https://github.com/hlissner/doom-emacs/blob/develop/modules/lang/latex/config.el#L184-L210 EDIT: fixed link
Thanks for the link, it seems very useful indeed.
My elementary knowledge on lisp is not enough to fully understand everything.
However, I do not understand why cdlatex
works well with latex
mode, but not with org
mode.
Doesn't the linked configuration apply to both latex
and org
modes?
I usually use $ ... $
to write inline math equations. How would one properly configure this to work well in org
mode? (i.e. as it works in latex
mode)
roiholtzman @.***> writes:
My elementary knowledge on lisp is not enough to fully understand everything. However, I do not understand why
cdlatex
works well withlatex
mode, but not withorg
mode. Doesn't the linked configuration apply to bothlatex
andorg
modes?
Yes, cdlatex-mode-map applies in both org and latex.
I usually use
$ ... $
to write inline math equations. How would one properly configure this to work well inorg
mode? (i.e. as it works inlatex
mode)
I don't know. I don't have all the answers. Learn ELisp!
In Doom Emacs: "K" for describing symbol at point, "g d" for goto definition, "SPC h f"/"SPC h v" for describing functions/variables
I still was not able to solve this issue, but it seems to me that for some reason cdlatex-pbb
does not work well (or does not get called) in org-cdlatex-mode
, while in cdlatex-mode
it works great.
If someone has some tips on how to solve this, I'd appreciate it!
I am using doom emacs, and I for some time now I cannot configure correctly cdlatex to work properly. It seems that every time I upgrade doom, cdlatex operates differently and I am not sure why. The main problem is that the snippets do not work properly, namely
equ-TAB
does not insert an equation environment, andfr-TAB
does not put in\frac{}{}
etc.It seems to me that my problem is
company
mode which overrides thecdlatex
. Is there a way to makecdlatex
override thecompany
mode? One way is to disablecompany
mode for org mode documents, but I am not sure how to do that.At the moment my configuration is this:
init.el
config.el
I would love to finally understand how this should be set.