mineo / yatemplate

File templates for Emacs with YASnippet
https://github.com/mineo/yatemplate
GNU General Public License v3.0
70 stars 11 forks source link

yatemplate searches under non-template directory #17

Closed EMayej closed 6 years ago

EMayej commented 6 years ago

https://github.com/mineo/yatemplate/blob/d8b6a17ae1c91cfeaea8f502a5d0292197b86f21/yatemplate.el#L109

This searches ~/.emacs.d/templatesabc/*, ~/.emacs.d/templatesxyz/* along with ~/.emacs.d/templates/*, because yatemplate-dir is ~/.emacs.d/templates

We could use

(sort (file-expand-wildcards (concat (file-name-as-directory yatemplate-dir) "*")) 'string<)

to avoid that.

We can add another search for "*/" if we want to support files under sub-directory of yatemplate-dir