From 18d911f8c1104ee93550d99964c2d776418e9330 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Mon, 4 Mar 2024 21:16:21 -0800 Subject: [PATCH] Add sage math stuff --- init.el | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 0634c5a..f65945c 100644 --- a/init.el +++ b/init.el @@ -113,7 +113,8 @@ ;; Some settings for programming (setq-default indent-tabs-mode nil tab-width 4 - fill-column 80) + fill-column 80 + comment-multi-line t) ;; Tree sitter download locations (setq treesit-language-source-alist @@ -851,6 +852,18 @@ Take directly from doom-modeline." (doom-modeline-spc) "IAlg")))))))) +;; sage (for when calc is not enough) +(use-package sage-shell-mode + :bind ("C-c g" . my/run-sage) + :init + (defun my/run-sage (p) + "Like `sage-shell:run-sage', but does not ask anything without a prefix +argument." + (interactive "P") + (let ((sage-shell:ask-command-options p)) + (funcall-interactively #'sage-shell:run-sage + (sage-shell:read-command))))) + ;; eat (use-package eat :bind ("C-c V" . my/project-eat-or-default) @@ -866,7 +879,11 @@ Take directly from doom-modeline." my/project-eat-hash-table)) ((buffer-live-p eat-buff))) (switch-to-buffer eat-buff) - (let ((eat-buffer-name (concat "*eat for project " default-directory "*"))) + (let ((eat-buffer-name (concat "*eat for project " default-directory + "*")) + (eat-term-name (if (file-remote-p default-directory) + "xterm-256color" + eat-term-name))) (puthash default-directory (eat) my/project-eat-hash-table))))) @@ -877,7 +894,10 @@ Take directly from doom-modeline." (if-let ((eat-buff (gethash nil my/project-eat-hash-table)) ((buffer-live-p eat-buff))) (switch-to-buffer eat-buff) - (puthash nil (eat) my/project-eat-hash-table))))) + (puthash nil (let ((eat-term-name (if (file-remote-p default-directory) + "xterm-256color" + eat-term-name))) + (eat)) my/project-eat-hash-table))))) ;; eshell stuff (use-package eshell