[elinks-users] Elinks and Local Shell Links
fonseca at diku.dk
Sat Jan 7 10:53:53 PST 2006
Nigel Hamilton <nigel at turbo10.com> wrote Sat, Jan 07, 2006:
> I'm wanting to use Elinks to create JavaDoc-esque class browser in
> HTML. Ideally I would like the user to traverse the documentation and then
> click on a link and open up the local filename (e.g., HelloWorld.java) at a
> specific line (e.g. 415).
> I'm wondering if Elinks can solve my problem?
> I could load everything into a textarea (via local CGI) and enable
> people to <cntrl> T to the EDITOR ... but this won't drop them off at the
> correct line (i.e., 415).
> I've tried enabling local CGI and then doing a system call:
> system("/usr/bin/vi +415 HelloWorld.java") but this fails too.
You need to run vi in a separate xterm or something, else ELinks and vi
both think they are in control of the terminal.
> Ideally I want to spawn off a new process based on a local link but
> parameterize the call (e.g, vi +115 HelloWorld.java) based on link specific
> I'm really impressed with elinks and hope to use it ... but this is
> the only snag? Any ideas on how I can achieve this with elinks. I would
> also like to run the compiler via elinks (e.g., javac HelloWorld.java).
> Any ideas?
It depends on how much of this JavaDoc-esque HTML you are in control of.
One problem is that if you specify an external handler, which seems to
be what you want, ELinks will create a copy of the local file in a temp
dir and you probably want to edit the file 'in place'. So if you can
create a small file for each link with a special extention and
containing the path to the file and the line to edit and then map that
extension to an external handler that will start vi or whatever you want
to do -- it could be a small shell script -- I think this could work.
This will also make it possible to have ELinks release it's control of
the terminal while your little shell script does it's thing.
Maybe you should just convince us to fix the caching of local files in
temp directories, and make things much easier for you. ;)
More information about the elinks-users