unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* setting compile-command
@ 2011-04-27 15:49 Andrea Crotti
  2011-04-28 19:22 ` Thomas Hisch
  2011-05-09  2:20 ` Ken Goldman
  0 siblings, 2 replies; 5+ messages in thread
From: Andrea Crotti @ 2011-04-27 15:49 UTC (permalink / raw)
  To: Emacs help

It would be nice to set the compile-command for every project with
dir-local variables.
The problem is that the compile-command should be run from the root
directory of the project, but apparently it doesn't work like that
automatically and the "make" is run from the current position.

I ended up with something like "cd $PROJ_DIR && make" but I believe that
there must be a better way to do that, am I right?

-- 
GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
 of 2011-04-22 on plaetekopp



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: setting compile-command
  2011-04-27 15:49 setting compile-command Andrea Crotti
@ 2011-04-28 19:22 ` Thomas Hisch
  2011-04-30 14:40   ` Andrea Crotti
  2011-05-09  2:20 ` Ken Goldman
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Hisch @ 2011-04-28 19:22 UTC (permalink / raw)
  To: Andrea Crotti; +Cc: Emacs help

Thank you for the question! Coincidentally, I have the exact same
problem and I look forward to the answers!

Regards
Thomas

On Wed, Apr 27, 2011 at 5:49 PM, Andrea Crotti
<andrea.crotti.0@gmail.com> wrote:
> It would be nice to set the compile-command for every project with
> dir-local variables.
> The problem is that the compile-command should be run from the root
> directory of the project, but apparently it doesn't work like that
> automatically and the "make" is run from the current position.
>
> I ended up with something like "cd $PROJ_DIR && make" but I believe that
> there must be a better way to do that, am I right?
>
> --
> GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
>  of 2011-04-22 on plaetekopp
>
>



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: setting compile-command
  2011-04-28 19:22 ` Thomas Hisch
@ 2011-04-30 14:40   ` Andrea Crotti
  0 siblings, 0 replies; 5+ messages in thread
From: Andrea Crotti @ 2011-04-30 14:40 UTC (permalink / raw)
  To: Thomas Hisch; +Cc: Emacs help

Thomas Hisch <t.hisch@gmail.com> writes:

> Thank you for the question! Coincidentally, I have the exact same
> problem and I look forward to the answers!
>
> Regards
> Thomas
>

Yes it's a bit annoying, strange because I think it should be easy to
just get the path where the .dir-locals is...
One way would be of course to recurse backward looking for it, that
might be a solution, but I think there should be an easier one.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: setting compile-command
  2011-04-27 15:49 setting compile-command Andrea Crotti
  2011-04-28 19:22 ` Thomas Hisch
@ 2011-05-09  2:20 ` Ken Goldman
  2011-05-12 12:57   ` Oleksandr Gavenko
  1 sibling, 1 reply; 5+ messages in thread
From: Ken Goldman @ 2011-05-09  2:20 UTC (permalink / raw)
  To: help-gnu-emacs

I can offer a work around.

After you compile once from the root directory, emacs will create a
'compile' frame. Keep that frame available and M-x compile
from it.

On 04/27/2011 11:49 AM, Andrea Crotti wrote:
> It would be nice to set the compile-command for every project with
> dir-local variables. The problem is that the compile-command should
> be run from the root directory of the project, but apparently it
> doesn't work like that automatically and the "make" is run from the
> current position.
>
> I ended up with something like "cd $PROJ_DIR&&  make" but I believe
> that there must be a better way to do that, am I right?
>





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: setting compile-command
  2011-05-09  2:20 ` Ken Goldman
@ 2011-05-12 12:57   ` Oleksandr Gavenko
  0 siblings, 0 replies; 5+ messages in thread
From: Oleksandr Gavenko @ 2011-05-12 12:57 UTC (permalink / raw)
  To: help-gnu-emacs

On 09.05.2011 5:20, Ken Goldman wrote:
> I can offer a work around.
>
> After you compile once from the root directory, emacs will create a
> 'compile' frame. Keep that frame available and M-x compile
> from it.
>
Or after first compile just M-x recompile.

This command remember previous dir and build command.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-12 12:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-27 15:49 setting compile-command Andrea Crotti
2011-04-28 19:22 ` Thomas Hisch
2011-04-30 14:40   ` Andrea Crotti
2011-05-09  2:20 ` Ken Goldman
2011-05-12 12:57   ` Oleksandr Gavenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).