New answers tagged

2

Amazing nobody's answered this yet, but I can't find an answer anywhere. Here's my solution: (make-variable-buffer-local 'my-compilation-start-time) (add-hook 'compilation-start-hook #'my-compilation-start-hook) (defun my-compilation-start-hook (proc) (setq my-compilation-start-time (current-time))) (add-hook 'compilation-finish-functions #'my-...


3

did you try with .dir-locals.el file? something along the lines ((c++-mode . ((compile-command . "make -j 4") ;; other customisation )) ;; other modes ) see (info "(emacs)Directory Variables")


0

If you have a rule for creating the source search path, you can add it as advice to the function that compile uses for finding paths. For example, the default directory for building with bazel is ~/.cache/bazel. So I want to find all those and strip out that part of the file. I added an "advice" to the compilation-find-file function so that it will rename ...


1

This is a solution which searches up the parent directories for common build system filenames, and runs the appropriate build-command. Posting here since it works, although better methods may exist. (defun my-compile-context-sensitive--locate-dominating-file-multi (dir compilation-filenames) "Search for the compilation file traversing up the directory ...


Top 50 recent answers are included