unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Shug Boabie <no.spam@example.com>
Subject: Re: compiling in C mode and the compilation buffer
Date: Wed, 28 Jul 2004 01:40:05 +0000 (UTC)	[thread overview]
Message-ID: <20040728023945.2d3d1697@localhost> (raw)
In-Reply-To: 20040728022342.1a999383@localhost

Shug Boabie wrote:

> excellent, however i would still like the window to remain open upon
> detection of warnings as well [in order to force me to write ISO C99 code
> :-)]. i use the compile command exclusively for C code, so a grep for
> "warning:" should be sufficient. however, my attempts to customise your
> function have failed. any further hints?

for the record, here is what i have been trying to do, but it is not
working:

(defun sam-compile (buf str)
  (when (string-match "*compilation.*" (buffer-name buf))
    (if (string-match "exited abnormally" str)
	(progn
          (message "compilation errors, press C-x ` to view"))
      (if (string-match "warning:" str)
          (progn
            (message "compilation warnings, press C-x ` to view"))
        (run-at-time 0.5 nil 'delete-windows-on buf)
        (message "no compile errors or warnings")))))

i have tried to do

 if (grep==error)
    error
 else if (grep==warning)
    warning
 else
    everything ok

but my elisp is not the best

  reply	other threads:[~2004-07-28  1:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-24 22:35 compiling in C mode and the compilation buffer Shug Boabie
2004-07-25 22:52 ` Benjamin Rutt
2004-07-28  1:24   ` Shug Boabie
2004-07-28  1:40     ` Shug Boabie [this message]
2004-07-28 12:57       ` Benjamin Rutt
2004-07-28 20:29         ` Shug Boabie
2004-07-28 21:41           ` Benjamin Rutt
2004-07-26 22:59 ` Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040728023945.2d3d1697@localhost \
    --to=no.spam@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).