m00natic / vlfi

View Large Files in Emacs
455 stars 25 forks source link

vlf-mode and .dir-locals.el #46

Open egorenar opened 4 years ago

egorenar commented 4 years ago

Hi, i tried to get vlf-mode and .dir-locals.el to work but in vain. If i disable vlf-mode then it seems to work. Any idea why is this the case ? I want to highlight some regexps in vlf-mode with the help of .dir-locals.el. I would appreciate the hint what could go wrong. Thanks

m00natic commented 4 years ago

The problem is in how vlf hijacks regular opening of file in the abort-if-file-too-large advice. It does so by throwing an error which means that any code that would have been run otherwise is missed. It's similar to #42. I haven't yet thought out a saner way to skip normal file opening.