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
1
vote
1answer
23 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 ...
1
vote
0answers
37 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 ...
0
votes
0answers
10 views

prettify-symbols as a compilation-mode filter

I would like to use prettify-symbols, or a similar feature, in a compilation-mode. It doesn't work out of the box by enabling prettify-symbols-mode. I could naively implement this with a search/...
0
votes
0answers
16 views

Compilation mode doesn't see PATH variable

My problem is simple, I'm working in embedded systems with a RTOS named zephyr. To compile my projects I need some variables set in PATH and the problem is that when I run projectile-compile-project ...
0
votes
0answers
25 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 ...
0
votes
0answers
48 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 ...
1
vote
1answer
46 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 ...
1
vote
0answers
35 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 ...
0
votes
1answer
32 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-...
1
vote
1answer
33 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?
0
votes
1answer
118 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 ...
4
votes
1answer
111 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 ...
1
vote
0answers
37 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
50 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 ...
0
votes
1answer
99 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 ...
2
votes
1answer
93 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 ...
2
votes
1answer
150 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:...
1
vote
1answer
357 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 ...
1
vote
1answer
191 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/...
1
vote
1answer
16 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 ...
0
votes
1answer
45 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 ...
0
votes
0answers
133 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 ...
0
votes
2answers
453 views

How to use a separate window for compilation output?

When building, a split view is opened for the output. It's possible to close this window, open a new window and set the buffer to the build output. However when building again, the other window isn'...
2
votes
1answer
168 views

How to syntax-colour py.test output?

In compilation-mode (or some similar mode), how can I make the default py.test output be colourized? I'm not talking about clickable links, but about just 'syntax' colouring the various parts of the ...
1
vote
1answer
133 views

Clickable links to py.test stack frame lines in compilation-mode

In compilation-mode, how can I make the default py.test output have clickable links to source code (when using py.test's default formatting of tracebacks)? Does somebody already have appropriate ...
1
vote
0answers
50 views

Print elapsed time in compilation buffer

The compilation buffer prints out start and end date for my compilation. How can I make it also tell me how many minutes & seconds it spent? I'd like something like: Compilation started at Thu ...
2
votes
1answer
230 views

A compilation-mode conundrum - matching and highlighting

Whilst playing around with compilation-mode for running tests and using HIGHLIGHT faces for failed expectations I've encountered a bit of a conundrum. Question: why does my compilation-errors-regexp-...
2
votes
1answer
126 views

grep/ag/etc results buffer: how to strip leading whitespace?

I'm using ag.el as a front-end for the ag search utility. The results are displayed in a compilation buffer in the form <file>:<line>:<column>:<matching-text>. The matching-...
1
vote
1answer
104 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
295 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 ...
3
votes
2answers
606 views

How can I add a compilation error regex for node js?

I can't seem to get emacs to recognize node stacktraces. As you can see, I've added what I think is a valid regular expression to compilation-error-regex-alist and compilation-error-regex-alist-alist, ...
0
votes
1answer
156 views

How to enable “Entering Directory” matching in grep output?

I have a grep-like script that I run via M-x grep, that changes its working directory, but outputs make-like "Entering directory `/a/b/c/d'" messages (to keep emacs informed). This has worked fine ...
2
votes
1answer
202 views

How to align grep output?

I use grep-mode for a set of files and wgrep (writable grep buffer) for editing them. The buffer usually looks like: I want to find a way to change the view like this: wgrep and compile-goto-error ...
1
vote
0answers
123 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'...
3
votes
0answers
42 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 ...
4
votes
1answer
117 views

How can I recenter grep or compile window on next error

On next-error in the grep or compilation window, I can use something like (setq next-error-recenter 35) to ensure that window displaying the match scrolls to show the whole match, as described in ...
1
vote
0answers
184 views

Enabling compilation-shell-minor-mode in GUD (for next-error)

I want to see stack trace lines highlighted in GUD and have next-error work there. That works for me if, after starting GUD (via M-x pdb) I enable compilation-shell-minor-mode. However, if I do this:...
1
vote
1answer
336 views

Why do paths start with “c:/c/…” in windows emacs when I use 'next-error'?

I'm using native windows emacs together with mingw. When there's a compile error, the *compilation* buffer looks like this: make -C .. make: Entering directory `/c/Users/m.grunwald/Documents/Projects/...
1
vote
1answer
117 views

M-x compile and shell-command ignore default-directory

On one computer I use, my emacs will always run commands in my home directory, rather than the directory of the currently open file (i.e. default-directory). A standalone reproduction is executing ...
5
votes
1answer
528 views

How to highlight the compilation buffer?

I try to define a custom coloring of the compilation buffer, but I can not get the highlight correctly. (add-to-list 'compilation-error-regexp-alist 'my-message) (add-to-list 'compilation-error-...
0
votes
1answer
105 views

After `M-x pdb` switch to `compilation-mode` automatically?

M-x pdb is great while debugging. When the python process exits though, often there is a traceback left behind in the gud buffer that I'd like to view using compilation-mode so I can use next-error ...
1
vote
2answers
66 views

Compile-run-navigate traceback without term mode

I have experimented with emacs' various shells (term in combination with compilation-mode in particular), and have had performance problems. For that reason I still use a separate terminal (e.g. ...
3
votes
0answers
51 views

show error message on its own line?

I'm using M-x compile to check for compilation errors and it's great. However, I'm wondering if I can get the actual error message to begin on its own line. For some reason the file path shows up as ...
6
votes
1answer
176 views

Read process output line by line

If there a way to read the output of a subprocess line by line, or at least to get it in small batches? I have a subprocess doing work in the background, and printing a line every time it completes ...
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 ...
0
votes
1answer
271 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
54 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. ...
3
votes
2answers
121 views

How to query-replace across all hits in a compilation-mode buffer

How can I run a query-replace on the all the files pointed to by an arbitrary compilation-mode buffer? I think to be usable this would need to be resumable from point in the compilation-mode buffer. ...
3
votes
1answer
670 views

Set variables based on path without using directory-local variables

I want to set variables, in particular, compile-command and tabbing related variables based on the path of the file I'm editing. In my .vimrc I use the following to do this. autocmd BufRead,...
16
votes
3answers
3k views

Changing the compilation mode current directory automatically?

Currently, my compilation command is as follow: cd ~/somedir && ./somescript.sh This prevents emacs from finding the file in which an error happens (and opening it). Of course I can run M-x ...