From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Rutt Newsgroups: gmane.emacs.help Subject: Re: compiling in C mode and the compilation buffer Date: Wed, 28 Jul 2004 17:41:18 -0400 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87acxjbyip.fsf@osu.edu> References: <20040724233448.3eab8cfa@localhost> <878yd766ol.fsf@osu.edu> <20040728022342.1a999383@localhost> <20040728023945.2d3d1697@localhost> <87y8l4b87o.fsf@osu.edu> <20040728212909.5bdfbad2@localhost> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1091050939 11424 80.91.224.253 (28 Jul 2004 21:42:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2004 21:42:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 28 23:42:03 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BpwBW-0004CU-00 for ; Wed, 28 Jul 2004 23:42:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BpwEf-0003o5-W8 for geh-help-gnu-emacs@m.gmane.org; Wed, 28 Jul 2004 17:45:18 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-X-Trace: news.uni-berlin.de T3RHNWXufqksUbFX9pe4jAVnNZtYql4bAYCzFeV1uEd1MRREA= Mail-Copies-To: nobody User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:bmt3dMNNnxEtvwQoodLuNc/dWnI= Original-Xref: shelby.stanford.edu gnu.emacs.help:124533 Original-To: help-gnu-emacs@gnu.org 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: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19868 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19868 Shug Boabie writes: > if this function were made more advanced... like parsing the whole output, > it would allow warning detection AND also auto jump-to the first line of > warnings/errors that the compile command produces. but thats an exercise > for the more confident elisp user :-) I can't help with the warning detection, but at least the following version will teleport you to the error line (I personally hated this when I had it this way though): (defun my-compilation-finish-function-standard (buf str) ;; avoid doing this for buffers created from M-x grep (when (string-match "*compilation.*" (buffer-name buf)) (if (string-match "exited abnormally" str) ;;there were errors (progn (message "compilation errors, press C-x ` to visit") (next-error 1)) ;;no errors, make the compilation window go away (run-at-time 0.5 nil 'delete-windows-on buf) (message "NO COMPILATION ERRORS!")))) -- Benjamin Rutt