* Using javac with Emacs
@ 2009-09-18 11:13 Merciadri Luca
2009-09-18 12:15 ` Anselm Helbig
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 11:13 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I am using Emacs without JDE. When writing a .java file, then
compiling it e.g. using
$ javac myfile.java
, emacs does not recognize the comment. It is even worse, as emacs
does not allow me to type the whole command, because it does not
recognize what "javac" is. However, it works using a terminal (and
thus without Emacs). How can I manage to make it work?
Thanks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqza18ACgkQM0LLzLt8MhyvtgCgj+HLkDdlgwIhZ5+EXXHagd++
rgAAoKqJYfUSEEhlTkN4GmxJR5KrXNv2
=aY7z
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 11:13 Using javac with Emacs Merciadri Luca
@ 2009-09-18 12:15 ` Anselm Helbig
2009-09-18 12:59 ` Merciadri Luca
2009-09-18 12:41 ` Peter Dyballa
[not found] ` <mailman.6939.1253277697.2239.help-gnu-emacs@gnu.org>
2 siblings, 1 reply; 20+ messages in thread
From: Anselm Helbig @ 2009-09-18 12:15 UTC (permalink / raw
To: help-gnu-emacs
Hi!
> I am using Emacs without JDE. When writing a .java file, then
> compiling it e.g. using
> $ javac myfile.java
> , emacs does not recognize the comment. It is even worse, as emacs
> does not allow me to type the whole command, because it does not
> recognize what "javac" is. However, it works using a terminal (and
> thus without Emacs). How can I manage to make it work?
What does M-: (executable-find "javac") give you? Compare the output
of M-x show-variable<RET>exec-path<RET> with echo $PATH in your
shell. Do you start emacs from your shell? If not, does starting it
from the shell make the problem go away?
HTH,
Anselm
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 11:13 Using javac with Emacs Merciadri Luca
2009-09-18 12:15 ` Anselm Helbig
@ 2009-09-18 12:41 ` Peter Dyballa
[not found] ` <mailman.6939.1253277697.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 20+ messages in thread
From: Peter Dyballa @ 2009-09-18 12:41 UTC (permalink / raw
To: Merciadri Luca; +Cc: help-gnu-emacs
Am 18.09.2009 um 13:13 schrieb Merciadri Luca:
> It is even worse, as emacs
> does not allow me to type the whole command, because it does not
> recognize what "javac" is. However, it works using a terminal (and
> thus without Emacs). How can I manage to make it work?
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?). You could compare the value of the environment
variable PATH in both environments.
So what you need to do is to change your shell setup to have in a
"normal" shell at least the same value for PATH as in a login shell.
--
Greetings
Pete
Basic, n.:
A programming language. Related to certain social diseases in
that those who have it will not admit it in polite company.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 12:15 ` Anselm Helbig
@ 2009-09-18 12:59 ` Merciadri Luca
2009-09-18 13:26 ` Anselm Helbig
0 siblings, 1 reply; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 12:59 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Anselm Helbig <anselm.helbig+news2009@googlemail.com> writes:
> What does M-: (executable-find "javac") give you?
This command seems not to work on my (however standard) Emacs.
However, I can still do ESC ! to type a shell command, but it is
tedious.
> Compare the output
> of M-x show-variable<RET>exec-path<RET> with echo $PATH in your
> shell.
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games
Shouldn't I add some lines to this?
> Do you start emacs from your shell?
Yes.
> If not, does starting it
> from the shell make the problem go away?
Whatever the method of starting Emacs, there is no modification about
javac. (I tried both methods.)
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqzhEcACgkQM0LLzLt8Mhz6VACdHAe8eQy+g/XclpgQgp3dCV6/
fRwAn1Rpz2o4ytlZx5xMhu2VS9FXpJVE
=SKa+
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
[not found] ` <mailman.6939.1253277697.2239.help-gnu-emacs@gnu.org>
@ 2009-09-18 13:02 ` Merciadri Luca
2009-09-18 13:28 ` Anselm Helbig
2009-09-18 13:32 ` Pascal J. Bourguignon
0 siblings, 2 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 13:02 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
> You could compare the value of the environment
> variable PATH in both environments.
M-x then "echo" is not a recognized command. I think that M-x aims at
executing a limited set of (Emacs-)predefined commands. Am I right?
>
> So what you need to do is to change your shell setup to have in a
> "normal" shell at least the same value for PATH as in a login shell.
Using ESC-!, I can type any shell command, but the output of
echo $PATH
is still the same as in a real terminal (but that is normal).
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqzhPoACgkQM0LLzLt8Mhx8VQCfcdjLvkADOAQO+wDaNsCH8QNf
YXkAnjVBNGSP++G+ylnE1lQyRVdA4OdJ
=eeLw
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 12:59 ` Merciadri Luca
@ 2009-09-18 13:26 ` Anselm Helbig
2009-09-18 19:16 ` Merciadri Luca
2009-09-18 19:18 ` Merciadri Luca
0 siblings, 2 replies; 20+ messages in thread
From: Anselm Helbig @ 2009-09-18 13:26 UTC (permalink / raw
To: help-gnu-emacs
At Fri, 18 Sep 2009 14:59:51 +0200,
Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Anselm Helbig <anselm.helbig+news2009@googlemail.com> writes:
>
> > What does M-: (executable-find "javac") give you?
> This command seems not to work on my (however standard) Emacs.
What do you mean, it doesn't work? And what's a standard emacs,
anyway? GNU Emacs? What version?
> However, I can still do ESC ! to type a shell command, but it is
> tedious.
> > Compare the output
> > of M-x show-variable<RET>exec-path<RET> with echo $PATH in your
> > shell.
> $ echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/games
So what's the output of M-x show-variable <RET> exec-path <RET> ?
> Shouldn't I add some lines to this?
Not necessarily. What does
which javac
on the shell give you? Which is roughly equivalent to the
executable-find function I asked you to call before, btw.
> > Do you start emacs from your shell?
> Yes.
Hm, strange.
> > If not, does starting it
> > from the shell make the problem go away?
> Whatever the method of starting Emacs, there is no modification about
> javac. (I tried both methods.)
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 13:02 ` Merciadri Luca
@ 2009-09-18 13:28 ` Anselm Helbig
2009-09-18 15:47 ` Merciadri Luca
2009-09-18 13:32 ` Pascal J. Bourguignon
1 sibling, 1 reply; 20+ messages in thread
From: Anselm Helbig @ 2009-09-18 13:28 UTC (permalink / raw
To: help-gnu-emacs
At Fri, 18 Sep 2009 15:02:50 +0200,
Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> 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.
This can not work, because javac is not an emacs command. You have to
use M-! instead of M-x.
> > You could compare the value of the environment
> > variable PATH in both environments.
> M-x then "echo" is not a recognized command. I think that M-x aims at
> executing a limited set of (Emacs-)predefined commands. Am I right?
M-x is for calling emacs commands. I wouldn't call it limited, though,
there are some thousands.
M-! is for calling shell commands, M-: is for evaluation expressions
in emacs lisp.
> > So what you need to do is to change your shell setup to have in a
> > "normal" shell at least the same value for PATH as in a login shell.
> Using ESC-!, I can type any shell command, but the output of
> echo $PATH
> is still the same as in a real terminal (but that is normal).
HTH,
Anselm
--
Anselm Helbig
mailto:anselm.helbig+news2009@googlemail.com
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 13:02 ` Merciadri Luca
2009-09-18 13:28 ` Anselm Helbig
@ 2009-09-18 13:32 ` Pascal J. Bourguignon
2009-09-18 14:21 ` Richard Riley
2009-09-18 15:44 ` Merciadri Luca
1 sibling, 2 replies; 20+ messages in thread
From: Pascal J. Bourguignon @ 2009-09-18 13:32 UTC (permalink / raw
To: help-gnu-emacs
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
Perhaps you wanted to type:
M-x compile RET C-a C-k javac nameofmyfile RET
but that's something entirely different.
>> You could compare the value of the environment
>> variable PATH in both environments.
> M-x then "echo" is not a recognized command. I think that M-x aims at
> executing a limited set of (Emacs-)predefined commands. Am I right?
Right.
>> So what you need to do is to change your shell setup to have in a
>> "normal" shell at least the same value for PATH as in a login shell.
> Using ESC-!, I can type any shell command, but the output of
> echo $PATH
> is still the same as in a real terminal (but that is normal).
You should get the same path with:
M-x compile RET C-a C-k echo "$PATH" RET
than with:
M-! echo "$PATH" RET
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 13:32 ` Pascal J. Bourguignon
@ 2009-09-18 14:21 ` Richard Riley
2009-09-18 15:46 ` Merciadri Luca
2009-09-18 15:44 ` Merciadri Luca
1 sibling, 1 reply; 20+ messages in thread
From: Richard Riley @ 2009-09-18 14:21 UTC (permalink / raw
To: help-gnu-emacs
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".
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 13:32 ` Pascal J. Bourguignon
2009-09-18 14:21 ` Richard Riley
@ 2009-09-18 15:44 ` Merciadri Luca
1 sibling, 0 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 15:44 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
pjb@informatimago.com (Pascal J. Bourguignon) writes:
> You should get the same path with:
>
> M-x compile RET C-a C-k echo "$PATH" RET
> than with:
> M-! echo "$PATH" RET
>
That is the case. And?
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqzqvIACgkQM0LLzLt8Mhx2bgCfVmLCb7AxiWw1HjamlVgkNdd8
Eg0AoJp9TMTREs/+z5AUVQHF/ojcYbqD
=Fgzc
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 14:21 ` Richard Riley
@ 2009-09-18 15:46 ` Merciadri Luca
2009-09-18 16:36 ` Colin S. Miller
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 15:46 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Richard Riley <rileyrgdev@gmail.com> writes:
>> 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".
Okay. This command is not easy to keep in your head, but if it is
needed, okay.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqzq04ACgkQM0LLzLt8MhyP3QCfV0iAuu7mHggjpWbTnG2Cg1Z/
2r8An3Vpu1UUzJdqb8lsl9HYwk4eKVLw
=C0xc
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 13:28 ` Anselm Helbig
@ 2009-09-18 15:47 ` Merciadri Luca
0 siblings, 0 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 15:47 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Thanks for your answer, Anselm.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqzq4wACgkQM0LLzLt8MhwNLwCfZXxLo/8QSVupPDd4hrpfhXDZ
370An1hDlwUx3I1Wak7mCdfQmCc2+ZKr
=+c2g
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 15:46 ` Merciadri Luca
@ 2009-09-18 16:36 ` Colin S. Miller
2009-09-18 19:10 ` Merciadri Luca
2009-09-18 18:52 ` Peter Dyballa
[not found] ` <mailman.6973.1253299971.2239.help-gnu-emacs@gnu.org>
2 siblings, 1 reply; 20+ messages in thread
From: Colin S. Miller @ 2009-09-18 16:36 UTC (permalink / raw
To: help-gnu-emacs
Merciadri Luca wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Richard Riley <rileyrgdev@gmail.com> writes:
>
>>> Perhaps you wanted to type:
>>>
>>> M-x compile RET C-a C-k javac nameofmyfile RET
>>>
> needed, okay.
>
Merciadri,
I have this in my .xemacs/init.el
(The Xemacs equivalent of .emacs).
I'm not sure if the key-definition
syntax is correct for FSF Emacs.
It defines M-! c to run (compile),
as I use compile frequently.
HTH,
Colin S. Miller
(global-unset-key '[(meta !)])
(global-set-key '[(meta !) (meta !)] 'shell-command)
(global-set-key '[(meta !) c] 'compile)
(global-set-key '[(meta !) g] 'grep)
(global-set-key '[(meta !) s] 'shell)
(when (eq system-type 'windows-nt)
(defun csm-handle-start-dot ()
(interactive)
(shell-command "start .")
)
(global-set-key '[(meta !) \.] 'csm-handle-start-dot)
)
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 15:46 ` Merciadri Luca
2009-09-18 16:36 ` Colin S. Miller
@ 2009-09-18 18:52 ` Peter Dyballa
[not found] ` <mailman.6973.1253299971.2239.help-gnu-emacs@gnu.org>
2 siblings, 0 replies; 20+ messages in thread
From: Peter Dyballa @ 2009-09-18 18:52 UTC (permalink / raw
To: Merciadri Luca; +Cc: help-gnu-emacs
Am 18.09.2009 um 17:46 schrieb Merciadri Luca:
> This command is not easy to keep in your head, but if it is
> needed, okay.
If you are usually compiling Java sources, then you can customise the
variable compile-command to become javac instead of 'make -k'.
--
Greetings
Pete
There's no place like ~
– (UNIX Guru)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
[not found] ` <mailman.6973.1253299971.2239.help-gnu-emacs@gnu.org>
@ 2009-09-18 19:10 ` Merciadri Luca
0 siblings, 0 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 19:10 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> If you are usually compiling Java sources, then you can customise the
> variable compile-command to become javac instead of 'make -k'.
Nice idea. Thanks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqz2wgACgkQM0LLzLt8MhwCpQCeOCoDvKy8EepLeV3l3n+tDPXt
FxQAn0Vk1oLCc+UlcWp1zi2gmEe7D8EU
=LIAM
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 16:36 ` Colin S. Miller
@ 2009-09-18 19:10 ` Merciadri Luca
0 siblings, 0 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 19:10 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:
> Merciadri Luca wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Richard Riley <rileyrgdev@gmail.com> writes:
>>
>>>> Perhaps you wanted to type:
>>>>
>>>> M-x compile RET C-a C-k javac nameofmyfile RET
>>>>
>> needed, okay.
>>
> Merciadri,
>
> I have this in my .xemacs/init.el
> (The Xemacs equivalent of .emacs).
> I'm not sure if the key-definition
> syntax is correct for FSF Emacs.
>
> It defines M-! c to run (compile),
> as I use compile frequently.
>
> HTH,
> Colin S. Miller
>
> (global-unset-key '[(meta !)])
> (global-set-key '[(meta !) (meta !)] 'shell-command)
> (global-set-key '[(meta !) c] 'compile)
> (global-set-key '[(meta !) g] 'grep)
> (global-set-key '[(meta !) s] 'shell)
>
> (when (eq system-type 'windows-nt)
> (defun csm-handle-start-dot ()
> (interactive)
> (shell-command "start .")
> )
> (global-set-key '[(meta !) \.] 'csm-handle-start-dot)
> )
Thanks for this. I have saved it.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqz2yQACgkQM0LLzLt8Mhx82QCfYs568MZCQLuFau4N5lIzcSM2
TpgAnixz3UGNJBQULw9nfTL49qABnuiD
=SLvS
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 13:26 ` Anselm Helbig
@ 2009-09-18 19:16 ` Merciadri Luca
2009-09-18 19:18 ` Merciadri Luca
1 sibling, 0 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 19:16 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Anselm Helbig <anselm.helbig+news2009@googlemail.com> writes:
> At Fri, 18 Sep 2009 14:59:51 +0200,
> Merciadri Luca <Luca.Merciadri@student.ulg.ac.be> wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Anselm Helbig <anselm.helbig+news2009@googlemail.com> writes:
>>
>> > What does M-: (executable-find "javac") give you?
>> This command seems not to work on my (however standard) Emacs.
>
> What do you mean, it doesn't work? And what's a standard emacs,
> anyway? GNU Emacs? What version?
It show me
"Trailing garbage following expression". It also does this when typing
executable-find javac
. Why? I am using GNU Emacs 22.2.1. Sorry for my imprecisions.
>
>> However, I can still do ESC ! to type a shell command, but it is
>> tedious.
>> > Compare the output
>> > of M-x show-variable<RET>exec-path<RET> with echo $PATH in your
>> > shell.
>> $ echo $PATH
>> /usr/local/bin:/usr/bin:/bin:/usr/games
>
> So what's the output of M-x show-variable <RET> exec-path <RET> ?
I would like to be able to give it to you, but M-x show-variable
returns "[No match]".
>
>> Shouldn't I add some lines to this?
>
> Not necessarily. What does
>
> which javac
>
> on the shell give you? Which is roughly equivalent to the
> executable-find function I asked you to call before, btw.
It gives /usr/bin/javac .
>
>> > Do you start emacs from your shell?
>> Yes.
>
> Hm, strange.
I know.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqz3IMACgkQM0LLzLt8Mhx35gCeM7SAwS4De5NLMOwjWo+S8JvG
CGgAn13fOFertsp31g77gQQ6trfEhxba
=QJNO
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 13:26 ` Anselm Helbig
2009-09-18 19:16 ` Merciadri Luca
@ 2009-09-18 19:18 ` Merciadri Luca
2009-09-18 20:04 ` Peter Dyballa
[not found] ` <mailman.6981.1253304267.2239.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-18 19:18 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
What I find *really* strange is that, according to my $PATH variable
(assuming the kernel recursively looks in directories when such a
variable is specified), javac's directory should be detected. However,
it is not the case. I do not understand.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkqz3OsACgkQM0LLzLt8Mhy3agCfQyJ7rtUa/RHaLRLOjM+9SNrM
DuIAn0MKfuifT7N+p5AW11Kr9V8a0fiI
=vXzC
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
2009-09-18 19:18 ` Merciadri Luca
@ 2009-09-18 20:04 ` Peter Dyballa
[not found] ` <mailman.6981.1253304267.2239.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 20+ messages in thread
From: Peter Dyballa @ 2009-09-18 20:04 UTC (permalink / raw
To: Merciadri Luca; +Cc: help-gnu-emacs
Am 18.09.2009 um 21:18 schrieb Merciadri Luca:
> What I find *really* strange is that, according to my $PATH variable
> (assuming the kernel recursively looks in directories when such a
> variable is specified),
The kernel never does such silly things. This is performed by some
shell. (The kernel even has no idea of a concept named "PATH.")
> javac's directory should be detected.
This is no executable and therefore adding it to $PATH is, in
politically correct words, not recommended.
--
Greetings
Pete
To most people solutions mean finding the answers. But to chemists
solutions
are things that are still all mixed up.
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: Using javac with Emacs
[not found] ` <mailman.6981.1253304267.2239.help-gnu-emacs@gnu.org>
@ 2009-09-19 8:21 ` Merciadri Luca
0 siblings, 0 replies; 20+ messages in thread
From: Merciadri Luca @ 2009-09-19 8:21 UTC (permalink / raw
To: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
>> javac's directory should be detected.
>
> This is no executable and therefore adding it to $PATH is, in
> politically correct words, not recommended.
That is what I thought. My problem is solved using M-x compile RET
javac foo.java RET
Thanks.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iEYEARECAAYFAkq0lHQACgkQM0LLzLt8MhyJJACgpiZvKaAN1PqbLOFg9VjsbTny
rsEAn06P1/PeszwfBcgTEo7RJyboV1cV
=zrDW
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2009-09-19 8:21 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-18 11:13 Using javac with Emacs Merciadri Luca
2009-09-18 12:15 ` Anselm Helbig
2009-09-18 12:59 ` Merciadri Luca
2009-09-18 13:26 ` Anselm Helbig
2009-09-18 19:16 ` Merciadri Luca
2009-09-18 19:18 ` Merciadri Luca
2009-09-18 20:04 ` Peter Dyballa
[not found] ` <mailman.6981.1253304267.2239.help-gnu-emacs@gnu.org>
2009-09-19 8:21 ` Merciadri Luca
2009-09-18 12:41 ` Peter Dyballa
[not found] ` <mailman.6939.1253277697.2239.help-gnu-emacs@gnu.org>
2009-09-18 13:02 ` Merciadri Luca
2009-09-18 13:28 ` Anselm Helbig
2009-09-18 15:47 ` Merciadri Luca
2009-09-18 13:32 ` Pascal J. Bourguignon
2009-09-18 14:21 ` Richard Riley
2009-09-18 15:46 ` Merciadri Luca
2009-09-18 16:36 ` Colin S. Miller
2009-09-18 19:10 ` Merciadri Luca
2009-09-18 18:52 ` Peter Dyballa
[not found] ` <mailman.6973.1253299971.2239.help-gnu-emacs@gnu.org>
2009-09-18 19:10 ` Merciadri Luca
2009-09-18 15:44 ` Merciadri Luca
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.