All Projects → flymake → Emacs Flymake

flymake / Emacs Flymake

Continuous syntax checking for Emacs. Fork to add max parallel invocations and other bug fixes.

Labels

Projects that are alternatives of or similar to Emacs Flymake

Mastodon.el
Emacs client for Mastodon
Stars: ✭ 150 (-7.41%)
Mutual labels:  emacs
Hexo Renderer Org
Hexo renderer plugin for emacs org-mode
Stars: ✭ 157 (-3.09%)
Mutual labels:  emacs
Org Mode
This is a MIRROR only, do not send PR.
Stars: ✭ 158 (-2.47%)
Mutual labels:  emacs
Emacs4cl
A 40 line ~/.emacs to quickly set up vanilla Emacs for Common Lisp programming
Stars: ✭ 151 (-6.79%)
Mutual labels:  emacs
Org Msg
OrgMsg is a GNU/Emacs global minor mode mixing up Org mode and Message mode to compose and reply to emails in a Outlook HTML friendly style.
Stars: ✭ 153 (-5.56%)
Mutual labels:  emacs
String Inflection
underscore -> UPCASE -> CamelCase conversion of names
Stars: ✭ 157 (-3.09%)
Mutual labels:  emacs
Swiper
Ivy - a generic completion frontend for Emacs, Swiper - isearch with an overview, and more. Oh, man!
Stars: ✭ 1,948 (+1102.47%)
Mutual labels:  emacs
Lpy
Minimal Python IDE for GNU Emacs
Stars: ✭ 161 (-0.62%)
Mutual labels:  emacs
Consult
consult.el - Consulting completing-read
Stars: ✭ 153 (-5.56%)
Mutual labels:  emacs
Modern Cpp Font Lock
C++ font-lock for Emacs
Stars: ✭ 159 (-1.85%)
Mutual labels:  emacs
Lunarymacs
Moon-based Emacs configuration.
Stars: ✭ 151 (-6.79%)
Mutual labels:  emacs
Discover.el
Discover more of emacs with context menus!
Stars: ✭ 153 (-5.56%)
Mutual labels:  emacs
Explain Pause Mode
top, but for Emacs.
Stars: ✭ 158 (-2.47%)
Mutual labels:  emacs
Doom Snippets
The Doom Emacs snippets library
Stars: ✭ 150 (-7.41%)
Mutual labels:  emacs
Typescript.el
TypeScript-support for Emacs
Stars: ✭ 160 (-1.23%)
Mutual labels:  emacs
Writingwithemacs
Tips, Examples, and Resources for Writing with Emacs
Stars: ✭ 150 (-7.41%)
Mutual labels:  emacs
Ac Php
emacs auto-complete & company-mode for php
Stars: ✭ 157 (-3.09%)
Mutual labels:  emacs
Shx For Emacs
An Emacs shell-mode (and comint-mode) extension that enables displaying small plots and graphics and lets users write shell commands in Emacs Lisp.
Stars: ✭ 162 (+0%)
Mutual labels:  emacs
Evil
The extensible vi layer for Emacs.
Stars: ✭ 2,265 (+1298.15%)
Mutual labels:  emacs
Evil Goggles
Display visual hint on evil edit operations
Stars: ✭ 159 (-1.85%)
Mutual labels:  emacs

emacs-flymake

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.
  • Improved support for remote files over Tramp.
  • Improved error message classification. (err/warn/info, customizable regexp)
  • Support for new languages: Javascript and CSS.
  • Minor other bug fixes.

For a full list of changes, please refer to the Changes file.

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)

Improved support for remote files over Tramp

Flymake has a few odd errors when operating on Tramp files, this version fixes bypasses most of the errors if you're running with flymake-run-in-place set to nil. This ensures that the syntax check is run in temporary-file-directory, which is probably the local machine rather than the remote.

If flymake-run-in-place is set to t things are a little more complicated: the syntax check will be run in the same directory as the original file, this (usually) means that it will run in a shell on the remote machine.

Flymake attempts to cope with this gracefully, but there's a couple of odd behaviours in Tramp which make this difficult:

  • Tramp places the contents of the remote shell login message at the end of the buffer being syntax-checked. This version of Flymake takes steps to prevent this from modifying the buffer in any way.
  • If the syntax-check command to run is not found on the remote machine, the command process just hangs and never completes. At the moment Flymake has no special handling of this situation and it will mean that the syntax check never appears to finish.

Improved error message classification

Error messages from the syntax checker can now be classed as info messages in addition or error and warning, and there's a new face to highlight info messages in: flymake-infoline.

In addition, the separation of errors into err/warn/info is now handled by the customizable regexps: flymake-warn-line-regexp and flymake-info-line-regexp. The default fall-through if neither regexp matches is still to classify the message as an error.

Support for new languages

  • Javascript support has been added by running JSHint if it's available.

    There's a number of other good ways of hooking up Javascript support out there, this is by no means the most complete and awesome implementation, but it's pretty simple to get running if you have node.js and npm installed:

    npm -g install jshint
    
  • CSS support has been added by running CSSLint if it's available:

    npm -g install csslint
    
  • RPM Specfile support has been added by running rpmlint if it's available.

  • gettext() .po file support has been provided by msgfmt if it's available.

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.
  • No longer prompt about running flymake processes when killing buffers.

Known Issues

  • Perl syntax checking uses "perl -c", which executes BEGIN blocks, this can be considered a security vulnerability when opening untrusted files. For more information: http://stackoverflow.com/a/12908487/870000
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].