minad / cape

🦸cape.el - Completion At Point Extensions
GNU General Public License v3.0
573 stars 20 forks source link

Question about cape-tex #80

Closed deb75 closed 1 year ago

deb75 commented 1 year ago

When I write a backslash \ and then hits C-c q x (configured to call cape-tex for me), I am offered many latex symbols.

However, what I finally get is an UTF-8 symbol, whereas what I would prefer is the latex command, e.g. \leftarrow, ...

Is it possible to achieve this ? Perhaps with a cape transformation ?

Regards

minad commented 1 year ago

The point of cape-tex is to write Unicode symbols, not tex names. However you could modify cape--tex-properties and remove the :exit-function.

deb75 commented 1 year ago

Thanks,

I tried :

  (plist-put cape--tex-properties :exit-function nil)

either inside or outside (after) (use-package ...), but it did not find the variable cape--tex-properties.

Indeed, it seems not known until first call to cape-tex. How can I proceed ?

Regards

=========

Got it ! with :

(load "cape-char.el" nil t t)
(plist-put cape--tex-properties :exit-function nil)