| 1 | Index: TeXmacs/progs/kernel/library/base.scm
|
| 2 | ===================================================================
|
| 3 | |
| 4 | |
| 5 | @@ -325,7 +325,7 @@
|
| 6 | (url->unix u))
|
| 7 |
|
| 8 | (define-public (first-in-path . l)
|
| 9 | - (cond ((null? l) "")
|
| 10 | + (cond ((null? l) #f)
|
| 11 | ((url-exists-in-path? (car l)) (car l))
|
| 12 | (else (apply first-in-path (cdr l)))))
|
| 13 |
|
| 14 | Index: plugins/asymptote/progs/init-asymptote.scm
|
| 15 | ===================================================================
|
| 16 | |
| 17 | |
| 18 | @@ -29,7 +29,7 @@
|
| 19 | (:winpath "Asymptote" ".")
|
| 20 | (:require (url-exists-in-path? "asy"))
|
| 21 | (:require (python-command))
|
| 22 | - (:launch ,(asy-launcher))
|
| 23 | + (:launch ,(and (python-command) (asy-launcher)))
|
| 24 | (:serializer ,asy-serialize)
|
| 25 | (:session "Asymptote")
|
| 26 | (:scripts "Asymptote"))
|
| 27 | Index: plugins/dratex/progs/init-dratex.scm
|
| 28 | ===================================================================
|
| 29 | |
| 30 | |
| 31 | @@ -29,6 +29,6 @@
|
| 32 | (plugin-configure dratex
|
| 33 | (:require (python-command))
|
| 34 | (:require (url-exists-in-path? "latex"))
|
| 35 | - (:launch ,(dratex-launcher))
|
| 36 | + (:launch ,(and (python-command) (dratex-launcher)))
|
| 37 | (:serializer ,dratex-serialize)
|
| 38 | (:session "DraTex"))
|
| 39 | Index: plugins/eukleides/progs/init-eukleides.scm
|
| 40 | ===================================================================
|
| 41 | |
| 42 | |
| 43 | @@ -26,7 +26,7 @@
|
| 44 |
|
| 45 | (plugin-configure eukleides
|
| 46 | (:require (url-exists-in-path? "eukleides"))
|
| 47 | - ,@(eukleides-launcher)
|
| 48 | + ,@(if (python-command) (eukleides-launcher) '())
|
| 49 | (:serializer ,eukleides-serialize)
|
| 50 | (:session "Eukleides")
|
| 51 | (:scripts "Eukleides"))
|
| 52 | Index: plugins/gnuplot/progs/init-gnuplot.scm
|
| 53 | ===================================================================
|
| 54 | |
| 55 | |
| 56 | @@ -31,8 +31,8 @@
|
| 57 | (:winpath "gnuplot" "bin") ;; the first winpath has the highest priority
|
| 58 | (:winpath "GNU Octave/Octave*/mingw64" "bin")
|
| 59 | (:require (url-exists-in-path? "gnuplot"))
|
| 60 | - (:require (url-exists-in-path? (python-command)))
|
| 61 | - ,@(gnuplot-launcher)
|
| 62 | + (:require (and (python-command) (url-exists-in-path? (python-command))))
|
| 63 | + ,@(if (python-command) (gnuplot-launcher) '())
|
| 64 | (:serializer ,gnuplot-serialize)
|
| 65 | (:session "Gnuplot")
|
| 66 | (:scripts "Gnuplot"))
|
| 67 | Index: plugins/graph/progs/init-graph.scm
|
| 68 | ===================================================================
|
| 69 | |
| 70 | |
| 71 | @@ -26,6 +26,6 @@
|
| 72 |
|
| 73 | (plugin-configure graph
|
| 74 | (:require (python-command))
|
| 75 | - (:launch ,(graph-launcher))
|
| 76 | + (:launch ,(and (python-command) (graph-launcher)))
|
| 77 | (:serializer ,graph-serialize)
|
| 78 | (:session "Graph"))
|
| 79 | Index: plugins/graphviz/progs/init-graphviz.scm
|
| 80 | ===================================================================
|
| 81 | |
| 82 | |
| 83 | @@ -31,6 +31,6 @@
|
| 84 | (:winpath "Graphviz" "bin")
|
| 85 | (:require (url-exists-in-path? "dot"))
|
| 86 | (:require (python-command))
|
| 87 | - (:launch ,(graphviz-launcher))
|
| 88 | + (:launch ,(and (python-command) (graphviz-launcher)))
|
| 89 | (:serializer ,graphviz-serialize)
|
| 90 | (:session "Graphviz"))
|
| 91 | Index: plugins/jupyter/progs/init-jupyter.scm
|
| 92 | ===================================================================
|
| 93 | |
| 94 | |
| 95 | @@ -18,8 +18,9 @@
|
| 96 | ;; Communication with Jupyter
|
| 97 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
| 98 |
|
| 99 | +
|
| 100 | (tm-define (check-jupyter?)
|
| 101 | - (and (url-exists-in-path? (python-command))
|
| 102 | + (and (python-command) (url-exists-in-path? (python-command))
|
| 103 | (with cmd (string-append (python-command)
|
| 104 | " -m pip show jupyter_client 2> /dev/null")
|
| 105 | (> (string-length (var-eval-system cmd)) 10))))
|
| 106 | @@ -27,6 +28,8 @@
|
| 107 | (plugin-configure jupyter ;; defines supports-jupyter?
|
| 108 | (:require (check-jupyter?)))
|
| 109 |
|
| 110 | +(when (python-command)
|
| 111 | +
|
| 112 | (define (jupyter-find-kernels)
|
| 113 | (let* ((u "$TEXMACS_PATH/plugins/jupyter/tm_jupyter/kernels.py")
|
| 114 | (cmd (string-append (python-command) " " (system-url->string u)))
|
| 115 | @@ -129,3 +132,5 @@
|
| 116 |
|
| 117 | (when (supports-jupyter?)
|
| 118 | (import-from (jupyter-kernels)))
|
| 119 | +
|
| 120 | +)
|
| 121 | Index: plugins/plantuml/progs/init-plantuml.scm
|
| 122 | ===================================================================
|
| 123 | |
| 124 | |
| 125 | @@ -30,7 +30,7 @@
|
| 126 | (plugin-configure plantuml
|
| 127 | (:require (url-exists-in-path? "plantuml"))
|
| 128 | (:require (python-command))
|
| 129 | - (:launch ,(plantuml-launcher))
|
| 130 | + (:launch ,(and (python-command) (plantuml-launcher)))
|
| 131 | (:serializer ,plantuml-serialize)
|
| 132 | (:session "PlantUML"))
|
| 133 |
|
| 134 | Index: plugins/python/progs/init-python.scm
|
| 135 | ===================================================================
|
| 136 | |
| 137 | |
| 138 | @@ -54,7 +54,7 @@
|
| 139 | (:winpath "Python*" ".")
|
| 140 | (:winpath "Python/Python*" ".")
|
| 141 | (:require (python-command))
|
| 142 | - (:launch ,(python-launcher))
|
| 143 | + (:launch ,(and (python-command) (python-launcher)))
|
| 144 | (:preferences (supports-jupyter?))
|
| 145 | (:tab-completion #t)
|
| 146 | (:serializer ,python-serialize)
|
| 147 | Index: plugins/sympy/progs/init-sympy.scm
|
| 148 | ===================================================================
|
| 149 | |
| 150 | |
| 151 | @@ -27,7 +27,7 @@
|
| 152 |
|
| 153 | (plugin-configure sympy
|
| 154 | (:require (python-command))
|
| 155 | - (:launch ,(sympy-launcher))
|
| 156 | + (:launch ,(and (python-command) (sympy-launcher)))
|
| 157 | (:serializer ,sympy-serialize)
|
| 158 | (:tab-completion #t)
|
| 159 | (:session "SymPy"))
|
| 160 | Index: plugins/tikz/progs/init-tikz.scm
|
| 161 | ===================================================================
|
| 162 | |
| 163 | |
| 164 | @@ -28,7 +28,7 @@
|
| 165 | (plugin-configure tikz
|
| 166 | (:require (python-command))
|
| 167 | (:require (url-exists-in-path? "latex"))
|
| 168 | - (:launch ,(tikz-launcher))
|
| 169 | + (:launch ,(and (python-command) (tikz-launcher)))
|
| 170 | (:serializer ,tikz-serialize)
|
| 171 | (:session "TikZ"))
|
| 172 |
|
| 173 | Index: plugins/xypic/progs/init-xypic.scm
|
| 174 | ===================================================================
|
| 175 | |
| 176 | |
| 177 | @@ -34,6 +34,6 @@
|
| 178 | (plugin-configure xypic
|
| 179 | (:require (python-command))
|
| 180 | (:require (xypic-exists?))
|
| 181 | - (:launch ,(xypic-launcher))
|
| 182 | + (:launch ,(and (python-command) (xypic-launcher)))
|
| 183 | (:serializer ,xypic-serialize)
|
| 184 | (:session "XYpic"))
|