| 86 | -------- |
| 87 | Services |
| 88 | -------- |
| 89 | |
| 90 | Sage.app provides several system services. On Mac OS 10.6 you will |
| 91 | have to enable those you wish to use in System Preferences > Keyboard > |
| 92 | Keyboard Shortcuts > Services. On earlier versions all services are |
| 93 | enabled, and you must use a third party application to disable those |
| 94 | which are undesired. Services can be invoked either from a contextual |
| 95 | menu, or from the Services submenu of the Application menu (the menu |
| 96 | with the name of the application). |
| 97 | |
| 98 | Those services provided by Sage.app are of two types: those acting on |
| 99 | files and those acting on text selection. Selecting a file of the |
| 100 | correct type in the Finder will allow you to invoke the service which |
| 101 | act on files. Selecting text in (almost) any application will allow |
| 102 | you to invoke the correct services on that text. Some textual |
| 103 | services require ability to write to the document (e.g. selection on a |
| 104 | webpage won't work). Such services have "(and replace)" in the name. |
| 105 | |
| 106 | - Act on Files |
| 107 | - Test file with Sage -- run `sage -t` on a file or folder |
| 108 | - Unpack Sage Package -- untar an spkg |
| 109 | - Create Sage Package -- turn a folder into an spkg |
| 110 | - Create Uncompressed Sage Package |
| 111 | - as above, but uncompressed |
| 112 | - Act on text selection |
| 113 | - New Sage Worksheet with Selection |
| 114 | - New Sage Terminal Session with Selection |
| 115 | - Preparse Code in Sage (and replace) |
| 116 | - preparse in a temp file which is slightly different than `preparse("...")` |
| 117 | - Evaluate Code in Sage (and replace) |
| 118 | - Uses `sage -c` so it can be slow and you must `print` the answer |
| 119 | |
| 120 | One potential problem is if you have more than one version of Sage.app |
| 121 | installed the system can become confused and use the wrong version to |
| 122 | invoke the service. I'm not aware of a work around other than |
| 123 | deleting old versions. |
| 124 | |