Questions tagged [compilation]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

Address autocompletion doesn't work after compiling `elc` files for `mu4e`

After compiling elc files for mu4e in /usr/local/share/emacs/site-lisp/mu4e (Ubuntu 20.04) with sudo emacs -Q -batch -L . -f batch-native-compile *.el I get this error when writing an address of the ...
0
votes
1answer
10 views

With incremental compilation and changed files `compilation-goto-error` moves to wrong line

I work on a typescript project that I compile with webpack serve, using projectile-run-project. My *compilation buffer shows the webpack output, which includes typescript errors. After some webpack ...
0
votes
2answers
31 views

Prevent `(keyboard-quit)` from closing `*compile*` windows

After a recent update to my Spacemacs install, I noticed that C-g i.e. keyboard-quit closes *compilation* buffers that result from an M-x recompile. How can I prevent this behavior? I don't want C-g ...
0
votes
1answer
33 views

Cannot make `compile-command` buffer local

I've tried making compile-command buffer-local via (defun compilation-make-locals (process) (set (make-local-variable 'compile-command) compile-command)) (add-hook 'compilation-start-hook '...
0
votes
1answer
33 views

Controlling Behaviour of (Compilation) Window Creation

How do I control whether the output buffer *Compile* of M-x compile will be shown in an existing window or in a new window by splitting an existing window ? My problem is that the compilation buffer ...
0
votes
1answer
160 views

Adding a pattern to compilation-error-regexp-alist

I'm using the latest Doom Emacs on Emacs 27 with this config: https://github.com/gregghz/doom-config/tree/d3af4724cb4a5dd379645580698f7d24a5c3922a. I have this code to run a bloop command (like bloop ...
0
votes
1answer
73 views

compilation sentinel: symbol's value as variable is void for quote, >, <, =, etc

I'm working on a script that can compile multiple directories and then provide the first error to a file. Currently, I am tackling the issue of running make in multiple directories portion. I am ...
10
votes
4answers
5k views

Compile emacs from feature/native-comp (gccemacs) branch on Ubuntu

I want to compile the gccemacs branch of Emacs. When I run ./configure, the configure script errors with: cd emacs git checkout feature/native-comp ./autogen.sh ./configure --with-nativecomp ...
0
votes
1answer
507 views

How do I build emacs from sources on macOS Catalina Version 10.15.4

I typically run gnuemacs using MacPorts. However, I have a friend who does not have admin on his managed mac, so I want to build for him a full release of emacs that will run out of his home directory....
0
votes
2answers
62 views

Standard ML Emacs “real time” compilation?

I'm interested in configuring my Emacs environment to perform real-time compilation of a Standard ML buffer, on the event corresponding to a ";" character being entered (at the end of a line), such ...
0
votes
2answers
264 views

1 single custom command to compile and run executable

In my emacs init file, I have this: (add-hook 'c++-mode-hook (lambda () (set (make-local-variable 'compile-command) (concat "g++ " buffer-file-name)))) Then, ...
1
vote
1answer
130 views

Quick optional alternative to “M-x compile”

I'm using "M-x compile" several times a day with the following in my ~/.emacs: (setq compile-command "cd ~/my-dev/linux_build/ && killall gdb ; ~/my-dev/someStuff/.git/hooks/pre-commit; mv -f ...
0
votes
1answer
278 views

elm-mode can't compile file

When creating projects with elm init, elm creates a project structure where there is a elm.json in the root of the project directory and a src folder, where your .elm files should go Elm-mode for ...
3
votes
1answer
615 views

Emacs for Windows: How to M-x compile using MinGW_32

I have been using Console2 on an MS Windows box to compile and would like to use Emacs instead. My settings on Console2 are as follows: shell="c:/mingw/bin/sh.exe --login -i -c 'cd /c/docume~1/...
3
votes
1answer
166 views

Have compilation errors / grep match reuse current frame/window without ever splitting it?

I have searched in a number of places (1, 2, 3, 4) even looked at the e-lisp source files and could not figure out how to do, so I ask. Context I have bound next-error to a key. I'm in some source ...
0
votes
1answer
117 views

use a function to get file in compilation-error-regexp-alist

