Commit 1f99f8af20e9

Vincent Demeester <vincent@sbr.pm>
2020-05-05 00:02:53
config-shells.el: remode compilation-start-hook
It messes up with some grep/rg modes Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent ed73ab6
Changed files (2)
tools/emacs/config/config-org.el
@@ -449,7 +449,6 @@ Switch projects and subprojects from STARTED back to TODO"
 
 ;; built-in org-mode
 (use-package ol-eshell
-  :disabled ;; mess with rg.el
   :after (org))
 (use-package ol-git-link
   :defer 2
tools/emacs/config/config-shells.el
@@ -251,20 +251,7 @@ using either KUBECONFIG or ~/.kube/config"
               (setq xterm-color-preserve-properties t)))
   (add-to-list 'eshell-preoutput-filter-functions 'xterm-color-filter)
   (setq eshell-output-filter-functions (remove 'eshell-handle-ansi-color eshell-output-filter-functions))
-  (setq compilation-environment '("TERM=xterm-256color"))
-  (add-hook 'compilation-start-hook
-            (lambda (proc)
-              ;; We need to differentiate between compilation-mode buffers
-              ;; and running as part of comint (which at this point we assume
-              ;; has been configured separately for xterm-color)
-              (when (eq (process-filter proc) 'compilation-filter)
-                ;; This is a process associated with a compilation-mode buffer.
-                ;; We may call `xterm-color-filter' before its own filter function.
-                (set-process-filter
-                 proc
-                 (lambda (proc string)
-                   (funcall 'compilation-filter proc
-                            (xterm-color-filter string))))))))
+  (setq compilation-environment '("TERM=xterm-256color")))
 
 ;; for fish in ansi-term
 (add-hook 'term-mode-hook 'toggle-truncate-lines)