From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Riley Newsgroups: gmane.emacs.help Subject: Re: Emacs 23, Python, epylint, pylint Date: Thu, 22 Oct 2009 03:48:39 +0200 Organization: aich tea tea pea dicky riley dot net Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1256176229 29046 80.91.229.12 (22 Oct 2009 01:50:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Oct 2009 01:50:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 22 03:50:18 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N0mog-0000D0-Rm for geh-help-gnu-emacs@m.gmane.org; Thu, 22 Oct 2009 03:50:15 +0200 Original-Received: from localhost ([127.0.0.1]:40593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0mog-0006RR-Cq for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Oct 2009 21:50:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0mnk-00066t-Fj for help-gnu-emacs@gnu.org; Wed, 21 Oct 2009 21:49:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0mnf-000650-US for help-gnu-emacs@gnu.org; Wed, 21 Oct 2009 21:49:16 -0400 Original-Received: from [199.232.76.173] (port=40645 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0mnf-00064s-JT for help-gnu-emacs@gnu.org; Wed, 21 Oct 2009 21:49:11 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:33273) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N0mne-0001Zp-Vn for help-gnu-emacs@gnu.org; Wed, 21 Oct 2009 21:49:11 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1N0mnZ-0008JS-Lk for help-gnu-emacs@gnu.org; Thu, 22 Oct 2009 03:49:05 +0200 Original-Received: from 85.183.18.158 ([85.183.18.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Oct 2009 03:49:05 +0200 Original-Received: from rileyrgdev by 85.183.18.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Oct 2009 03:49:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 59 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 85.183.18.158 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69147 Archived-At: Richard Riley writes: > I have followed the advice here: > > http://stackoverflow.com/questions/1259873/how-can-i-use-emacs-flymake-mode-for-python-with-pyflakes-and-pylint-checking-cod > > or > > http://tinyurl.com/yfshb5b > > And successfully have pylint and emacs highlighting errors in my .py > files courtesy of flymake. The problem is that I can't see anywhere the > actually error description. Can anyone help please? > > The epylint script I have is this: > > ,---- > | #!/usr/bin/env python > | > | import re > | import sys > | > | from subprocess import * > | > | p = Popen( > | "pylint -f parseable -r n %s"% > | sys.argv[1], shell = True, stdout = PIPE).stdout > | > | for line in p: > | match = re.search("\\[([WECR])(, (.+?))?\\]", line) > | if match: > | kind = match.group(1) > | func = match.group(3) > | > | if kind in ["W","C","R"]: > | msg = "Warning" > | else: > | msg = "Error" > | > | if func: > | line = re.sub("\\[([WECR])(, (.+?))?\\]", > | "%s (%s):" % (msg, func), line) > | else: > | line = re.sub("\\[([WECR])?\\]", "%s:" % msg, line) > | print line, > | > | p.close() > `---- > OK, its done so that you need to (yuck!) hover your mouse over the hilited error. Kind of in the face of keyboard driven emacs, but at least one can see the error. If anyone has a patch/fix/advice on how to change this to show the errors in a buffer and maybe next error/previous error then that would be great. In fact pylint.el does something like that but it would be nice in conjunction with the flymake dynamic code checking and error hiliting.