Skip to main content

Questions tagged [compilation-mode]

Compilation mode turns each error message in the buffer into a hyperlink; you can move point to it and type RET, or click on it with the mouse (see Mouse References), to visit the locus of the error message in a separate window.

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

Convert file paths in compilation buffer

The paths of files in my compilation buffer don't match the actual files on disk, because building my project happens in another context. I want to convert the file paths in my compilation buffer, so ...
Gauthier's user avatar
  • 509
0 votes
0 answers
36 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
30 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,124
0 votes
1 answer
45 views

Jest output colour codes not being recognized in compilation buffer

I have some node (typescript) code which is slightly broken and produces an error when I run it (not my problem here). When I run it in M-x shell mode, I get: $ jest FAIL src/db/DbLookups.test.ts ● ...
Richard Wheeldon's user avatar
0 votes
0 answers
27 views

OSX: shaking the mouse during compiler output makes it go faster. Why?

I frequently run a Maven job in compilation mode. Maven is very verbose and spews all sorts of stuff to the screen. The build as you might imagine runs for a while. Randomly, while bored and waiting ...
Laird Nelson's user avatar
0 votes
1 answer
45 views

Overriding the compilation regex to match files and lines for a new tool

How do you get compilation mode to properly detect and underline the file:line pattern of a given tool, to be able to click to directly get to them?
Perdu's user avatar
  • 51
1 vote
0 answers
49 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
  • 173
0 votes
1 answer
76 views

How to get `compile-goto-error` to find files mentioned in `npm run` script output (i.e., relative to `package.json` rather than cwd)?

I develop an NPM package, and often use M-x compile RET npm run test RET and similar. It is very convenient that npm run will search parent directories for a package.json file, and then execute the ...
cpcallen's user avatar
  • 213
1 vote
2 answers
89 views

How to prevent the character `^[(B` from being displayed on the compilation buffer

