From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Graham Newsgroups: gmane.emacs.help Subject: reading compile.el, modifying settings Date: Tue, 3 May 2011 07:03:43 -0700 (PDT) Message-ID: <1933055643.48627.1304431423078.JavaMail.root@aksu.oays-ds.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1304574767 15236 80.91.229.12 (5 May 2011 05:52:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 5 May 2011 05:52:47 +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 05 07:52:43 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QHrUQ-000069-HL for geh-help-gnu-emacs@m.gmane.org; Thu, 05 May 2011 07:52:42 +0200 Original-Received: from localhost ([::1]:44012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHrUQ-0004VV-3x for geh-help-gnu-emacs@m.gmane.org; Thu, 05 May 2011 01:52:42 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHHOy-0007St-3J for help-gnu-emacs@gnu.org; Tue, 03 May 2011 11:20:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHHOx-0006xz-89 for help-gnu-emacs@gnu.org; Tue, 03 May 2011 11:20:40 -0400 Original-Received: from [99.48.191.33] (port=35185 helo=mail.oasys-ds.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHHOw-0006wK-Sq for help-gnu-emacs@gnu.org; Tue, 03 May 2011 11:20:39 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.oasys-ds.com (Postfix) with ESMTP id CE128F6575 for ; Tue, 3 May 2011 07:03:43 -0700 (PDT) X-Virus-Scanned: amavisd-new at oasys-ds.com Original-Received: from mail.oasys-ds.com ([127.0.0.1]) by localhost (aksu.oasys-ds.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bSL5frOqdh6G for ; Tue, 3 May 2011 07:03:43 -0700 (PDT) Original-Received: from aksu.oasys-ds.com (localhost.localdomain [127.0.0.1]) by mail.oasys-ds.com (Postfix) with ESMTP id 669CCF64F8 for ; Tue, 3 May 2011 07:03:43 -0700 (PDT) X-Originating-IP: [192.168.2.225] X-Mailer: Zimbra 6.0.4_GA_2038.RHEL5_64 (ZimbraWebClient - FF3.0 (Linux)/6.0.4_GA_2038.RHEL5_64) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 99.48.191.33 X-Mailman-Approved-At: Thu, 05 May 2011 01:52:30 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80911 Archived-At: Dear emacs experts, I use compile mode, but I have my own set of compiler message regexps. I try to set them up as follows: .emacs: (load "compile") (load-file "~/emacs/compile-settings.el") compile-settings.el: (setq compilation-error-regexp-alist ... ) However, when I compile in emacs, I end up with the default compiler message regexps. I then have to manually eval the load of compile-settings.el to get my settings. I think that when emacs starts up, it picks up my setting for compilation-error-regexp-alist, but does not immediately load compile.elc. Then when I do my first compile, it loads compile.elc, and overwrites my settings. I thought that I could change my .emacs to explicitly load compile.elc, but this is not so easy. The 'load' function doesn't require an exact path, which makes it convenient to use -- it keeps working even when I switch to a newer version of emacs. If I use load-file instead, then I have to give the full path to compile.el or compile.elc, that is, I would have to duplicate all the friendly logic in 'load'. Any suggestions? Paul