I'm using AuCTeX (v.11.89.6 with Emacs 25.1). I have no problems with it, just a small nuisance. Whenever I use TeX-insert-macro (C-c C-m) I get many options I never use. For instance, when I wish to insert the command \enquote{...}, I run TeX-insert-macro and start typing enq. The first option I get is MakeHyphenQuote and so I have to scroll down to select enquote.

enter image description here

To go around this issue, I used to edit the csquotes.el style file and remove MakeHyphenQuote from the list. However, each time AuCTeX updates itself, my file is removed and all customisation gets lost.

I also tried editing the TeX-symbol-list variable (which, according to apropos-value, seems to hold these commands), but couldn't make it to work.

So my question is whether I can remove MakeHyphenQuote (or any other command or environment) from the list used by AuCTeX for command insertion.

Update: just to clarify, I'm using ivy-mode.

  • 1
    That's not AUCTeX's standard behavior. What is the value of the variable completion-styles your .tex file buffer? – Arash Esbati Oct 29 '16 at 17:53
  • Are you using ivy-mode? It should use recent used command as the first choice when you type it for the next time. – xuhdev Oct 29 '16 at 21:38
  • @ArashEsbato The value is: (basic partial-completion emacs22) – NVaughan Oct 29 '16 at 21:41
  • 1
    So I think your actual problem does not exist when you do the same thing again... – xuhdev Oct 29 '16 at 21:43
  • 1
    I think you should tag your question with ivy. I don't use ivy so I can't offer an answer. – Arash Esbati Oct 30 '16 at 8:40

I finally managed to tackle this problem with the following function:

(defun nv/cleanauctex ()
  "Removes two elements from TeX-symbol-list"
  (setq TeX-symbol-list (remove '("MakeHyphenBlockQuote" "Language" "Opening quotation mark" "Delimiter for citation" "Closing quotation mark") TeX-symbol-list))
  (setq TeX-symbol-list (remove '("MakeHyphenQuote" "Babel's language name" "Opening quotation mark" "Closing quotation mark") TeX-symbol-list))

After AucTeX loads csquotes.el (which contains the symbols related to the csquotes.sty LaTeX package), I run this function which expunges two elements from the TeX-symbol-list variable.

Unfortunately, I have to manually run the function after I have opened a .tex file. (A hook doesn't work as AucTeX dynamically loads the symbols according to the preamble's packages.)

  • If you know which function loads the symbols, you can add your function as :after advice to that one. – Omar Nov 21 '20 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.