[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I inhibit the copying of the source files to the build tree
From: |
Gary Oberbrunner |
Subject: |
Re: How do I inhibit the copying of the source files to the build tree |
Date: |
Fri, 15 Mar 2002 10:35:57 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.8) Gecko/20020204 |
Doug Alcorn wrote:
> Anyway, this is a personal pet peeve of mine. I bring it up on the
> list every so often. I think there are some work arounds for xemacs
> (what I use), I just haven't been able to get any of them to work.
Doesn't (setq find-file-existing-other-name t) work for you? I use gnu
emacs 21.1, not xemacs, but it works fine for me on IRIX and Linux.
There's also find-file-visit-truename, but I don't seem to need that.
In any case you can use my emacs compile.el patch, which lets you write
something like this in your .emacs:
(defun process-error-filename (filename)
(let ((case-fold-search t))
(replace-regexp-in-string
"build\\([\\/][^\\/]*\\)*[\\/]" "" filename)))
(setq compilation-parse-errors-filename-function
'process-error-filename)
You'd just need to fix the regexps for your own src and build trees, and
apply this patch to compile.el (gnu emacs 21.1):
--- /temp/compile-orig.el Wed Oct 24 13:32:44 2001
+++ /temp/compile.el Wed Oct 24 13:33:14 2001
@@ -1874,6 +1874,13 @@
(setq filename
(concat comint-file-name-prefix filename)))
+
;; If compilation-error-filename-hook is
+
;; defined, use it to process the filename.
+
(and (boundp 'compilation-error-filename-hook)
+
(setq filename
+
(funcall compilation-error-filename-hook
+
filename)))
+
;; Some compilers (e.g. Sun's java compiler, reportedly)
;; produce bogus file names like "./bar//foo.c" for file
;; "bar/foo.c"; expand-file-name will collapse these into
(apologies if line wrapping screws this up.)
-- Gary Oberbrunner