From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gabriele Lanaro Newsgroups: gmane.emacs.help Subject: flymake how to let him recognize a message as a warning Date: Sun, 6 Jun 2010 23:20:20 +0200 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e6d784e8a4cd830488631f41 X-Trace: dough.gmane.org 1275863487 3179 80.91.229.12 (6 Jun 2010 22:31:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 Jun 2010 22:31:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 07 00:31:25 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OLONG-0006OF-GA for geh-help-gnu-emacs@m.gmane.org; Mon, 07 Jun 2010 00:31:25 +0200 Original-Received: from localhost ([127.0.0.1]:60632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLONE-0001sc-8J for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jun 2010 18:31:20 -0400 Original-Received: from [140.186.70.92] (port=56169 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLNGZ-0004Fz-NZ for help-gnu-emacs@gnu.org; Sun, 06 Jun 2010 17:20:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLNGY-0004uQ-Hl for help-gnu-emacs@gnu.org; Sun, 06 Jun 2010 17:20:23 -0400 Original-Received: from mail-wy0-f169.google.com ([74.125.82.169]:49846) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLNGY-0004uK-Cq for help-gnu-emacs@gnu.org; Sun, 06 Jun 2010 17:20:22 -0400 Original-Received: by wyb42 with SMTP id 42so1214068wyb.0 for ; Sun, 06 Jun 2010 14:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=quRSxu9F5dfLLlCsa8rlTHBunjqOLySr+1RpbuuqXGk=; b=I5cquiPZQV9DuMzzozEAG3ZvM12LJqvqHqkxMrqjMxzG++yR8RVtOcjfWLGWn4aaAz BFNAwM7phBi3N3zm6ebhRuZ9JAssxOko8+sDnBjMyntPMQea2YmQ1/QYqnL8gakSw8k/ S1oYm4BGZh0brIlR457AjQdVMr6/a98UgonSM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=YVzs9nyWCiF3OovXob2Ue+wCmfR3AQA1wrHfBGH85A9r5l6aF6x0NSM8IFi4KCss3i g81kV3kCHXJX8aYaN+FOW5Zq18Y14zu6Hnj/J6jhQgrT7hB9jWsJ2/RLevXmFa+zgFh1 qxKBHev59z0dqcLautrItNSVmrK9Euz65N4nU= Original-Received: by 10.216.89.20 with SMTP id b20mr1694910wef.58.1275859220876; Sun, 06 Jun 2010 14:20:20 -0700 (PDT) Original-Received: by 10.216.38.205 with HTTP; Sun, 6 Jun 2010 14:20:20 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Sun, 06 Jun 2010 18:30:57 -0400 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:73838 Archived-At: --0016e6d784e8a4cd830488631f41 Content-Type: text/plain; charset=ISO-8859-1 I have an output form a checking program (pyflakes) like that: daemon_.py:3: 'pyqt' imported but unused I feel that this should be a warning, but pyflakes don't writes any "warning" message, it treat it as a common lint error. The current code to plug pyflakes in flymake is that one: (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)) There's a way to make the pattern: .."imported but unused$" to be highlighted as a warning and not as an error? --0016e6d784e8a4cd830488631f41 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I have an output form a checking program (pyflakes) like that:

daemo= n_.py:3: 'pyqt' imported but unused

I feel that this should = be a warning, but pyflakes don't writes any "warning" message= , it treat it as a common lint error.

The current code to plug pyflakes in flymake is that one:

=A0 (d= efun flymake-pyflakes-init ()
=A0=A0=A0=A0=A0 (let* ((temp-file (flymak= e-init-create-temp-buffer-copy
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 'flymake-create-temp-inplace))
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (local-file (file-relative-name
= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= temp-file
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 (file-name-directory buffer-file-name))))
=A0=A0=A0=A0= =A0=A0=A0 (list "pyflakes" (list local-file)))))
=A0 (add-to-list 'flymake-allowed-file-name-masks
=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 '("\\.py\\'" flymake-pyflakes= -init))


There's a way to make the pattern: .."imported = but unused$" to be highlighted as a warning and not as an error?
--0016e6d784e8a4cd830488631f41--