skeeto / enchive

Encrypted personal archives
The Unlicense
632 stars 51 forks source link

Choose major mode based on file name without '.enchive' (#13) #15

Closed ilohmar closed 6 years ago

ilohmar commented 6 years ago

This should fix issue #13 (just tested it with an org-mode file), for which there is (as usual) already a mechanism in Emacs :)

auto-mode-alist can have an entry that only strips off the extension and then redoes the search. I add/delq such an entry analogous with the handler entry itself.

Minor change in the latter's regexp: "\\'" at the end is better than "\\$", as it also works with multi-line file names (which are uncommon but legal).

skeeto commented 6 years ago

This works great, thanks!