Created
February 9, 2019 07:23
-
-
Save garaemon/c95175c0b5bc8b7e9857b7b7ae0cc0b3 to your computer and use it in GitHub Desktop.
Run catkin build in emacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Based on https://www.seas.upenn.edu/~chaoliu/2018/03/12/ros-programming-in-emacs/#org8817889 | |
(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-start (point)))) | |
(add-hook 'compilation-filter-hook | |
#'endless/colorize-compilation) | |
(defun ros-catkin-make (dir) | |
"Run catkin_make command in DIR." | |
(interactive (list (file-name-directory (buffer-file-name)))) | |
(let* ((default-directory dir) | |
(compilation-buffer-name-function (lambda (major-mode-name) "*catkin_make*"))) | |
(compile "catkin bt --no-status")) | |
;; (switch-to-buffer (get-buffer "*catkin_make*")) | |
(switch-to-buffer-other-window (get-buffer-create "*catkin_make*")) | |
) | |
(global-set-key [f5] 'ros-catkin-make) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment