[elinks-dev] Remove current_url parameter of Python goto_url_hook?

M. Levinson levinsm at users.sourceforge.net
Sun Dec 31 08:00:34 MST 2006


On Dec 31, 2006, at 11:30am, Kalle Olavi Niemitalo writes:
>src/scripting/python/hooks.c (script_hook_url) calls hooks as
>goto_url_hook(new-url, current-url) and follow_url_hook(new-url).
>It has a comment saying that the current-url parameter exists
>only for compatibility and that the script can instead use
>elinks.current_url().  However, the current-url parameter was
>added in commit 87e27b9b3e47671484c7eb77d61b75fffc89624f and is
>not in ELinks 0.11.2, so any compatibility problems would only
>hit people who have been using 0.12.GIT snapshots.  Can we remove
>the second parameter now before releasing ELinks 0.12pre1?

The decision isn't up to me, but I think this is a good idea. Here's a  
patch that would update the documentation and hooks.py, as well as hooks.c.

FYI, if this patch is applied then anyone who's still trying to use a
goto_url_hook that expects a second argument will get a "Browser scripting
error" dialog box that says:

	An error occurred while running a Python script:

	TypeError: goto_url_hook() takes exactly 2 arguments (1 given)  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 3991 bytes
Desc: not available
Url : http://linuxfromscratch.org/pipermail/elinks-dev/attachments/20061231/c2a76d00/attachment.bin 


More information about the elinks-dev mailing list