all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Phil Carmody <thefatphil_demunged@yahoo.co.uk>
To: help-gnu-emacs@gnu.org
Subject: compilation/grep buffer advice
Date: Thu, 07 Aug 2008 17:25:12 +0300	[thread overview]
Message-ID: <87r6906gxj.fsf@nonospaz.fatphil.org> (raw)

I like the idea of burying the result of a successful 
compilation, but keeping errors visible, and started 
using the code snippet that was recently posted here 
to achieve that.

However, I got annoyed by it burying grep results too.
This quick hack overcomes that limitation, but I'm not
sure what kind of condition to include to test the buffer
name:

(setq compilation-finish-function
      (lambda (buf str)
        (if (string-match "compilation" (buffer-name buf))
            (if (string-match "exited abnormally" str)
                (message "compilation errors, press C-x ` to visit")
              (run-at-time 1 nil 'delete-windows-on buf)
              (message "NO COMPILATION ERRORS!"))
          (message "didn't look like a compilation"))))


What other kinds of functions apart from grep use compilation 
mode? Is it better to have 'compilation' a special case to be
handled by optionally burying, or 'grep' the special case that
does nothing? 

Phil
-- 
Dear aunt, let's set so double the killer delete select all.
-- Microsoft voice recognition live demonstration


             reply	other threads:[~2008-08-07 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-07 14:25 Phil Carmody [this message]
2008-08-08  3:19 ` compilation/grep buffer advice Kevin Rodgers
     [not found] ` <mailman.16056.1218165582.18990.help-gnu-emacs@gnu.org>
2008-08-08 10:20   ` Phil Carmody

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

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

  git send-email \
    --in-reply-to=87r6906gxj.fsf@nonospaz.fatphil.org \
    --to=thefatphil_demunged@yahoo.co.uk \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.