jEdit Community - Resources for users of the jEdit Text Editor
How to invoke external interpreter?
Submitted by tlp on Monday, 15 September, 2008 - 19:33
I am trying to use the console-plugin to invoke my sml-interpreter, but I can't seem to figure out how to do it.

I go to the console plug-in settings, chose 'Compile & Run' pane and then I scroll down to the 'ml' dropdown lists. But in the dropdowns I cannot choose my interpreter, only the 'preinstalled' ones (ant, diff, hugs, java, javac...).

I'd appreciate a hint in the right direction.

Regards,
Trolle
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
That list is generated by the
by elberry on Mon, 15/09/2008 - 21:45
That list is generated by the available commandos.

So you'll need to create a commando for your compiler/interpreter and put it in ~/.jedit/console/commando

Take a look at the Console help files, there's a good set of instructions on how to create commandos.

If you need any help with the beanshell part of it, please let us know.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
 
Commands question
by tlp on Mon, 15/09/2008 - 22:19
Apparently there are no files in my ~/.jedit/console/commando directory - so how are the available commandos generated?

Any other examples on commandfiles than http://plugins.jedit.org/plugindoc/Console/ch05s03.html.. I just need to invoke the command /path/mosml -P full on my current buffer, that is all..

regards,
Trolle
 
The pre-installed ones exist
by elberry on Tue, 16/09/2008 - 01:15
The pre-installed ones exist in the Console plugin jar file.

If you uninstall the console plugin and reinstall it with the "download source" option checked. You can look through the source to find them.

If all you need is to run that command with the full path to your current buffer, this shouldn't be too hard.

I'll see if I can whip something up later tonight.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
 
K. This assumes some things.
by elberry on Tue, 16/09/2008 - 06:34
K. This assumes some things.

Like:
1. "mosml" is on your path, so you don't need to know the full path.
2. mosml works on full paths to files: Eg. mosml /my/full/path/to/something.sml

[code]
<?xml version="1.0" ?>
<!DOCTYPE COMMANDO SYSTEM "commando.dtd">
<COMMANDO>
   <UI>
      <ENTRY LABEL="Compiler Command" VARNAME="command" DEFAULT="mosml"/>
      <FILE_ENTRY LABEL="Source file(s)" VARNAME="source" EVAL="buffer.getPath()" />
      <!-- YOU CAN ADD MORE UI ELEMENTS HERE. -->
   </UI>
   <COMMANDS>
      <COMMAND SHELL="System" CONFIRM="FALSE">
         return command + " " + source;
      </COMMAND>
   </COMMANDS>
</COMMANDO>
[/code]

It's really pretty simple, you just set up the command to return a command you would normally run in the terminal.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
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
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300