Skip to main content

Questions tagged [compilation]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

Why doesn't Emacs read my .profile?

I was having trouble launching cargo with M-x compile, and IIUC this meant the compile didn't had cargo in its path. This meant process-environment didn't contain cargo, and this in turn meant it didn'...
Alessandro Bertulli's user avatar
0 votes
0 answers
78 views

Make .dir-locals works with compilation

I'm using Emacs 29.1 I have the following .dir-locals.el file: ((nil . ((compilation-error-regexp-alist-alist . '(acap "^#[0-9]+ [0-9]\.[0-9]+ \\(.+?\\):\\([0-9]+\\):\\([0-9]+\\).*" 1 2 3)) ...
Silex's user avatar
  • 821
0 votes
0 answers
39 views

Not asking to kill a dead process?

When I hit g (recompile) in a *Compilation* buffer while the previous compilation is not done yet, I am asked whether I want compilation killed. If I wait for it to finish, I get the echo area look ...
sds's user avatar
  • 6,214
0 votes
1 answer
71 views

How generate *Compile log* buffer?

I switched to Emacs 29.1 from Emacs 26. The first time I opened Emacs I got: ⛔ Warning (comp): json-snatcher.el:81:2: Warning: defvar `jsons-parsed-regions' docstring wider than 80 characters ⛔ ...
Gabriele's user avatar
  • 1,680
9 votes
1 answer
622 views

How does Emacs compile the regular expressions?

I'm writing code that will have to do a lot of regular expression matching. I understand that a function like string-match or re-search-forward needs to process its regexp argument given as a string ...
phs's user avatar
  • 1,249
0 votes
2 answers
94 views

M-x compile, Compilation Command Variable

When M-x compile and specifying a compilation command, where is this command stored? I'd like to use whatever it's stored to, in a function to quickly compile, instead of being prompted for the ...
Jason Hunter's user avatar
1 vote
0 answers
59 views

Customize compilation mode for a new language

I am trying to add a language called lesim to compilation mode so that errors are parsed correctly. The error line does not include the file name. Among the ways I have tried to get around this, what ...
Stefano's user avatar
  • 175
2 votes
0 answers
495 views

Emacs will not compile sqlite binary and will not run compiled sqlite binary

I am running emacs 28.2 on windows 10, trying to start using the org-roam package which requires emacsql-sqlite. I have installed msys2 and used it to install gcc following the instructions here as ...
Lore's user avatar
  • 303
1 vote
3 answers
98 views

Why are there four identical executables generated while compiling from source?

The result of compiling emacs from source on Linux Mint 21 Cinnamon Edition was creation of FOUR identical executable files in the [src] directory: 1e2bec8a4a3c5c671fadd486d0590393 bootstrap-emacs ...
oOosys's user avatar
  • 505
0 votes
0 answers
85 views

Remove messages before and after `compile`

When compiling, how can I remove all output in the *compilation* buffer except output issued by my code itself? i.e. remove everything except the line(s) marked *** below: -*- mode: compilation; ...
jessexknight's user avatar
0 votes
2 answers
30 views

Save before running tests? (Prepend function?)

How can I prepend a function call in Elisp? E.g. I have a key binding (C-c C-c C-t) that runs some tests (command rustic-cargo-test) and it always asks me if I want to save - I'd like to run (save-...
John Graham's user avatar
1 vote
1 answer
658 views

Unable to install epdfinfo on Emacs 28.1

Running Doom Emacs 3.0.0-alpha on Emacs 28.1 on Manajaro with all the latest updates installed. When I M-x pdf-tools-install RET it fails to compile. The following is the output of the command: -*- ...
deshmukh's user avatar
  • 1,922
0 votes
0 answers
111 views

Side effects of global-set-key?

I have had (global-set-key [f9] 'compile) in my Emacs init file for many years. With this setup, hitting [f9] and doing M-x compile RET should run the same commands the same way, right? But today I ...
toomas's user avatar
  • 183
0 votes
1 answer
87 views

Compilation mode error output parse not matching

I've below code (add-to-list 'compilation-error-regexp-alist 'kbd) (add-to-list 'compilation-error-regexp-alist-alist '(kbd "^kmonad: Parse error at \\([0-9]+\\):\\([0-9]+\\):" ...
Umut Gerçek's user avatar
0 votes
1 answer
279 views

`C-c C-c` compilation stopped working in SLIME but works if manually typed, how to fix it?

I am new to Emacs and Slime. I have been using both of them daily for the last 10 days. And it is amazing! I am impressed. Today, I decided to install and try the package Paredit. Not sure if this is ...
Pedro Delfino's user avatar
1 vote
1 answer
162 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 ...
Daniel's user avatar
  • 99
0 votes
1 answer
100 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 ...
fbuether's user avatar
0 votes
2 answers
123 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 ...
Patrick Collins's user avatar
0 votes
1 answer
77 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 '...
Nordlöw's user avatar
  • 527
0 votes
1 answer
137 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 ...
Nordlöw's user avatar
  • 527
0 votes
1 answer
962 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 ...
gregghz's user avatar
  • 133
0 votes
1 answer
665 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 ...
LeanMan's user avatar
  • 123
18 votes
5 answers
13k 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 ...
Joe's user avatar
  • 1,342
0 votes
1 answer
1k 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....
vy32's user avatar
  • 142
0 votes
2 answers
105 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 ...
William Clark's user avatar
0 votes
2 answers
639 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, ...
mle0312's user avatar
  • 295
1 vote
1 answer
217 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 ...
Okay Dokey's user avatar
0 votes
1 answer
353 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 ...
flooose's user avatar
  • 521
3 votes
1 answer
1k 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/...
lawlist's user avatar
  • 19.5k
3 votes
1 answer
319 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 ...
Stéphane Gourichon's user avatar
0 votes
1 answer
213 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 ...
Prgrm.celeritas's user avatar
2 votes
0 answers
159 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 ...
Sam's user avatar
  • 121
1 vote
1 answer
248 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 ...
JZL003's user avatar
  • 121
3 votes
3 answers
14k 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/...
elanonrigby's user avatar
2 votes
1 answer
1k 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 ...
Tim Hilt's user avatar
  • 307
2 votes
1 answer
730 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:...
user1244932's user avatar
6 votes
1 answer
527 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 ...
Shaun's user avatar
  • 63
4 votes
0 answers
234 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-...
AhLeung's user avatar
  • 1,113
5 votes
2 answers
5k 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 ...
nephewtom's user avatar
  • 2,281
0 votes
1 answer
1k 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 ...
Louis Roché's user avatar
1 vote
1 answer
67 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 ...
Gauthier's user avatar
  • 511
2 votes
1 answer
1k 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 ...
Caterpillar's user avatar
5 votes
1 answer
242 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* | *...
user1244932's user avatar
0 votes
1 answer
226 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!
fizsics's user avatar
1 vote
0 answers
187 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 ...
Timm's user avatar
  • 1,619
1 vote
1 answer
90 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 ...
AnoE's user avatar
  • 450
1 vote
1 answer
466 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)))) (...
ivan's user avatar
  • 1,968
3 votes
1 answer
432 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 ...
Jan's user avatar
  • 383
1 vote
1 answer
240 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 ...
MichalSzczep's user avatar
2 votes
1 answer
627 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 ...
DeX3's user avatar
  • 273