summarylogtreecommitdiffstats
path: root/0002-Sage-plugin-fix-which-not-found.patch
blob: 219f157a63d7a59a37461fcdbe1018b5b3f7046d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 279abf2c8d4f3cf1032dab47457194095cc92b0e Mon Sep 17 00:00:00 2001
From: wangjiezhe <wangjiezhe@gmail.com>
Date: Wed, 8 Jun 2016 11:20:42 +0800
Subject: [PATCH 2/2] Sage plugin: fix `which` not found

---
 plugins/sage/progs/init-sage.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/plugins/sage/progs/init-sage.scm b/plugins/sage/progs/init-sage.scm
index f3fb9224e..b18bf07c9 100644
--- a/plugins/sage/progs/init-sage.scm
+++ b/plugins/sage/progs/init-sage.scm
@@ -12,10 +12,16 @@
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(define (sage-launcher)
+  (with path "$TEXMACS_BIN_PATH/bin/tm_sage"
+    (string-append
+      "sage -python "
+      (url-concretize (unix->url path)))))
+
 (plugin-configure sage
   (:macpath "Sage*" "Contents/Resources/sage")
   (:require (url-exists-in-path? "sage"))
-  (:launch "sage -python `which tm_sage`")
+  (:launch ,(sage-launcher))
   (:tab-completion #t)
   (:session "Sage")
   (:scripts "Sage"))
-- 
2.11.0