help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using javac with Emacs


From: Richard Riley
Subject: Re: Using javac with Emacs
Date: Fri, 18 Sep 2009 16:21:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

pjb@informatimago.com (Pascal J. Bourguignon) writes:

> Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> writes:
>
>> Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>>
>>> It seems as if your "terminal" runs a login shell while GNU Emacs
>>> does not (in which interactive buffer, shell, eshell, term are you
>>> invoking javac?).
>> Using M-x then typing "javac nameofmyfile". That's the same way as I
>> habitually do "make -B *.c", for example.
>
> Not unless you defined a command named make--B-*.c
>
> Typing M-x "javac nameofmyfile" RET may work only if you defined a
> command named \"javac\ nameofmyfile\".
>
> (defun \"javac\ nameofmyfile\" ()
>   (interactive)
>   (do-something))
>
> And then, yes, you may type M-x "javac nameofmyfile" RET

Wouldn't it just be easier to say he needed to use "M-! javac blah.java"
? it's a very common error on the part of newcomers to Emacs.

>
>
>
> Perhaps you wanted to type:
>
>      M-x compile RET C-a C-k javac nameofmyfile RET
>
> but that's something entirely different.

As a side note to the OP, using compile is much nicer since there are
helped functions such as "next-error" which helps navigate to bad
lines. In my c buffers for example I bind F11 to "next-error".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]