Questions tagged [compilation]

Running compilers, and more generally building software from within Emacs.

Filter by
Sorted by
Tagged with
9
votes
1answer
1k views

Jumping to the first error — not warning — when compiling

The compilation-auto-jump-to-first-error option should make Emacs jump to the first error during compilation. However, it seems that Emacs treats warnings and errors in the same way, and jumps to the ...
12
votes
3answers
495 views

emphasise the current error in the *compilation* window

When running the compile command and jumping to the 'next error', emacs identifies the line of the current error by placing a little black triangle, pointing right, in the left-hand fringe of the *...
1
vote
0answers
50 views

Can I have a separate shell switch when compiling?

Whenever I use M-x compile, I like to have the shell that's running to be configured with bash -ic so that I can easily type the compilation command (I switch between languages often, so the building ...
0
votes
1answer
282 views

Changing the default-directory of an open compilation buffer

I have two different compile commands, and they need to run in different directories. I've gone through the trouble of making sure that if at all possible, I re-use the open compile buffer, rather ...
2
votes
1answer
55 views

Automatically reply to input-requests in compilation buffer

My situation is this: I compile by invoking a system that runs perl scripts that invoke the Visual Studio compiler, as well as running some pre-compile tasks. By and large, the system works fine. ...
2
votes
2answers
247 views

Does your project use Elisp for build automation?

I'm building a new appliance, linking BusyBox with Tor on top of a minimal GNU/Linux operating system. I'd like to try something different for the automated build infrastructure with this one and ...
2
votes
3answers
543 views

Changing or adding compiling options in cc-mode

In cc-mode, when we go to compile, M-x followed by compile, the default option is make -k. If I hit the down arrow, I am told no defaults available. Is it possible to add the option g++ -Wall ...
9
votes
2answers
795 views

How do I declare a variable ignorable?

How do I avoid byte-compiler warnings Unused lexical variable in functions defined using macros expanding to defun? E.g., macro defun-rcirc-command in rcirc.el uses the target variable which is not ...
1
vote
1answer
381 views

How to do remote compile on Windows from Linux

How can I configure Emacs, such that I am able to compile files remotely on a Windows machine, while Emacs is running under Linux? I am using tramp via the smb method to edit files on the Windows ...
2
votes
1answer
49 views

Running process interactively (like compilation) but without parsing

Is there any command which let me observe output of async-called process (just like M-x compile), but does not try to parse output buffer? Background: for quite a lot of non-compilation tasks (hg ...
2
votes
1answer
88 views

How to access the original buffer when running M-x compile and friends?

For example, take any buffer. Maybe one named my-file. I want to run M-x compile in it and have access to the my-file buffer in compilation-finish-functions. You'd think think might work: (setq ...
2
votes
0answers
387 views

.dir-locals.el isn't recognized

I am working on a project that includes some configuration in .dir-locals.el: ((c++-mode . ((compile-command . "cd ../../\; ./build.sh")))) This gets picked up just fine for me and sets the ...
1
vote
3answers
449 views

Change Default Compiler Within Emacs? [closed]

I asked this question originally on StackOverflow. I use M-x compile within Emacs to compile my C code which then initiates make -k and allows me to compile the code. I wish to use Clang (or ...
2
votes
1answer
219 views

Sharing *compilation* window with other compilation-like commands

Is it possible to make a few different commands share a window for their output? For example, let's say I do M-x compile and get a *compilation* buffer in bottom half of my frame. If I then do M-x ack ...
2
votes
0answers
484 views

Configure.ac options when building from source

Disclaimer: newbie to emacs, vaguely competent on MacOS and git. I'm building emacs on OSX Yosemite from the git master repo. I've done this several times, primarily by using ./configure --with-ns -...
0
votes
1answer
40 views

Why are my compilations executed in the parent of `default-directory`?

When I run compile, I'm seeing a strange behavior where the shell command is being executed in the parent of default-directory rather than default-directory itself. Here's an example of what I'm doing:...
9
votes
2answers
2k views

Recursively go up to find Makefile and compile

The problem with M-x compile is that if the Makefile isn't in the current directory, it fails. I'd like to have a function that recursively goes up to find a Makefile and run make from this directory....
7
votes
1answer
1k views

What Emacs feature is nearest to Vim's quickfix?

The common use of Vim's quickfix is to hand off compilation of code to a command specified by the suggestively named makeprg variable and then interpret the errors printed by that command so you can ...
6
votes
1answer
342 views

What are the advantages of building Emacs from source?

I use precompiled Emacs binaries (24.3) right now. AFAIK, v24.4 is already available as binaries, so there is no incentive for me to compile Emacs myself to stay current. I'm thinking, however, ...
7
votes
3answers
2k views

Where to find missing dependencies (imagemagick and m17n)

I am compiling Emacs from source and can't figure out what libraries I need to enable imagemagick and m17n. I have imagemagick and libm17n-dev installed (I am on Debian). My ./configure script says: ...
0
votes
1answer
541 views

Flymake: no buildfile (Makefile) found

Let's say that I have a makefile in ./ and a file ./package/myclass.java. From ./, make works just normally, but using flymake-mode in Emacs, I always get the error Flymake: No buildfile (Makefile) ...
6
votes
2answers
1k views

Press F5 to save, compile, and run current rust file

Similar to Visual Studio, when working with Rust programs, I'd like to press F5 to save the current file, compile it, and run it. What's a good way to do this?
8
votes
3answers
902 views

Persistent environment for M-x compile

When I run M-x compile it spawns a new subshell to execute my compile command. As soon as the compile command returns, the shell process is killed. I can see why this would be desirable in most cases, ...
8
votes
2answers
3k views

How can I customize the compile command?

In one of my projects I need to run make package install when building instead of make. It remembers the last compile command I used, but resets to make -k every time emacs starts up. How can I ...
51
votes
9answers
25k views

Using Emacs as a full-featured C/C++ IDE

I have been trying off and on for over a year now to use Emacs as a C/C++ IDE. I have only been marginally successful thus far, but have run into a few brick walls along the way. Currently I am ...
21
votes
4answers
3k views

Hide *compilation* window

It is annoying to see the compilation window appear when it is successful. How to remove that automatically? I want to see it though if it is not successful.