9

There are two parts to this. First, process ANSI colors : ;; Stolen from (http://endlessparentheses.com/ansi-colors-in-the-compilation-buffer-output.html) (require 'ansi-color) (defun endless/colorize-compilation () "Colorize from `compilation-filter-start' to `point'." (let ((inhibit-read-only t)) (ansi-color-apply-on-region compilation-filter-...


9

That's a lot of questions, but I will try to answer them in such a way that you can look up all the answers in detail. Emacs is primarily a text editor; you will use it to edit your C++ files. Converting those files into a program that your computer can run is the job of a compiler. There are many C++ compilers, but you will want to use one called gcc. ...


3

If I understand your question correctly, the simplest solution that I have found is to set the variable directory-abbrev-alist to map directories in the compilation buffer to the host system. For example I run my phpunit tests in a docker container as a compile command. When there are errors or failures the filepaths in the compilation buffer show up as /...


3

This behaviour can be controlled by compilation-scroll-output. compilation-scroll-output is a variable defined in `compile.el'. Its value is `first-error' Original value was nil Documentation: Non-nil to scroll the *compilation* buffer window as output appears. Setting it causes the Compilation mode commands to put point at the end of their output window ...


2

Know that you can use M-x compile to compile from within Emacs. If you do that then, in your compilation output buffer, use C-h m to see information about the mode. For example, it might tell you that the mode is compilation-mode and that C-c C-k is bound to command kill-compilation. Clicking that command name tells you: Kill the process made by the M-x ...


2

The solution for me is to add: ;; Don't save anything before compiling (setq compilation-save-buffers-predicate 'ignore) Thanks to xuchunyang for pointing it out!


2

The cause of that error is a fixed problem in Projectile. Avoid this problem by updating to a Projectile version where this problem is fixed.


2

fortran-mode-hook only runs for buffers that end up in fortran-mode. To affect which extensions are recognized as fortran, you can modify auto-mode-alist, eg (add-to-list 'auto-mode-alist '("\\.f9[50]" . fortran-mode))


1

As mentioned by @JeanPierre , the problem was because the location of gfortran was not added to the PATH environment variable for the emacs shell. Thus the shell did not know where to look to find the command. To do so (and to make the PATH environment readily available for editing) I added this code block into my initialisation file: ~/.emacs.d/init.el ;; ...


1

I suggest you use M-x re-builder on the compilation errors buffer (or just a buffer containing the text you want to match). If you start with this edited pattern: "(\\([0-9]+\\))\\s-+:\\s-+\\(?:Error\\|Warnin\\(g\\)\\)\\[[Pe0-9]+\\]:" You'll probably be able to figure it out from there? I imagine something like the following might do the trick? '("\\(^.+...


1

A variable called compilation-error-regexp-alist-alist (I will call c-e-r-a-a) is a list of (<name> <regexp> <list of regexp match numbers...>). From the output of `M-x describe-variable compilation-error-regexp-alist': Each elt has the form (REGEXP FILE [LINE COLUMN TYPE HYPERLINK HIGHLIGHT...]). If REGEXP matches, the FILEā€™th ...


1

See the Emacs commands find-grep-dired and find-dired. They do pretty much what you are trying to do, I think. And they present the results in a Dired buffer, giving you all of the features of Dired. (Library Dired+ (dired+.el) contains enhanced versions of these commands, and puts them in a Run find Command menu, along with some other find commands.)


1

As noted in EDIT 2 of the question, the desktop file must have been corrupted. It appears that fixing the desktop file fixed the problem.


Only top voted, non community-wiki answers of a minimum length are eligible