From 7c70a0cc3fe89577afae49afcc610a4134181a96 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Tue, 30 Apr 2019 11:36:53 -0400 Subject: [PATCH] enable 8-threaded make in r mode --- conf.org | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/conf.org b/conf.org index 0fc9a2c..86fd2fb 100644 --- a/conf.org +++ b/conf.org @@ -663,7 +663,6 @@ Flycheck syntax checkers (use-package ess :straight t :init - ;; (load "ess-site") (require 'ess-r-mode) :hook ((ess-mode . flycheck-mode) @@ -677,9 +676,22 @@ Flycheck syntax checkers (inferior-ess-mode . nd/init-ess-company) (inferior-ess-mode . prettify-symbols-mode)) :config - (setq inferior-R-args "--quiet --no-save" + (setq inferior-R-program "R" + inferior-R-args "--quiet --no-save" ess-history-file "session.Rhistory" ess-history-directory (substitute-in-file-name "${XDG_CONFIG_HOME}/r/"))) + +;; fast compile +(defun nd/ess-r-add-env (orig-fun inf-buf proc-name start-args) + (let ((process-environment (cons "MAKEFLAGS=-j8" process-environment))) + (funcall orig-fun inf-buf proc-name start-args))) + +(defun nd/ess-r-start-env (orig-fun &rest args) + (nd/with-advice + ((#'inferior-ess--start-process :around #'nd/ess-r-add-env)) + (apply orig-fun args))) + +(advice-add #'run-ess-r :around #'nd/ess-r-start-env) #+END_SRC *** Python Flycheck syntax checkers to install (either globally or using =pip=)