Subject: mailing-list for TeXmacs Users
List archive
From : Peter Rapčan <address@hidden>- To: Karl Hegbloom <address@hidden>
- Cc: Jiezhe Wang <address@hidden>, texmacs-users <address@hidden>
- Subject: Re: [TeXmacs] A temporary way to fix problem with sage plugin
- Date: Thu, 28 Jul 2016 23:12:33 +0200
Karl, I understand that. Let me explain better:
On OS X, with TeXmacs installed in the standard Applications folder, in the file /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/plugins/sage/progs/init-sage.scm there is a line (:launch "sage -python `which tm_sage`") , which is passed to python with the “which tm_sage" command unevaluated. In the shell that OS X uses by defaut, the "which” command is working normally.
Therefore, as a temporary fix, Jienzhe suggested (see below) to replace the `which tm_sage` part with the actual tm_sage file location. On my system, I have to put the following: (:launch "sage -python /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/plugins/sage/bin/tm_sage”).
With that the plugin works. [Sorry for claiming there was no tm_sage on my system, it was in fact present at the above location].
So, to have a proper fix, the question is how to make the `which tm_sage` part work, or, in general, how to make the sage plugin correctly recognize what it needs to recognize.
In fact, I don’t understand how TeXmacs knows that sage is present on my system in the first place, since the sage executable is not in my PATH locations (nevertheless TeXmacs correctly added a Sage session entry to the sessions menu, once I installed sage).
Cheers,
Peter.
On 28 Jul 2016, at 03:05, Karl Hegbloom <address@hidden> wrote:The 'which' command may be specific to a particular command shell, as a builtin, so unless it's a shell with that builtin or there's a binary or executable shell script called 'which', it won't work.
On Wed, Jul 27, 2016, 15:25 Peter Rapčan <address@hidden> wrote:Hello everybody,Tried to follow the fix by Jienzhe. However, on my machine there is no tm_sage file in the place where ist’s supposed to be (/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/bin/tm_sage) — see below. There is a tm_sage file in my fink installation of the old TeXmacs 1.0.7 at /sw/lib/TeXmacs/bin/tm_sage, which I never used to run sage -- hence I suppose the tm_sage file is not buit on the fly when first running a sage session. Right?What I get is the following:sys:1: RuntimeWarning: not adding '‘/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/bin' to sys.path since its status cannot be determinedpython: can't open file '‘/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/bin/tm_sage‘': [Errno 2] No such file or directory.Any advice?Best,Peter.On 28 May 2016, at 10:40, Jiezhe Wang <address@hidden> wrote:I found an temporary way to fix the "error which" problem for sage
plugin. Just change "`which tm_sage`" to "/usr/lib/TeXmacs/bin/tm_sage"
in "/usr/share/TeXmacs/plugins/sage/progs/init-sage.scm" and it works!
If you install TeXmacs at other place, it should be something similar.
I guess the problem is that guile cannot recognize command substitution.
--
My current OpenPGP key:
dsa3072/EEE00331 (expires: 2025-07-18)
02D0 27CE DC67 6FA7 EC5E 09B9 A498 B054 EEE0 0331
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Peter Rapčan, 07/27/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Karl Hegbloom, 07/28/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Peter Rapčan, 07/28/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Peter Rapčan, 07/28/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Karl Hegbloom, 07/30/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Jiezhe Wang, 07/31/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Peter Rapčan, 07/28/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Peter Rapčan, 07/28/2016
- Re: [TeXmacs] A temporary way to fix problem with sage plugin, Karl Hegbloom, 07/28/2016
Archive powered by MHonArc 2.6.19.