This project is a fork of Pavel Kobyakov's excellent flymake.el to let me play around with some updates before contributing them upstream.
Features added so far:
- Support for queuing up syntax checks once a certain number are in-progress.
- Support for placing temporary files in the system temporary directory.
- Spawns only one buffer-modification timer check rather than one per buffer.
- Show multiple errors in tooltips.
- Minor other bug fixes.
Queued Syntax Checks
If you use desktop.el with hundreds of buffers open you've probably had problems when you restart emacs with flymake running: it'll try to run a syntax check on everything at once.
Now there's a limit of 4 syntax checks running at once, any more that are attempted go on a queue that will empty as one of the 4 slots frees up.
You can customize the number of parallel checks that run, or turn off the limit entirely with the 'flymake-max-parallel-syntax-checks' variable.
;; Let's run 8 checks at once instead. (setq flymake-max-parallel-syntax-checks 8) ;; I don't want no steekin' limits. (setq flymake-max-parallel-syntax-checks nil)
Use The System Temporary Directory For Temp Files
By default Flymake creates a temporary copy of the file being inspected in the same directory as the original file. This is helpful if you're using relative pathnames for includes, but not so helpful if you have something in your environment that's triggered by file changes in your project directory (continuous integration, webserver restarts, etc).
Now you can toggle between the two behaviours with the 'flymake-run-in-place' variable.
;; Yes, I want my copies in the same dir as the original. (setq flymake-run-in-place t) ;; Nope, I want my copies in the system temp dir. (setq flymake-run-in-place nil) ;; This lets me say where my temp dir is. (setq temporary-file-directory "~/.emacs.d/tmp/")
One Buffer Modification Timer Check
Again, if you have multiple hundreds of buffers open, original Flymake would start thrashing your CPU trying to keep up with 1-second timer looking for modifications for every buffer, my laptop would have emacs sat at 60-90% CPU doing nothing but try to check for whether buffers had been modified.
Now only a single timer is spawned, it still runs once per second but only looks for changes in the current buffer.
This is much more CPU-friendly but also means that if you quickly switch away from a buffer after making changes, the syntax check may not be run until you return to the buffer. (The last-modified value is still retained per-buffer so the changes will still be detected once you return for long enough for the 1-second timer to happen.)
Show Multiple Errors In Tooltips
The tooltips containing errors can now also be configured to include more than one error with the 'flymake-number-of-errors-to-display' variable:
;; I want to see at most the first 4 errors for a line. (setq flymake-number-of-errors-to-display 4) ;; I want to see all errors for the line. (setq flymake-number-of-errors-to-display nil)
Other Bug Fixes
- Logging no longer errors.
- Log files are now proper logs rather than last-message-only.
- Log files now have timestamps to help debugging where time is going.
- You can customize where the log is created with flymake-log-file-name.
- Provides hooks so that flymake-cursor doesn't need to wrap our functions.
- Compile is now clean without warnings.
- Support for invoking correct perl under perlbrew multiple-installs.