flymake

How can I highlight unmatched HTML tags in Emacs?

对着背影说爱祢 提交于 2019-12-24 04:56:18
问题 I'd really like to catch unbalanced HTML tags as I edit HTML snippets inside Emacs. For example, JSFiddle offers this: I've found that there's also a wrapper for weblint but that only support HTML 4. flycheck support HTML checking using tidy, but that assumes the current buffer is a complete HTML page. I often edit templates which are included in other templates, so my buffer rarely has a <html> or a <head> in it. How can I highlight unbalanced HTML tags, without writing full HTML documents?

Configure Emacs Flymake to call g++ directly

痴心易碎 提交于 2019-12-21 18:07:13
问题 When writing simple, one file, C++ code, I usually call g++ directly. By default, Flymake seems to assume the presence of a Makefile with a check-syntax target. How do I configure Flymake to simply call g++ directly, e.g: g++ -c a.cpp If the answer could be modified to include compiler flags, that would be even better Many thanks 回答1: You can call g++ directly with following flymake configuration. (require 'flymake) (defun flymake-cc-init () (let* ((temp-file (flymake-init-create-temp-buffer

Identifying PHP unused variables (in Emacs)?

送分小仙女□ 提交于 2019-12-21 05:16:13
问题 Is it somehow possible to identify unused variables in a PHP file in Emacs? With other languages, this is possible by using tools such as flymake . I've already enabled Flymake to show syntax errors for my PHP files on the fly , but still it's frustrating that PHP logic errors are sometimes due to situations like: <?php $foo = whatever(); $bar = something($fo); ... Note the typo on $ foo that will contribute to the developer's headache and to his exorbitant use of coffee. UPDATE: After the

How to disable Emacs-Flymake for html mode

半世苍凉 提交于 2019-12-20 09:48:56
问题 Here is my flymake setup in .emacs file: (when (load "flymake" t) (defun flymake-pyflakes-init () (let* ((temp-file (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace)) (local-file (file-relative-name temp-file (file-name-directory buffer-file-name)))) (list "pyflakes" (list local-file)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pyflakes-init))) (add-hook 'find-file-hook 'flymake-find-file-hook) (load-library "flymake-cursor") I want to use flymake

Running flymake for python when files don't have .py extension

点点圈 提交于 2019-12-12 15:15:50
问题 I'm not a lisp guy at all, but my primary scripting environment lives on emacs and I need some help to get my flymake/pyflakes running when there is no .py extension on files. Because some of the scripts here at my work doesn't have .py extension on them. This is pretty working with pylint, pep8, pychecker etc, when I'm reading/coding a file that has the .py extension. ;; flymake for python (add-to-list 'load-path "~/.emacs.d/plugins/flymake") (when (load "flymake" t) (defun flymake-pylint

Is there a way to make flymake to compile only when I save

ε祈祈猫儿з 提交于 2019-12-10 21:13:55
问题 When I type flymake makes the cursor hang a little. It's kind of annoying. I was wondering if there is a way to tell flymake to do not parse and compile each time I change something, just do it when I save. Any other suggestion? Thanks, 回答1: You can override the flymake-after-change-function from flymake.el by putting this in your .emacs or init.el file: (eval-after-load "flymake" '(progn (defun flymake-after-change-function (start stop len) "Start syntax check for current buffer if it isn't

Pylint not working with Emacs GUI on OS X; works from command-line

最后都变了- 提交于 2019-12-07 09:42:35
问题 When run from the command-line ( emacs filename.py ) flymake and pylint work perfectly together. Errors are highlighted properly. (Although I can't tooltip hover to get error details because it's text-mode.) When run from the GUI (Carbon Emacs) Flymake returns immediately, and the first line in the file is highlighted with the error " in <module> ". The first line is shows the error even on a "Hello World" script.) I'd like to get it working properly in GUI mode so that I can navigate with

Can flymake's temporary file be created in the system's temporary directory?

橙三吉。 提交于 2019-12-04 23:42:03
问题 I am currently using the following code to hook up flymake and Pyflakes in emacs: (defun flymake-create-temp-in-system-tempdir (filename prefix) (make-temp-file (or prefix "flymake"))) and then I pass this function to flymake-init-create-temp-buffer-copy . (Taken from http://hustoknow.blogspot.com/2010/09/emacs-and-pyflakes-using-tmp-directory.html). This code worked fine until yesterday. When I visit certain Python files, I get the following error: switched OFF Flymake mode for buffer admin

Configure Emacs Flymake to call g++ directly

旧街凉风 提交于 2019-12-04 09:12:42
When writing simple, one file, C++ code, I usually call g++ directly. By default, Flymake seems to assume the presence of a Makefile with a check-syntax target. How do I configure Flymake to simply call g++ directly, e.g: g++ -c a.cpp If the answer could be modified to include compiler flags, that would be even better Many thanks You can call g++ directly with following flymake configuration. (require 'flymake) (defun flymake-cc-init () (let* ((temp-file (flymake-init-create-temp-buffer-copy 'flymake-create-temp-inplace)) (local-file (file-relative-name temp-file (file-name-directory buffer

Can flymake's temporary file be created in the system's temporary directory?

点点圈 提交于 2019-12-03 16:03:01
I am currently using the following code to hook up flymake and Pyflakes in emacs: (defun flymake-create-temp-in-system-tempdir (filename prefix) (make-temp-file (or prefix "flymake"))) and then I pass this function to flymake-init-create-temp-buffer-copy . (Taken from http://hustoknow.blogspot.com/2010/09/emacs-and-pyflakes-using-tmp-directory.html ). This code worked fine until yesterday. When I visit certain Python files, I get the following error: switched OFF Flymake mode for buffer admin.py due to fatal status CFGERR, warning Configuration error has occured while running (pyflakes ../../.