auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Better sorting for TeX-symbol-list


From: Gustavo Barros
Subject: Better sorting for TeX-symbol-list
Date: Sat, 11 Jun 2022 10:02:05 -0300
User-agent: mu4e 1.6.11; emacs 28.1

Hi All,

I'd like to suggest a small improvement on the way the sorting of `TeX-symbol-list' is done by AUCTeX.

`TeX-symbol-list' is sorted by AUCTeX using `TeX-car-string-lessp' which uses internally `string-lessp'. However, `string-lessp' sorts all entries starting with an uppercase letter, in a block, before the ones starting with a lowercase one. This is not really ideal for `TeX-symbol-list', given some traditional naming conventions of LaTeX. First, lowercase macros tend to be user facing more frequently used ones, so it would make sense they were sorted first. Second the common idiom of `\macro', with a `\Macro' version for start of sentence use, also does not work that well. Again, `\macro' is probably used more frequently. Furthermore, ideally these two should be next to each other on the list, and they are currently far apart. Considering the popularity of vertical completion systems and the common use of case-fold this complicates unnecessarily the task. If you are looking for, say, `\parencite', some typing might grant you sufficient narrowing down of the list. But if you are looking for a short named macro (the ones thus named precisely to be easy to reach) you may have a harder time. Example, acronym macros, say, `\ac'.

I've been using `string-collate-lessp' instead of `string-lessp' in `TeX-car-string-lessp' for some time now with much better results.

Best regards,
Gustavo.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]