#10555: Add services to Sage.app
------------------------------------+---------------------------------------
Reporter: iandrus | Owner: iandrus
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.3
Component: user interface | Resolution:
Keywords: mac app,services | Work issues:
Report Upstream: N/A | Reviewers: Karl-Dieter Crisman
Authors: Ivan Andrus | Merged in:
Dependencies: #8473, #11026 | Stopgaps:
------------------------------------+---------------------------------------
Changes (by kcrisman):
* milestone: sage-5.1 => sage-5.3
Comment:
> or just running /System/Library/CoreServices/pbs which should rebuild
the services list. If that works, then we should probably add it to the
README.
Awww yeahhhh. Yup, this works, so you definitely should add this to the
instructions.
Unfortunately, apparently it has trouble deciding on an app. I
highlighted some text (`2+2`), right-clicked, chose preparse, and got
{{{
Running...
/Users/.../sage-4.4.4-mcbc/data/extcode/sage/ext/mac-
app/Sage.app/Contents/Resources/script: line 14: cd: /tmp/sage-map-app: No
such file or directory
Setting environment variables
/Users/.../sage-4.4.4-mcbc/data/extcode/sage/ext/mac-
app/Sage.app/Contents/Resources/script: line 18: ./local/bin/sage-env: No
such file or directory
}}}
I didn't even know I '''had''' a Sage app in there! And in fact, I don't
- I just have the usual data/extcode stuff. This was a surprise. Yes, I
have the correct binary picked for the actual existing Sage app (I used it
to test #10556 just now and `which sage` was always what it was supposed
to be).
Moving this binary off the Desktop and into Downloads fixed the problem.
Not sure what that was about. But if you can't even have a command-line
Sage somewhere around for this, that's a little different from the other
issues we've seen with multiple Sage.app's.
----
Trying the services:
* Preparse was almost eery. Seemed to work fine.
* Trying to ''evaluate'' `2+3` and replace it:
{{{
The “Evaluate Code in Sage (and replace)” service could not be used
because the “Sage-click-path-services” application did not provide valid
data.
Try using the service differently, or contact the vendor for an updated
version of “Sage-click-path-services.”
}}}
Whether the server was on or not did not seem to matter. Oh wait, I
needed to use `print` ... well, maybe that should be even bigger? Is it
possible to detect the word `print`? Or maybe since we don't really do
that with the menu shortcut we don't need to here. What do you think?
* With trying to get it to execute in a new terminal session:
{{{
sage: arrow2d(headpoint=None, tailpoint=None); exit
'Use Ctrl-D (i.e. EOF), %Exit, or %Quit to exit without confirmation.'
sage:
}}}
Wow! Where did that come from? I know that sort of message has been
bandied about elsewhere - has that been built in all the time in the app?
I haven't seen it in prior testing, that I recall, though that was a long
time ago. Awesome. Except for the fact that in this case it doesn't
actually exit, since it's inside Sage. That probably will need a little
tweaking.
* As for trying the new worksheet file, this didn't seem to work as well.
{{{
http://localhost:8000/upload_worksheet?url=file://localhost/var/folders/Yy/YytEJm5VEB0+pBRD7JNLe++++TQ/-Tmp-/sage.fp5w.txt
}}}
never opened, it just sat like a bump in the browser URL area.
* Uncompressing Sage packages is weird. It creates the directory, but
with a {{{[space]2}}} after it. This also causes problems in compressing.
* Unpacking spkg command just quits mid-word in the "preview of command"
popup (I really like this in these things) and there is no scroll bar to
indicate it goes on. You have to pull on the popup window and make it
bigger.
And then there is this issue.
{{{
/Users/.../sage-5.1.beta1-flask/sage --pkg_nc /Users/.../brian-1.2.1.p0 2
}}}
which clearly isn't going to work, because there is no `brian-1.2.1.p0`,
there is only `brian-1.2.1.p0\ 2`. Whatever escaping I do, I then get
this error message that you shouldn't have weird characters anyway, and
then it tells me also that 2.spkg can't be created.
And then even when I make a normal thing, I get
{{{
Creating Sage package /Users/.../brian-1.2.1.p1
tar: brian-1.2.1.p1: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
Created package brian-1.2.1.p1.spkg.
NAME: brian
VERSION: 1.2.1.p1
SIZE: 0K
HG REPO: Error reading repository
SPKG.txt: File is missing
}}}
i.e. this part is broken, because I shouldn't have to think to use it.
* What sort of files should give the service for testing? I can't get it
for .rst or .py files. Maybe that's because I don't have Sage as the
"default open" for such files.
It ''does'' work for folders. It ''does'' work for .sage files. But
you'd think that even for things that weren't default to open in Sage.app,
they should still do what I ask.
----
Overall, it looks cool. I certainly now think that Services are useful in
general! Hadn't really tried much before. But I don't know that these
services are quite ready for prime-time yet.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10555#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.