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

don't insist on one colon in filenames #10

Closed fommil closed 8 years ago

fommil commented 8 years ago

it is not possible to have colon in filenames in Windows, which means this breaks if the template is in the user's home directory (which gets contracted to ~ instead of C: or whatever drive it is.).

Workaround is to put the files on another drive, which is a bit awkward.

fommil commented 8 years ago

actually just changing the error to a message seems appropriate, i.e.

(message "yatemplate: %s does not contain exactly one colon" FILENAME)
mineo commented 8 years ago

Thanks for the report! I've changed the way the error message is emitted (I believe yasnippet itself also uses (message) if it has trouble loading a particular snippet file) and added a customizable variable for changing the separator that's used. I'm not 100% happy with this, because yatemplate-separator is used in split-string as a regular expression when all it should be used as is a dumb string, but I couldn't find another string splitting function that does this.