[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: opening correct source file on compile error
From: |
Ushnish Basu |
Subject: |
Re: opening correct source file on compile error |
Date: |
Mon, 23 Oct 2006 15:23:17 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> Ushnish Basu wrote:
>> I have a similar problem, except that my CVS has *.F files (in say ../src)
>> for
>> the fortran preprocessor, and make gives me corresponding *.f files in the
>> current directory. How would one modify the above example for this case?
>
> (add-hook 'find-file-hook
> (lambda ()
> (let* ((file (file-name-nondirectory buffer-file-name))
> alternate-file)
> (when (and (equal (file-name-extension file) "f")
> (file-exists-p
> (setq alternate-file
> (expand-file-name (concat
> (file-name-sans-extension file)
> ".F")
> "../src"))))
> (find-alternate-file alternate-file)))))
>
Great, thanks a bunch, I will try it out soon.
>> Sorry, I don't understand (e)lisp well enough to do it myself, but I am
>> planning to learn.
>
> You will be greatly rewarded for your efforts!
>
That's what I have heard. I just got Paul Graham's ANSI Common Lisp, so I will
go to elisp once I get familiar with lisp itself.
Ushnish
--
Ushnish Basu ubasu@ce.berkeley.edu
+1 510 644-1906 www.ce.berkeley.edu/~ubasu
- Re: opening correct source file on compile error, (continued)
- Message not available
- Re: opening correct source file on compile error, kl . vanw, 2006/10/20
- Re: opening correct source file on compile error, Kevin Rodgers, 2006/10/23
- Message not available
- Re: opening correct source file on compile error, kl . vanw, 2006/10/24
- Re: opening correct source file on compile error, Burton Samograd, 2006/10/24
- Re: opening correct source file on compile error, kl . vanw, 2006/10/24
- Re: opening correct source file on compile error, Burton Samograd, 2006/10/24
- Re: opening correct source file on compile error, Kevin Rodgers, 2006/10/24
- Message not available
- Re: opening correct source file on compile error, kl . vanw, 2006/10/25
Message not available