Whenever I do something in Magit buffer I get this warning:

Warning (magit-todos): File has lines too long for Emacs to search.  Consider excluding it from scans: path/to/file

In particular it complains about socket.io.js.map

I tried excluding the file from projectile - no effect. I don't understand which scans the warning is talking about.

  • 1
    Try adding the offending file pattern to magit-todos-exclude-globs.
    – Tobias
    Sep 30 '19 at 20:55
  • Tobias, thanks, that worked. Here is a readme explaining in details how to do it: github.com/alphapapa/magit-todos#tips Another question: the exclude patterns in magit-todos-exclude-globs are the same as in .gitignore? Is there any docs on patterns otherwise? Oct 1 '19 at 6:46
  • You can see it yourself. A string consisting of :! and the glob-pattern is appended to the git command behind --.
    – Tobias
    Oct 1 '19 at 8:37
  • It would be nice if you could write up your own answer and accept it. I don't have time for that right now.
    – Tobias
    Oct 1 '19 at 8:38

Set magit-todos-exclude-globs variable.

It can be set globally:

(setq magit-todos-exclude-globs '(patterns))

in config or locally, per-repository.

To set it locally, run add-dir-local-variable, choose magit-status-mode, choose magit-todos-exclude-globs, add patterns you would like to exclude as a list.

Example: ("*.map" "*.html")

That will generate .dir-locals.el with the appropriate configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.