When I run the test feature of Rust in Emacs compilation mode, with ansi-color mode loaded, somehow the character ^[(B is always displayed like below: It looks quite annoying. Does anyone know how to ...
Trung Ta's user avatar
  • 301
1 vote
1 answer
233 views

Delete or hide compilation buffer when finished compile and run process

Recently I'm using this function which is given bellow, to compile and run C++ program. Everything works fine with this function. I just want to delete pop-up window (generated by this function) after ...
Likhon BaRoy's user avatar
0 votes
0 answers
205 views

How to revert to the default 'compilation-mode' behavior under doom emacs?

How can the "compilation" experience in Emacs be reverted to the behavior of a vanilla emacs installation when using doom emacs? As a long time user of "vanilla" Emacs, I am too ...
Richard Corden's user avatar
0 votes
0 answers
69 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
2 votes
4 answers
1k views

How to see color output when compiling?

Some compilers support color output, which I find helpful when viewing compiler output. GCC for example supports -fdiagnostics-color=always. I would like to build using emacs's compile mode which has ...
ideasman42's user avatar
  • 8,846
0 votes
1 answer
576 views

Disable line number mode for compilation mode

I have set multiple modes to not show display-line-number-mode and recently I added compilation-mode to that list, but the compilation-mode still shows line numbers. Here is the relevant code, ;; ...
apoorv569's user avatar
  • 113
0 votes
1 answer
32 views

Limiting compilation error to symbols that are not always loaded

At one point, in an attempt to make parsing of *Compilation* faster, I customized compilation-error-regexp-alist to a set of symbols: '(cargo rustc-colon rustc rustc-refs bash python-tracebacks-and-...
Troy Daniels's user avatar
0 votes
0 answers
54 views

How to change the header and footer of the comint/compilation-mode?

I have a program ~/path/to/program.py. In program.py I run compile (I usually do this with the second arg COMINT=t). I get, -*- mode: compilation; default-directory: "~/path/to/" -*- Comint ...
scribe's user avatar
  • 1,035
1 vote
0 answers
49 views

emacs compilation mode under cygwin with mixed path types

I am using emacs 27.2 under cygwin and compilation-mode to build software and jumping to any compilation errors with 'next-error. The build system is GnuWin32 make. Therefore, I have to live with ...
Stefano's user avatar
  • 91
0 votes
1 answer
78 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
1 vote
0 answers
37 views

Making compilation-error-regexp-alist buffer or project local

How can limit the compilation-error-regexp-alist to a subset depending on default-directory or even better (project-current)? My motive is that my compilation-error-regexp-alist contains too many ...
Nordlöw's user avatar
  • 517
3 votes
1 answer
72 views

is there a way to get two separate next-error lists so I can bind them to two different keys

I often have grep (technically rgrep) in a buffer/window and another buffer/window with a "compilation" of my active project in it. I would like to bind two different keys (e.g. f2 and f3) ...
intel_chris's user avatar
1 vote
2 answers
614 views

compilation-mode and next-error confusion

I'm going crazy trying to understand why compilation mode and next-error recognize some errors and not others. It appears as though we're long past the days of simple regexps for recognizing errors ...
kpixley's user avatar
  • 11
0 votes
1 answer
868 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
620 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
0 votes
1 answer
109 views

"not in compilation buffer" error using compilation-next-error in elisp function

I am getting an elisp error that fails at lisp/progmodes/compile.el within compilation-next-error function that reads "Not in a compilation buffer". The elisp function I am writing attempts ...
LeanMan's user avatar
  • 123
0 votes
1 answer
310 views

Re-fill compilation-mode buffer from shell script

This might require more tricks than just Emacs-fu, but since Emacs is at the heart of it I hope to get some ideas on how to approach my need here. I use Emacs/Make/gcc as my development environment. ...
thoni56's user avatar
  • 125
1 vote
1 answer
224 views

Skip over remaining errors in current file to next error in next file

tl;dr I am using :cn in Evil's Ex command line and would like to use :cnf as well, but it is not there, and I don't know what function to bind it to. Details As a former Vim user who is slowly ...
Keith Pinson's user avatar
1 vote
2 answers
164 views

How to Run a Context Sensitive Compile?

When working on projects which use multiple kinds of build-systems, sometimes I want to run a make command based on the project, without having to manually setup project spesific hooks. Is there a ...
ideasman42's user avatar
  • 8,846
2 votes
1 answer
201 views

TTY allocation in *Compilation* buffer

I am using some complicated combination of Cygwin (for emacs) and Docker (for Linux environment) for C++ development on my laptop. Recently I noticed that Docker dumps lots of ANSI and XTERM ...
user26785's user avatar
  • 161
3 votes
1 answer
1k views

How to use `next-error` and `previous-error` without the compilation buffer visible

I want to be able to use grep to find matching lines and to be able to jump through them using next-error and previous-error however I don't feel the need to have the match list on screen and it takes ...
Kevin Cox's user avatar
  • 173
0 votes
0 answers
33 views

Programatically go to next compilation error

When I am refactoring code, I often need to make the same change in my files. My current workflow is often something like this: M-x grep for foo.bar.baz Go to first hit M-x replace-string RET foo....
Troy Daniels's user avatar
1 vote
1 answer
348 views

Why in compilation-mode do my go (golang) compile errors not include the column on goto-error?

When I compile a simple (incorrect) go program like this from emacs package main func main() int { } I get this result -*- mode: compilation; default-directory: "~/Go/" -*- Compilation started at ...
Nick Craig-Wood's user avatar
1 vote
0 answers
53 views

convert regular compilation-mode output to inline view

It would be nice to show the info, warnings and errors from a regular compilation-mode buffer inline in the source code. I checked to see if flycheck supports this but it appears no. Writing a custom ...
fommil's user avatar
  • 1,800
0 votes
0 answers
411 views

Configure compilation mode to use custom shell

On windows I have set (setq explicit-shell-file-name "c:/Program Files/Git/bin/bash.exe") to use git-bash for e.g. M-x shell. In compilation mode however, the standard windows console still seems to ...
B_old's user avatar
  • 717
1 vote
0 answers
248 views

How to kill a running process in compilation buffer in MS Windows?

I have tried using M-x kill-compilation and it doesn't kill the process (on Microsoft Windows). It just sends ^C, which makes my script to retry. When I try to M-x kill-buffer on the compilation ...
Vasantha Ganesh's user avatar
1 vote
1 answer
280 views

Sudo caching on compilation mode

There is a command I run very often using compile that must be run as sudo. I wanted to achieve something similar to the 5min caching of sudo in a shell: if I keep running the command in intervals ...
Vitorqb's user avatar
  • 103
1 vote
0 answers
318 views

How to make process in compilation-mode think it's not running in interactive terminal?

I use minitest-mode which starts Ruby tests in compilation-mode: (compilation-start actual-command 'minitest-compilation-mode (lambda (arg) (minitest-buffer-name (or file-name "")))) Tests invoke ...
kolen's user avatar
  • 221
0 votes
1 answer
50 views

capture and replay a closure later

I am having a problem working with closures. I hope I can explain this clearly. When I try to start a compilation I typically do it like this: (let ((dir (get-dir)) (model-root root) (default-...
Prgrm.celeritas's user avatar
1 vote
1 answer
67 views

How to set imenu to a list of errors in compilation mode

I would like to use helm-imenu to see and navigate on a list of errors/warnings in compilation buffer. How can I do that? E.g., by setting imenu-generic-expression to some value?
AhLeung's user avatar
  • 1,083
0 votes
1 answer
502 views

Highlight compilation error in compilation mode buffer

I know how to highlight the source code corresponding to the selected compilation-mode error. I also know about the little arrow in the fringe that points to the error in the compilation buffer, and ...
Croad Langshan's user avatar
5 votes
2 answers
713 views

Which regexp from compilation-error-regexp-alist is used by compilation-mode?

I spent a while debugging the regex in compilation-error-regexp-alist only to find that the regex itself is fine. My current theory is that compilation-mode is just actually using a different regex ...
Infiltrator's user avatar
2 votes
0 answers
149 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
353 views

Simultaneously compiling two or more projects with Compilation Mode

I haven't found a way to use Compilation Mode in two projects simultaneously. Starting compilation in a second project kills the compilation of the first. Is it possible to run two compilations ...
Peter Becich's user avatar
1 vote
1 answer
337 views

How to move the point to next link?

Let's say the compilation error has some filenames with line number blah blah src/awesomefile1.c:31 src/awesomefile2.c:152 blah blah Assume the filename are parsed in the buffer and are links. Now ...
user10375's user avatar
  • 245
2 votes
1 answer
234 views

How to automatically select *interpretation* buffer window

When I am writing a shell script in sh-mode and decide to run it, I hit C-cC-x (executable-interpret). An *interpretation* buffer is displayed, showing the script's output. Is there a robust way to ...
John Goofy's user avatar
2 votes
1 answer
680 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
5 votes
1 answer
2k views

How do you abort an emacs M-x compile compilation

How do you abort an emacs M-x compile compilation? I'm editing a bash file, and I "test execute it" by doing M-x compile. What I tried - googled:emacs abort compilation The file I'm working on is ...
american-ninja-warrior's user avatar
1 vote
1 answer
295 views

Emacs Compile Mode: Extra characters before filename result in bad match

In the compile buffer of Emacs 25.3.1, I am getting the following compilation error using Clang (the error message is given as it appears in the compile buffer line by line) : src/platform/linux/...
strNOcat's user avatar
  • 211
1 vote
1 answer
62 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
  • 509
0 votes
1 answer
114 views

Redirect compilation mode hyperlink to external tool

I have a working compilation error matcher, that contains the path to a file. The compilation buffer correctly adds a hyperlink to that file and I can open it in emacs. However, the file in question ...
theldoria's user avatar
  • 1,845
2 votes
0 answers
391 views

compile-goto-error: be more consistent in choosing a window for display

I have a main window displaying buffer A, and bottom window displaying some project-wide search results. ┌───────────┐ │ A │ │ │ ├───────────┤ │ results │ └───────────┘ Hitting ...
ivan's user avatar
  • 1,948