[prev in list] [next in list] [prev in thread] [next in thread] 

List:       elinks-users
Subject:    Re: [elinks-users] Elinks and Local Shell Links
From:       Jonas Fonseca <fonseca () diku ! dk>
Date:       2006-01-29 16:07:09
Message-ID: 20060129160709.GE16422 () diku ! dk
[Download RAW message or body]

Nigel Hamilton <nigel@turbo10.com> wrote Thu, Jan 26, 2006:
> 
> Hi Jonas,

Hello,

> 	Not too long ago you added a feature to enable insitu editing of 
> files on the client side:

Which turned out to be kind of broken, so you definitely want to either
hold on to that version or use the method I outline below, because I
plan to change the behaviour back to be more similar to the old way.
That is, to check if the file exists before executing the program.

> The good news is in-situ file editing works perfectly! Thanks heaps. So 
> this URL works:
> 
> 	file:///home/search/turbo10/html/test.html.plugvi"
> 
> However when I try embedding the line number to jump too ...
> 
> 	file:///home/search/turbo10/html/test.html~341.plugvi"
> 
> ... an elinks dialog box pops up with the message:
> 
> 			Error
> 		Unable to retrieve file
> 		No such file or directory
> 
> Any ideas?

Lots! ;)

Well, you could try to use the user protocol thing instead. That is, use
your own URL scheme and define a protocol handler which is the plugvi
script. ELinks will (still) release the terminal before executing the
plugvi script. So add something like this to ~/.elinks/elinks.conf

	set protocol.user.plugvi.unix = "plugvi %u"
	set protocol.user.plugvi.unix-xwin = "plugvi %u"

Use

	<a href="plugvi://?file=/path/file;line=20">link</a>

And you script will get the URL (encoded) as an arg

	%3ffile%3d/path/file%3bline%3d20

As you can see the user defined protocol URLs are mangled (a bug) but
you should be able to workaround that. I've only played a little with
it but it should be much simpler than the other thing I proposed and not
subject to change.

I hope you will be able to get this to work this time.

-- 
Jonas Fonseca
_______________________________________________
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic