jEdit Community - Resources for users of the jEdit Text Editor
Console plugin environment variable issue
Submitted by SpiceWare on Friday, 3 October, 2014 - 17:09
I've been using jEdit for Atari 2600 homebrew development since 2006. Spurred on by a fellow homebrewer, I recent delved into the plugins to figure out how to compile and run code from jEdit. I got it mostly working, though I ran into a problem with the environment variables. To figure out what was going on, I replaced my Custom Command for the Interpteter with an echo command and did some tests:

echo $f
/Users/darrellspice/Projects/Atari/Draconian/draconian.asm

echo $d
/Users/darrellspice/Projects/Atari/Draconian

echo $n
draconian.asm

echo $c
draconian

I know I can use multiple environment variables per command because my custom compile command works. The following compiles my source code (draconian.asm) and creates three output files(draconian.sym, draconian.lst and draconian.bin):
dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin

For the interpreter step I needed to use the full path to the bin file, which is the source file with the extension .asm replaced with .bin. I thought that could be accomplished by $d/$c.bin but it fails to work.

echo $d/$c.bin
/Users/darrellspice/Projects/Atari/Draconian/.bin

The results I was expecting were:
/Users/darrellspice/Projects/Atari/Draconian/draconian.bin

So for some reason the second environment variable is being ignored. Any ideas? About jEdit shows:
jEdit 5.2pre1 server-background mode, using Oracle Corporation Java 1.7.0_67

In case you're wondering, Draconian is a port of Bosconian for the 2600. You can read about it, and even download a WIP ROM to run in Stella, over at AtariAge:
http://atariage.com/forums/topic/225044-draconian-2600/
http://stella.sourceforge.net

Thanks!
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Bug
by Robert Schwenn on Sat, 04/10/2014 - 11:19
The second variable will be recognized if it were preceeded by a space. I guess it's a bug, but I'm not sure.

Maybe You could call a shell script, pass $f and create the target path string by Yourself.
 
Thanks I'll use the Report a
by SpiceWare on Sat, 04/10/2014 - 15:58
Thanks I'll use the Report a Bug link I see over there on the right side.

For now I have a workaround, change this:
dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$c.bin

to this:
dasm $n -f3 -v0 -s$c.sym -l$c.lst -o$n.bin

then use the following as the parameter:
$f.bin

It results in the bin being called draconian.asm.bin instead of draconian.bin.
 
I tried the Report a bug link
by SpiceWare on Sun, 05/10/2014 - 17:58
I tried the Report a bug link, but got a 404 error.
 
SourceForge Tickets
by Robert Schwenn on Sun, 05/10/2014 - 19:07
SourceForge seems to change permanently last time. The jEdit tickets are there:

http://sourceforge.net/p/jedit/_list/tickets?source=navbar

Use "Bugs" for this.
User login
Browse archives
« December 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
31
 
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   101635
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