I have used compilation-error-regexp-alist a lot so I am familiar with the syntax. However for this particular error I need to use a function to get the file because I need wildcards. Here is the ...
2
votes
0answers
74 views

M-x compile --> emacs doesn't automatically open files

I have recently switched from an older version of emacs to version 24.3.1. And I have run into the following problem: I have a base folder "/base" and a folder with source files "base/src"; my ...
1
vote
1answer
144 views

Compiled Emacs Needs Terminfo

When installing emacs completely from source to a custom prefix (no root), even after the compilation works, it says emacs: Cannot open terminfo database file . Adding the terminfo to different parts ...
2
votes
3answers
8k views

How can I compile and run my C code from within Emacs like I would with the terminal?

I recently moved from Code::Blocks to Emacs to write C code. The one thing I don't like (because it takes too much time and effort for a simple and repetitive task) is the fact that I can't compile/...
2
votes
1answer
619 views

Compile and run C-Programs in Emacs

I'm currently learning C with a book that has many small code examples that the reader is supposed to write, run and experiment with. I'm using Emacs as my primary tool for everything that has to do ...
2
votes
1answer
331 views

compilation-mode: default-directory != src-root

I have subDirA with source code foo.rs. To compile code in bash I need: $ cd subDirA $ some-compile-command But problem is that compiler invoked via some-compile-command prints errors in such format:...
5
votes
1answer
311 views

Close latex compilation window when successful

I like having TeX-show-compilation in LaTeX for large documents. However, if the compilation completed successfully, I would like the windows to be reverted or the compilation buffer to be killed. I ...
3
votes
0answers
137 views

How to keep hl-line updated in inactive window?

I have (setq global-hl-line-sticky-flag t) to enable hl-line in all windows. However, the highlighted line isn't updated when I change the cursor position in inactive window (e.g., by calling next-...
4
votes
2answers
3k views

Compile Emacs with xwidgets in Ubuntu 14.04

Going to build Emacs from the git repository. Found this and this resources that suggest to compile it with xwidgets for Ubuntu 16.04. On my Ubuntu 14.04, did install the corresponding dependencies ...
0
votes
1answer
714 views

compilation-scroll-output doesn't work if *compilation* buffer is created by hand

Emacs version 25 I have a short piece of elisp to create a few buffers and split my frame into multiple windows that are displayed the way I like. This code creates a *compilation* buffer and ...
1
vote
1answer
25 views

Selecting an item in *compilation* buffer makes the item jump to the top

I try to navigate through compilation errors in my compilation buffer: I place the cursor on an error, and press Enter (alternatively, I use M-g n). What happens: the compilation buffer places the ...
1
vote
1answer
558 views

Dedicated compile hook on compilation finish

I use the compilation-finish-functions hook to perform some actions once compilation finishes. However, unexpectedly to me the hook is also triggered when rgrep completes. I can't seem to find a ...
5
votes
1answer
179 views

emacs home made perspective: source + eshell + compilation

I want such functionality from emacs (gnu 25), I press key in any buffer with source code, and instead of one buffer I got 3 buffers on the screen: source code buffer ------------------ *eshell* | *...
0
votes
1answer
100 views

Linking Multiple Implementation Files in C on Emacs

I need help with linking multiple c source code files on emacs. Could anyone show me the way on how to work this out? Thanks!
1
vote
0answers
173 views

How to highlight in the mode-line that a compilation process is running in AUCTeX?

As compiling LaTeX documents can take a while, I would like to be able to quickly and effortlessly check whether the compilation process is still runing. How can I achieve this with AUCTeX? I know I ...
1
vote
1answer
66 views

Another level of “next/previous” in the compilation buffer?

I use Emacs with Cucumber (cucumber.io). Cucumber outputs lines like this: Scenario: Jeff returns a faulty microwave # /somepath/file1.feature:12 Given Jeff has bought a microwave ...
1
vote
1answer
274 views

eval-when-compile: Is my understanding correct?

