Skip to content

Commit

Permalink
Added org-mode package repo fixed coloring with Ag
Browse files Browse the repository at this point in the history
+ Updated org package source to get up-to-date releases (read here)[http://irreal.org/blog/?p=6899]

+ Had an issue very similar to what was
described (here)[Wilfred/ag.el#124], tracked this down
to the fact that Ag major mode inherits from compilation mode. My hook for
colorizing the ANSI colors was breaking Ag coloring. Hook now only runs if major
mode is compilation-mode. Seems to work for all packages in my normal workflow
right now. Note that many people recommend using `compilation-filter-start'
variable instead of `(point-min)' and `(point-max)' (see (for example
here)[https://stackoverflow.com/questions/13397737/ansi-coloring-in-compilation-mode],
but that wasn't working for me. Didn't bother to track down
  • Loading branch information
jarvisschultz committed May 3, 2018
1 parent 50cf5d2 commit b8c4002
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions dotemacs.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
(add-to-list 'package-archives
'("melpa-stable" .
"http://stable.melpa.org/packages/") 'APPEND)
;; add org-mode packages:
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t)
(package-initialize)

;; tools for benchmarking startup:
Expand Down Expand Up @@ -570,11 +572,12 @@
(global-set-key "\C-x\C-r" ros-keymap)
;; since ROS Groovy, catkin inserts ansi-color sequences into the output of the
;; compilation buffer... let's fix that
(defun colorize-compilation-buffer ()
(toggle-read-only)
(ansi-color-apply-on-region (point-min) (point-max))
(toggle-read-only))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)
(ignore-errors
(require 'ansi-color)
(defun colorize-compilation-buffer ()
(when (eq major-mode 'compilation-mode)
(ansi-color-apply-on-region (point-min) (point-max))))
(add-hook 'compilation-filter-hook 'colorize-compilation-buffer))
;; the way I am doing the following doesn't seem very safe!
(defvar compile-history nil)
(setq compile-history '("cd /home/jarvis/indigows/ && catkin_make "))
Expand Down

0 comments on commit b8c4002

Please sign in to comment.