From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: making Flymake work with PHP Date: Thu, 14 May 2009 17:37:36 +0200 Message-ID: References: <25b6b34d-b9f5-44d1-a969-544e218fe668@n4g2000vba.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1242315491 20226 80.91.229.12 (14 May 2009 15:38:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 May 2009 15:38:11 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Ig0r Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 14 17:38:04 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 1M4d0W-0008Sv-Ef for geh-help-gnu-emacs@m.gmane.org; Thu, 14 May 2009 17:38:04 +0200 Original-Received: from localhost ([127.0.0.1]:47077 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4d0V-0005tX-HW for geh-help-gnu-emacs@m.gmane.org; Thu, 14 May 2009 11:38:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4d0B-0005tR-LN for help-gnu-emacs@gnu.org; Thu, 14 May 2009 11:37:43 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4d06-0005sv-6m for help-gnu-emacs@gnu.org; Thu, 14 May 2009 11:37:42 -0400 Original-Received: from [199.232.76.173] (port=56369 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4d05-0005sj-So for help-gnu-emacs@gnu.org; Thu, 14 May 2009 11:37:37 -0400 Original-Received: from mail-fx0-f169.google.com ([209.85.220.169]:56520) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M4d05-0003lW-CU for help-gnu-emacs@gnu.org; Thu, 14 May 2009 11:37:37 -0400 Original-Received: by fxm17 with SMTP id 17so1468206fxm.42 for ; Thu, 14 May 2009 08:37:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0uDbKrKoeL31Ihqz5txRB6mB2PI4UnK32l/YC2bGQzc=; b=QDZDM2YqRa8Qee+rflH9wG/lo3mJy5MGaarp3Xjja3x5QUvA3x/SJkkcwzMHtj1mxu kfSSXedi41m0kPqxUjy9A5SdpEtgnTyXlymLrU4I3UHoVjn9xjrX9v7XU9UAK5y5xu81 h/sRDt0BZEA7//tlCtKv6uv+Aq/sKYKW9JZpI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=A3iv+E9S1FMQ5P058BVPJ9v1dUmKaF4AhyizQYPRUU/KEDQqrYubMYXDJ8g4XBDkJq xByyVzOQYt2mimG+d+wkrSTiRgVMe7jJM2v5aahsO/2HgqGgfQ5ZYXkIs9rb1DQsyC/E hPYv0v5KeDBcuUYIi+Ljh2zIJatfPC+C0XKx4= Original-Received: by 10.223.113.9 with SMTP id y9mr1783387fap.61.1242315456518; Thu, 14 May 2009 08:37:36 -0700 (PDT) In-Reply-To: <25b6b34d-b9f5-44d1-a969-544e218fe668@n4g2000vba.googlegroups.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:64435 Archived-At: On Thu, May 14, 2009 at 4:35 PM, Ig0r wrote: > Hello, GNU Emacs Community! > I'm new to emacs and I try to make Flymake work in php-mode. > I have nXhtml installed (it has its flymake) > I've took the flymake-php from: > http://sachachua.com/wp/2008/07/31/emacs-and-php-on-the-fly-syntax-checki= ng-with-flymake/ > and added those lines to my ~/.emacs > > If I use M-x flymake-display-err-menu-for-current-line it displays an > error in format: > parse error > parse error > > But in flymake-php I can see lines: > add-to-list 'flymake-err-line-patterns =C2=A0'("\\(Parse\\|Fatal\\) error= : + > \\(.*?\\) in \\(.*?\\) on line \\([0-9]+\\)$" 3 4 nil 2)) > > So PHP errors should look like: > "Parse | Fatal error ... in ....php =C2=A0on line .. =C2=A0" =C2=A0? > > What may be the problem for that? > > In my ~/.emacs I load nXhtml first: > > ;;nXHTML mode and all that comes with it (MuMaMo...) > (setq rng-schema-loader-alist '(("rnc" . rng-c-load-schema))) > (add-hook 'nxml-mode-hook 'rng-nxml-mode-init) > (add-hook 'nxml-mode-hook 'nxml-enable-unicode-char-name-sets) > > (load "c:/program files/emacs-22.3/site-lisp/nxhtml/autostart.el") > > (define-key global-map "\C-cd" 'flymake-display-err-menu-for-current- > line) > (define-key global-map "\C-cn" 'flymake-goto-next-error) > > (require 'flymake) > > (defun flymake-php-init () > =C2=A0"Use php to check the syntax of the current file." > =C2=A0(let* ((temp (flymake-init-create-temp-buffer-copy 'flymake-create- > temp-inplace)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 (local (file-relative-name temp (file-name-di= rectory buffer-file- > name)))) > =C2=A0 =C2=A0(list "php" (list "-f" local "-l")))) > > (add-to-list 'flymake-err-line-patterns > =C2=A0'("\\(Parse\\|Fatal\\) error: +\\(.*?\\) in \\(.*?\\) on line \\ > ([0-9]+\\)$" 3 4 nil 2)) > > (add-to-list 'flymake-allowed-file-name-masks '("\\.php$" flymake-php- > init)) > > (add-to-list 'flymake-allowed-file-name-masks '("\\.inc$" flymake-php- > init)) > > (add-hook 'php-mode-hook (lambda () (flymake-mode 1))) > > Is someone familiar with this? > Hi Igor, There is a flymake-php.el included in nXhtml. You turn that on from the men= us: nXhtml Tools Flymake Mode Can you please try that?