From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joseph Donaldson Newsgroups: gmane.emacs.bugs Subject: bug#2048: Flymake Enhancement Date: Sun, 25 Jan 2009 12:13:27 -0500 Message-ID: <1232903607.19724.17.camel@tadpole> Reply-To: Joseph Donaldson , 2048@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-ItEAY3Nq2y9DYRrucCxP" X-Trace: ger.gmane.org 1232910876 12059 80.91.229.12 (25 Jan 2009 19:14:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2009 19:14:36 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 25 20:15:50 2009 Return-path: Envelope-to: geb-bug-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 1LRASS-0000TU-2Q for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 20:15:48 +0100 Original-Received: from localhost ([127.0.0.1]:35130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRARA-00010r-8S for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 14:14:28 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LR8hp-00080U-VX for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:23:34 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LR8hp-0007zO-1B for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:23:33 -0500 Original-Received: from [199.232.76.173] (port=59493 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR8ho-0007yv-PW for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:23:32 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46296) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LR8ho-00031k-6v for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:23:32 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0PHNTOI025326; Sun, 25 Jan 2009 09:23:29 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n0PHK3sF024258; Sun, 25 Jan 2009 09:20:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Joseph Donaldson Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 25 Jan 2009 17:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2048 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123290362322928 (code B ref -1); Sun, 25 Jan 2009 17:20:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 25 Jan 2009 17:13:43 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0PHDd7O022920 for ; Sun, 25 Jan 2009 09:13:40 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LR8YE-00080y-Ms for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:13:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LR8YB-0007y4-VC for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:13:38 -0500 Original-Received: from [199.232.76.173] (port=49205 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR8YB-0007xj-IW for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:13:35 -0500 Original-Received: from rn-out-0910.google.com ([64.233.170.185]:36924) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LR8YB-0001Qa-BO for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:13:35 -0500 Original-Received: by rn-out-0910.google.com with SMTP id k50so1607492rnd.7 for ; Sun, 25 Jan 2009 09:13:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:content-type :date:message-id:mime-version:x-mailer; bh=aU7rwttG1KTID0m7Cq2oyn8UR9ijRtEIO8rHsZxVPqg=; b=i7JDO4BcraMcT4o/U5XuGlGn7JDB2tSy5FR+yFLZ0h1afFMcnBfvOnnf5JeTh5nzOn ChGZQLod99NCyg55WGKJj90cf23cL8CbtBCtFsiwxEFZP3mGhU09wjaffrNF15/Ivsoq T9rqtGYpQzLZeHaNMpGjTUaol5Y6hEICYeNas= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:content-type:date:message-id:mime-version:x-mailer; b=nTIM8Dk8VtDxIT/EJvOJQxGfbgfff4cYKwpEtlT258vhoAY75oYJDoTqrsJJnorXud SydO2bjqofur3/YfpUFgztUj1UbciNep+yZkVqWWT1L9UoFLbo26v/QYDlkZ42+xzboY tKEHHdTO9gWmwhL69gPc04a/A496MJ2Jdjne8= Original-Received: by 10.100.191.9 with SMTP id o9mr3299520anf.63.1232903613854; Sun, 25 Jan 2009 09:13:33 -0800 (PST) Original-Received: from ?192.168.2.3? (cpe-76-190-210-243.neo.res.rr.com [76.190.210.243]) by mx.google.com with ESMTPS id d21sm20253570and.46.2009.01.25.09.13.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 25 Jan 2009 09:13:33 -0800 (PST) X-Mailer: Evolution 2.24.3 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sun, 25 Jan 2009 12:23:33 -0500 X-Mailman-Approved-At: Sun, 25 Jan 2009 14:14:24 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24523 Archived-At: --=-ItEAY3Nq2y9DYRrucCxP Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello, I hope this is the right forum for submitting this patch for flymake. If it is not, please, direct me to the correct one. While working to get flymake to work with the bigloo scheme compiler I discovered that when it examines the compiler output it does so line-by-line. This prevents flymake in the case of bigloo from being able to show complete error/warning messages -- bigloo's error/warning messages span multiple lines. To remedy this, I introduced a buffer-local variable named flymake-split-output-pattern and modified the function flymake-split-output to use it when splitting the output into individual error/warning messages. The default value of flymake-split-output-pattern is "[\n\r]+"; this matches the value previously hard-coded in flymake-split-output. For bigloo, I added in my .emacs file a hook to bee-mode-hook to set the value flymake-split-ouput-pattern to "^[\r\n][\r\n]". This enabled flymake to display the full error/warning messages provided bigloo. The patch for this modification is attached. If there are any questions and or comments, I would appreciate hearing them. Thank You, Joseph Donaldson --=-ItEAY3Nq2y9DYRrucCxP Content-Disposition: attachment; filename="flymake.patch" Content-Type: text/x-patch; name="flymake.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit *** flymake.el 2009-01-25 11:38:32.000000000 -0500 --- flymake_mod.el 2009-01-25 11:44:06.000000000 -0500 *************** *** 67,72 **** --- 67,76 ---- "Same as `flymake-err-info', effective when a syntax check is in progress.") (make-variable-buffer-local 'flymake-new-err-info) + (defvar flymake-split-output-pattern "[\n\r]+" + "Regular expression used to split the output into individual error/warning messages") + (make-variable-buffer-local 'flymake-split-output-pattern) + ;;;; [[ cross-emacs compatibility routines (defsubst flymake-makehash (&optional test) (if (fboundp 'make-hash-table) *************** *** 863,869 **** Return last one as residual if it does not end with newline char. Returns ((LINES) RESIDUAL)." (when (and output (> (length output) 0)) ! (let* ((lines (flymake-split-string output "[\n\r]+")) (complete (equal "\n" (char-to-string (aref output (1- (length output)))))) (residual nil)) (when (not complete) --- 867,873 ---- Return last one as residual if it does not end with newline char. Returns ((LINES) RESIDUAL)." (when (and output (> (length output) 0)) ! (let* ((lines (flymake-split-string output flymake-split-output-pattern)) (complete (equal "\n" (char-to-string (aref output (1- (length output)))))) (residual nil)) (when (not complete) --=-ItEAY3Nq2y9DYRrucCxP--