Re: [elinks-dev] Remove current_url parameter of Python goto_url_hook?
M. Levinson [EMAIL PROTECTED] writes: I don't expect this to be an issue. Instead of adding new arguments to the hooks, it will be simpler and more flexible to make any additional data available to them by extending the API of the embedded interpreter's builtin elinks module. In other words, rather than adding a new argument foo to any given hook, Python users should be provided with a new function elinks.get_foo() that can then be called from whichever hooks they want. That is fine for getting information about the current status of ELinks. However, I've been thinking of adding radio buttons Open in: (o) this tab, ( ) new tab, ( ) new window to the Go to URL dialog, perhaps even with a [ ] reload check box. If we wanted to pass this data to the goto_url_hook, I think it would be a bit unnatural to add an elinks.get_target function for that purpose. What would it do if called from outside the hook? On the other hand, perhaps there is no reason to tell the hook how ELinks will open the result; perhaps there should even be an elinks.set_target function for the hook; or perhaps we'll later add a goto_url_hook2 that gets more arguments and by default just calls goto_url_hook with the URL. pgplBfEl6FaP7.pgp Description: PGP signature ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Remove current_url parameter of Python goto_url_hook?
On Jan 01, 2007, at 6:58pm, Kalle Olavi Niemitalo writes: I applied the patch as 26473f72f59641aa60277f14f703f8a76dda5a82, so that users of snapshots will notice it and can complain if they don't like it. Sounds good. I think it should be straightforward for a snapshot user to fix hooks.py (by removing the second argument to goto_url_hook() and calling elinks.current_url() if needed), but if anyone has further questions I'll be happy to help. Do you anticipate having to add more arguments to the hooks in the future; should we advise users to write hooks in such a way that they ignore extra arguments? I don't expect this to be an issue. Instead of adding new arguments to the hooks, it will be simpler and more flexible to make any additional data available to them by extending the API of the embedded interpreter's builtin elinks module. In other words, rather than adding a new argument foo to any given hook, Python users should be provided with a new function elinks.get_foo() that can then be called from whichever hooks they want. ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Remove current_url parameter of Python goto_url_hook?
M. Levinson [EMAIL PROTECTED] writes: 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. I applied the patch as 26473f72f59641aa60277f14f703f8a76dda5a82, so that users of snapshots will notice it and can complain if they don't like it. Do you anticipate having to add more arguments to the hooks in the future; should we advise users to write hooks in such a way that they ignore extra arguments? I don't really know Python but I assume it wouldn't be difficult. pgp73YpPT6U0I.pgp Description: PGP signature ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev