Hello,
I'm trying to setup GNU emacs to do some SIMPLE java work for me.
I'm working in a given folder, and want to just edit and compile programs in this one folder.
In my .emacs, I have:
Code:
(setq compile-command (concat "javac " (buffer-name)))
I cd to the folder, and run emacs sample.java
I edit the file, and then in emacs, I M-x compile.
The problem, is that in the minibuffer, it shows:
Compile command: javac *scratch*
instead of javac sample.java
Why is this? The buffer *scratch* is (by default) open, but is NOT in the one visible window - sample.java is.
How to I get this to use the correct buffer name for the active buffer?