From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ig0r Newsgroups: gmane.emacs.help Subject: Re: making Flymake work with PHP Date: Thu, 14 May 2009 09:08:44 -0700 (PDT) Organization: http://groups.google.com 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=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1242319286 2373 80.91.229.12 (14 May 2009 16:41:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 May 2009 16:41:26 +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 May 14 18:41:19 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 1M4dzb-0003Zj-Ja for geh-help-gnu-emacs@m.gmane.org; Thu, 14 May 2009 18:41:11 +0200 Original-Received: from localhost ([127.0.0.1]:43421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4dzb-0005ZU-2j for geh-help-gnu-emacs@m.gmane.org; Thu, 14 May 2009 12:41:11 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!z7g2000vbh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 78 Original-NNTP-Posting-Host: 91.124.80.198 Original-X-Trace: posting.google.com 1242317324 6952 127.0.0.1 (14 May 2009 16:08:44 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 14 May 2009 16:08:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z7g2000vbh.googlegroups.com; posting-host=91.124.80.198; posting-account=M24cuwoAAABX_45W-BaxkVxNGJ_iyDmp User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 (.NET CLR 3.5.30729), gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:169174 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:64439 Archived-At: On May 14, 6:37=A0pm, Lennart Borgman wrote: > 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-ch... > > 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 =A0'("\\(Parse\\|Fatal\\) error:= + > > \\(.*?\\) in \\(.*?\\) on line \\([0-9]+\\)$" 3 4 nil 2)) > > > So PHP errors should look like: > > "Parse | Fatal error ... in ....php =A0on line .. =A0" =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 () > > =A0"Use php to check the syntax of the current file." > > =A0(let* ((temp (flymake-init-create-temp-buffer-copy 'flymake-create- > > temp-inplace)) > > =A0 =A0 =A0 =A0 (local (file-relative-name temp (file-name-directory bu= ffer-file- > > name)))) > > =A0 =A0(list "php" (list "-f" local "-l")))) > > > (add-to-list 'flymake-err-line-patterns > > =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 m= enus: > > =A0 =A0nXhtml > =A0 =A0 =A0 =A0Tools > =A0 =A0 =A0 =A0 =A0 =A0 Flymake Mode > > Can you please try that? Thanks for you reply! I actually do that, but it's behavior is the same. Not a word from php :(