I want to build a ring of symbols in my init.el for the purpose of rotating themes. I could do it like this: (let* ((themes '(doom-one zenburn leuven)) (ring (make-ring (length themes)))) (...
3
votes
1answer
380 views

AUCTeX: how to compile a file, which does end in '.ins'

I am playing around with some LaTeX's DocStrip package. (For those interested: it is a LaTeX package, to create documented code, in order to write e.g. a style file and incorporate the ...
1
vote
1answer
132 views

Compilation problem in Emacs,

I am using Emacs 24.3.1. on Ubuntu. I am trying use compile in emacs: (M-x compile), I choose my Makefile. It answered me -*- mode: compilation; default-directory:"path" -*- Compilation started at ...
2
votes
1answer
397 views

Source-Links in Compilation mode not working

I've been experimenting with M-x compile recently (I'm using it to start my node.js-project which will output a stack-trace if there is an error. I get traces like this: Error: Configuration ...
4
votes
1answer
963 views

How do i close the *compilation* buffer without visitinig its window?

I like to work with a vertically split frame with code in both windows. When i call M-x compile the *compilation* buffer shows in the other window (wich is fine as M-g n would show problematic code in ...
1
vote
2answers
181 views

Using compilation-mode to parse error stacks, relocating them

I run several applications, in several languages, that store their error stacks locally. I made a small emacs mode that allows me to browse those errors and navigate the related code. The code I ...
1
vote
1answer
829 views

Compile command as a directory variable?

I am working on a cmake project and I would like to set a directory variable containing the correct compile command. I added this to the root directory of the project in a .dir-locals.el file: ;;; ...
0
votes
1answer
48 views

How can make emacs immediately compile a file I load?

Usually when I load a project, I want to compile it once right away, be it to again see the compilation error I was working on or just to build the dependencies of the checkout, so I don't have to ...
4
votes
2answers
2k views

Compiling Emacs from source on Ubuntu - problems with libxml2

I'm trying to install Emacs 25.1.rc1 on Ubuntu 15.10, and have pre-installed the usual dependencies i.e.: autoconf automake libtool texinfo build-essential xorg-dev libgtk2.0-dev libjpeg-dev ...
2
votes
2answers
1k views

Binding compile command to a key for c++ code

Is it possible to bind the compile and run commands for a c++ code to a single key (for example F5). What i do at the moment is to run M-x compile and then as compile command g++ project.cpp and then ...
2
votes
1answer
1k views

Configuring Emacs as a CMake based C/C++ IDE

I have been interested in Emacs for a while, since I have seen some great articles on the Internet, which demonstrates the usage of Emacs as a C/C++ IDE. Those projects are awesome, yet they are not ...
1
vote
0answers
164 views

Smarter compile in emacs

I often got to work with projects organized as follows: src/ include/ ... Makefile Is there a way to teach emacs' "compile" function to always use that top-level Makefile regardless which file I'...
2
votes
1answer
57 views

Previous/next occur result, independently from compilation errors

After running M-x occur, the commands next-error and previous-error let me navigate between hits. I would like to be able to M-x compile my program and then keep browsing through the same *Occur* ...
3
votes
0answers
49 views

Was compilation successful or not? [duplicate]

How do I find out if compilation was successful or not? I would like to have a variable compilation-no-error set to true after successful compilation. I looked at variables and functions starting ...
7
votes
2answers
1k views

How can I pin the *compilation* buffer to never leave a single frame/window

I would prefer to have the *compilation* buffer always stay in its own frame. However, currently if I run M-x compile from another frame/window, the buffer pops up in a new window there as well. How ...
1
vote
1answer
31 views

Yasnippet stops compile error highlighting

I have been compiling my C++ project using M-x compile which I like because it provides highlighted links to my errors: However after adding: (add-to-list 'load-path "~/.emacs.d/plugins/...
2
votes
2answers
430 views

Compile from parent directory in Emacs

I'm trying to map F5 to compile from a parent directory of the current buffer. Emacs compile-command find makefile in superior directory provides an excellent answer to achieve this: (defun compile-...
4
votes
1answer
394 views

Compile with Tramp hangs or fails when using Tramp with another command

I'm using Tramp with the scpx method to run the compile command on a remote machine. The build takes several minutes to run. If I try to work on something else while that runs that ends up trying to ...
3
votes
0answers
135 views

Compile quietly unless there are errors

I want to run compile or recompile, but I don't want to see the *compilation* buffer pop up unless there's an error, or not at all. If the compilation succeeds, I should just see a notification in the ...