<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Slacy's Blog &#187; pep8</title>
	<atom:link href="http://slacy.com/blog/tag/pep8/feed/" rel="self" type="application/rss+xml" />
	<link>http://slacy.com/blog</link>
	<description>This site is solar powered!</description>
	<lastBuildDate>Fri, 27 Jan 2012 04:33:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>flymake for emacs + Python</title>
		<link>http://slacy.com/blog/2009/11/flymake-for-emacs-python/</link>
		<comments>http://slacy.com/blog/2009/11/flymake-for-emacs-python/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 17:46:13 +0000</pubDate>
		<dc:creator>slacy</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[pep8]]></category>
		<category><![CDATA[pylint]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[syntax]]></category>

		<guid isPermaLink="false">http://slacy.com/blog/?p=997</guid>
		<description><![CDATA[flymake is an emacs mode that lets you &#8220;compile&#8221; (or syntax check) your code on the fly. For Python, this means that you can run several syntax checkers, like pep8 or pylint, or pyflakes (or all of the above) while &#8230; <a href="http://slacy.com/blog/2009/11/flymake-for-emacs-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>flymake is an emacs mode that lets you &#8220;compile&#8221; (or syntax check) your code on the fly.  For Python, this means that you can run several syntax checkers, like pep8 or pylint, or pyflakes (or all of the above) while you&#8217;re editing your code in realtime.  To get this set up in emacs, do the following:</p>
<p>Create ~/bin/pychecker, which will be a simple script calling all your checkers.</p>
<pre>#!/bin/bash
pylint --output-format=parseable "$1"
pyflakes "$1"
pep8 --repeat "$1"
true</pre>
<p>Second, edit your .emacs and set up flymake to call this script for python files, and add some useful keyboard shortcuts for jumping between errors &amp; warnings:</p>
<pre>(require 'flymake)
(defun flymake-pylint-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 "~/bin/pychecker" (list local-file))))

(add-to-list 'flymake-allowed-file-name-masks
             '("\\.py\\'" flymake-pylint-init))

(defun my-python-mode-hook ()
 (interactive)
 (flymake-mode)
 (local-set-key [S-up]
                (lambda ()
                  (interactive)
                  (flymake-goto-prev-error)
                  (message "%s"
                    (flymake-ler-text (caar (flymake-find-err-info
                    flymake-err-info
                    (flymake-current-line-no)))))))
 (local-set-key [S-down]
                (lambda ()
                  (interactive)
                  (flymake-goto-next-error)
                  (message "%s"
                    (flymake-ler-text (caar (flymake-find-err-info
                    flymake-err-info
                    (flymake-current-line-no)))))))
)
(add-hook 'python-mode-hook 'my-python-mode-hook)</pre>
]]></content:encoded>
			<wfw:commentRss>http://slacy.com/blog/2009/11/flymake-for-emacs-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
	</channel>
</rss>

