From yan at seiner.com Fri Apr 13 16:21:25 2007 From: yan at seiner.com (Yan Seiner) Date: Fri, 13 Apr 2007 15:21:25 -0700 Subject: [elinks-users] elinks, DOM, and javascript Message-ID: <46200265.7030708@seiner.com> I've been playing with elinks. It's a great browser and is almost exactly what I need.... Before I dive deep into the code, what is the status of DOM / javascript implementation? It seems to partially work, but I really, really need to manipulate form fields with javascript. I build elinks with libsee and none of the javascript seems to work - not surprising given that it's documented that way. What needs to be done to implement DOM/javascript for forms? Thanks, --Yan From fonseca at diku.dk Sun Apr 15 00:53:41 2007 From: fonseca at diku.dk (Jonas Fonseca) Date: Sun, 15 Apr 2007 08:53:41 +0200 Subject: [elinks-users] elinks, DOM, and javascript In-Reply-To: <46200265.7030708@seiner.com> References: <46200265.7030708@seiner.com> Message-ID: <20070415065341.GA2861@diku.dk> Hello Yan, Yan Seiner wrote Fri, Apr 13, 2007: > I've been playing with elinks. It's a great browser and is almost > exactly what I need.... > > Before I dive deep into the code, what is the status of DOM / javascript > implementation? For rendering HTML and doing javascript ELinks still uses the original HTML engine, which is beginning to show its age. It was written before DOM and javascript really caught on so javascript support has kind of been "glued on". Work was started (a few times actually) to write a new HTML engine but neither attempts have resulted in something that can replace the original engine. There are some non-trivial stuff like incremental loading and of course the problem of making a light-weight but fast implementation of DOM. The (recent) DOM engine, however, lives in the tree and is used for HTML highlighting (optional feature at build time). The DOM parser is mostly done, but the work for the layouter CSS rendering part remains untouched. > It seems to partially work, but I really, really need to manipulate form > fields with javascript. I am not much into the javascript support. I do, however, remember seeing work on form manipulation. > I build elinks with libsee and none of the javascript seems to work - > not surprising given that it's documented that way. > > What needs to be done to implement DOM/javascript for forms? Since you mention DOM, I guess you are requiring the ability to modify the DOM tree by adding fields etc. ELinks doesn't expose such a thing. So it might be a lot of work. On the other hand you don't say exactly what you need so I don't want to sound too negative. -- Jonas Fonseca From yan at seiner.com Sun Apr 15 08:02:57 2007 From: yan at seiner.com (Yan Seiner) Date: Sun, 15 Apr 2007 07:02:57 -0700 Subject: [elinks-users] elinks, DOM, and javascript In-Reply-To: <20070415065341.GA2861@diku.dk> References: <46200265.7030708@seiner.com> <20070415065341.GA2861@diku.dk> Message-ID: <46223091.8020301@seiner.com> Jonas Fonseca napsal(a): > Hello Yan, > > Yan Seiner wrote Fri, Apr 13, 2007: > >> I've been playing with elinks. It's a great browser and is almost >> exactly what I need.... >> >> Before I dive deep into the code, what is the status of DOM / javascript >> implementation? >> > > For rendering HTML and doing javascript ELinks still uses the original > HTML engine, which is beginning to show its age. It was written before > DOM and javascript really caught on so javascript support has kind of > been "glued on". > I figured this out - AFAICT it's basically been stuck in to handle the element. > Work was started (a few times actually) to write a new HTML engine but > neither attempts have resulted in something that can replace the > original engine. There are some non-trivial stuff like incremental > loading and of course the problem of making a light-weight but fast > implementation of DOM. The (recent) DOM engine, however, lives in the > tree and is used for HTML highlighting (optional feature at build time). > The DOM parser is mostly done, but the work for the layouter CSS > rendering part remains untouched. > > >> It seems to partially work, but I really, really need to manipulate form >> fields with javascript. >> > > I am not much into the javascript support. I do, however, remember > seeing work on form manipulation. > > >> I build elinks with libsee and none of the javascript seems to work - >> not surprising given that it's documented that way. >> >> What needs to be done to implement DOM/javascript for forms? >> > > Since you mention DOM, I guess you are requiring the ability to modify > the DOM tree by adding fields etc. We send a form with a fixed number of fields. What we need is the ability to change the values in several fields based on incoming characters, and to toggle visibility of lines in the form. > ELinks doesn't expose such a thing. > So it might be a lot of work. On the other hand you don't say exactly > what you need so I don't want to sound too negative. > What we are working on is the front end to a control system. The system can be controlled via an ordinary web browser via 802.11 or via a small, built-in screen. The built-in screen is 320x240, monochrome, and has a minimal keypad - basically, nav buttons (Up, Down, Right, Left), Increment/Decrement, and Enter. Each field stores its properties as attribtutes, so that a field might have the following attributes: Max, Min, Wrap, Inc We then use Javascript to modify the form entry field. If the Javascript gets an Increment command, it adds the Inc to the field, checks for Max value, if it exceeds Max it then either clamps it or wraps it to Min, depending on the value of Wrap. We also toggle visibility of lines in the table, but we could change that to scrolling. The only other thing we do that's a bit complex is insert/delete lines in the form - but we're not actually adding or deleting lines, we're just copying data from one line to another. Each form has a fixed number of lines. Could that be done? If so, what do I need to enable during build time to test it? Thanks, --Yan From fonseca at diku.dk Sun Apr 15 15:02:40 2007 From: fonseca at diku.dk (Jonas Fonseca) Date: Sun, 15 Apr 2007 23:02:40 +0200 Subject: [elinks-users] [ANNOUNCE] ELinks 0.11.3 Message-ID: <20070415210240.GA16601@diku.dk> Hello, This release merges a lot of changes from the unstable branch. It mainly focuses on bug fixes, while it also adds a few enhancements. Among the updates are various security related fixes, so people following 0.11 are advised to update. A big thanks goes to Kalle who did much of the work for this release. Below is the complete shortlog of changes since version 0.11.2. See the NEWS file for the highlights! Adam Golebiowski (2): Polish translation was updated. Small typo in polish translation. Eric Wald (1): Add support for forcing wrapping at the screen boundary Jens Seidel (1): [INTL:de] German PO file corrections Jonas Fonseca (17): elinks-0.11.2.GIT BOOKMARKS: Fix XBEL calling add_bookmark() with NULL title Ignore test files FSP: Check and exit the file 'writer' process if writes to stdout fails Describe the document.uri_passing option in more depth BUILD: Always show manual and manpage build info, remove AC_SUBST dups Make ELinks more BSD console friendly Add a stupid test script to print CGI variables set by ELinks Fix misparsing of -remote URLs containing parenthesis (bug 830) Bug 831: Make it possible to quote args given to -remote Merge with git+ssh://pasky/srv/git/elinks#elinks-0.11 Bug 899: Fix size handling in FTP directory listings Add support for more graceful detection of HTML content Fix crashes with various bogus BitTorrent URLs Fix assertion failure in the charset menu related to special codepages Fix warning from last patch Add .mailmap file to help git-shortlog Kalle Olavi Niemitalo (75): Bug 846: Document the private data in each SMJS class. Bug 846: Comments on the relations between JSClasses and functions. Bug 846: Document the expected parents of SMJS class instances. Bug 846: Document the JSClass assumed in each JS_{Set,Get}Private call. Bug 846: Rename some local variables. Bug 846: Separate JS_GetParent & JS_GetPrivate calls from initializations. Bug 846: Add plenty of JS_InstanceOf assertions and checks. SMJS: keymap_get_property: fix build error Bug 846: Document the expected parents of form_elements_class instances. Bug 868: check_timers: Don't keep pointers to other timers past timer->func. Bug 846: {get,set}Property check JS_InstanceOf without asserting. Bug 870: Don't panic if an SMJS property ID is unrecognized. Bug 830: Check -remote command names more strictly. Bug 919, mem_mmap_realloc: Don't overflow the buffer when shrinking it. Bug 937, http_send_header: Don't send all headers to CONNECT proxy. Bug 937, http_send_header: Initialize the entry pointer. cgi: Ensure correct type of NULL pointer to variadic execl. cgi: Avoid assertion failure when the POST data is empty. textarea_edit: Cast size_t fx_maxlength to match "%u". XBEL: Fix us-ascii charset lookup. string_assert: First arg of elinks_internal is a format string. Reject CR and LF characters in FTP pathnames. ftp, add_file_cmd_to_str: Check errors from string functions. add_html_to_string: If out of memory, roll back and return NULL. add_string_to_string: Don't fail if @from is empty. NEWS update Advertise smb2.c to be included in ELinks 0.12.0. NEWS: -remote changes don't deserve two separate entries. NEWS: More details about Python goto_url_hook changes. NEWS: mention bug 769 Bug 772: Recognize ESC [ Z as Shift-Tab, and bind it like Alt-Tab by default. NEWS: mention bug 772 Bug 908, activate_link: Set fs->state before the fs pointer becomes invalid. NEWS: mention bug 908 Bug 886: Document why delete_cookie does not set cookies_dirty. Bug 886: Postpone resaving the cookies until a bottom half. Bug 886: Update cookies_dirty after delete_cookie calls as appropriate. Bug 886: Set cookies_dirty if a cookie is edited via the manager. NEWS: mention bug 886 BFU: Fix searching in menus past unselectable items. BFU: Fix infinite loops in menus that have only unselectable elements. NEWS: mention bug 24 NEWS: mention bug 767 NEWS: show the severities of bugs; mention bug 872 NEWS: mention bug 927 NEWS: mention bug 760 NEWS: mention the crash in the file extensions menu NEWS: mention half of bug 396 do_move_bookmark: Update comment to match reality. NEWS: more verbose descriptions from 0.12.GIT; mention bug 630 NEWS: more verbose descriptions from 0.12.GIT "Do not show anymore" resets ui.success_msgbox, instead of toggling it. doc: cut-clipboard does not merely delete text from clipboard. NEWS: mention bug 768 NEWS: mention bug 921 and Debian 313696 NEWS: mention the SMJS null pointer crash Bug 880: Prevent SIGSEGV in init_python when -no-home is used. NEWS: mention bug 880 Remove inaccurate information from README.Python. Revert 8bedf25b, "goto_url_hook takes 2 params not 1." NEWS: Undocument the reverted Python goto_url_hook change. NEWS: mention umask in secure file saving do_auth_dialog: Fix off-by-one error leading to reads of uninitialized memory. NEWS: mention the authentication dialog NEWS: mention decoding of URI fragment NEWS: mention the null pointer crash with $HTTP_PROXY NEWS: mention bug 729 NEWS: mention bug 738 (fixed in 0.11.1) NEWS: identify bugs 715 and 694 Bug 941: Survive an unexpected number of 227 or 229 FTP responses. NEWS: remote exploits first NEWS: mention bug 941 fi.po: Made update-po fi.po: updates, mostly from 0.12.GIT Merge with http://elinks.cz/elinks-0.11 Laurent MONIN (8): Include and fix compilation on an old PPC/Debian system Fix compilation under gcc 4.x. Backported from gentoo portage. Fix segfaults caused by ruby scripting (gentoo bug #121247). Backported HTTP DIGEST AUTH: fix wrong sizeof(), patch by Vitaly Lavrov (added to Let be more tolerant with buggy meta refresh. It should fix bug 767. Compilation fix: _GNU_SOURCE has to be defined on GNU platforms to get Fix crash due to untested null pointer occuring when doing French translation was updated. Miciah Dashiel Butler Masters (13): SMJS: keymap_set_property: fix build error Use enum connection_state refresh_view: drop unnecessary call to redraw_from_window Initially place cursor on the current listbox item Update Lua configure check for 5.0 Re-use @fs in activate_link instead of introducing a new local variable Bookmarks: Fix update after move do_move_bookmarks: replace destb and desti parameters with insert_as_child flag MIME: fix crash with empty File extensions menu menu_handler: Don't call get_parent_ptr for redraw events SMJS: fix segfault on exit Secure file saving: restore umask after _all_ failure conditions Decode the fragment identifier extracted from the URI when looking it up Petr Baudis (2): Cure few of my ie.-vs-e.g. sins Tidyup. Russ Rowan (1): Scary stuff indeed. Timo Lindfors (1): Fix bug #741: "html comments shouldn't be evaluted inside STYLE elements" Witold Filipczyk (21): Compilation fixes Compilation fix when --without-openssl was used Compilation fix Added slash to base href when directory didn't end with '/' goto_url_hook takes 2 params not 1. Some dumbprefixes defined in hooks.py Info about Python scripting Add slash after host required by URI_HTTP_REFERRER_HOST Removed *.html and fixed typos >& is bashism spec: s/gawk/awk/ cgi: set_nonblocking_fd POST method of CGI did not work. It works now. cgi: Fix the possible memleak and close pipes in case of error. ftp: ftp didn't handle filenames with spaces. Accesskey didn't work as it should. accesskey: start iterating with next link. get_attr_value: do not do trim_chars The fix for the bug 927. Fix the memleak. Part II of the 927 bugfix. Removed outdated entries. Bugfix for bug 768 -- Jonas Fonseca From cga2000 at optonline.net Sun Apr 15 18:58:48 2007 From: cga2000 at optonline.net (cga2000) Date: Sun, 15 Apr 2007 20:58:48 -0400 Subject: [elinks-users] ELinks & UTF-8 Message-ID: <20070416005848.GB30229@turki.gavron.org> Is anyone running ELinks successfully in linux under one of the UTF-8 locales? I've tried to get this to work for about a month and still no joy. I get artifacts all over the place, the Elinks menus have fuzzy borders and any language I try only has the 7-bit ascii characters. All accented characters are replaced by spaces or "*". Since just about every web page I have checked does not use a unicode charset anyway, (including most of the pages that discuss unicode!!) I would be content using plain old iso8859-1 in ELinks ... if only I could get it to work. I suspect this is a problem with ELinks since I don't have any problems with w3m. I am currently running version 0.11.1. Thanks, cga From tony.szturc at seznam.cz Mon Apr 16 06:55:20 2007 From: tony.szturc at seznam.cz (Tonda Szturc) Date: Mon, 16 Apr 2007 14:55:20 +0200 Subject: [elinks-users] ELinks & UTF-8 In-Reply-To: <20070416005848.GB30229@turki.gavron.org> References: <20070416005848.GB30229@turki.gavron.org> Message-ID: <200704161455.20166.tony.szturc@seznam.cz> On Monday 16 of April 2007 02:58:48 cga2000 wrote: > Is anyone running ELinks successfully in linux under one of the UTF-8 > locales? > > I've tried to get this to work for about a month and still no joy. > > I get artifacts all over the place, the Elinks menus have fuzzy borders > and any language I try only has the 7-bit ascii characters. > > All accented characters are replaced by spaces or "*". > > Since just about every web page I have checked does not use a unicode > charset anyway, (including most of the pages that discuss unicode!!) I > would be content using plain old iso8859-1 in ELinks ... if only I could > get it to work. > > I suspect this is a problem with ELinks since I don't have any problems > with w3m. > > I am currently running version 0.11.1. > > Thanks, > cga Hi, I had the same problem. As far as I know, this should be fixed in 0.12 release. Now I use unstable GIT snapshot from 0.12 branch, and it works fine for me. If you would like to try it, go there - http://elinks.or.cz/download.html and grab the snapshot, build it and then, go Setup => Character set => Unicode UTF-8. Hope it helps. From tony.szturc at seznam.cz Mon Apr 16 07:25:44 2007 From: tony.szturc at seznam.cz (Tonda Szturc) Date: Mon, 16 Apr 2007 15:25:44 +0200 Subject: [elinks-users] ELinks & UTF-8 In-Reply-To: <200704161455.20166.tony.szturc@seznam.cz> References: <20070416005848.GB30229@turki.gavron.org> <200704161455.20166.tony.szturc@seznam.cz> Message-ID: <200704161525.44157.tony.szturc@seznam.cz> On Monday 16 of April 2007 14:55:20 Tonda Szturc wrote: > If you would like to try it, go there - > http://elinks.or.cz/download.html and grab the snapshot, build it and then, > go Setup => Character set => Unicode UTF-8. ?Hope it helps. Sorry, I missed one important information - see text below: ************** > The only remaining problem is to get the original UTF-8 contents from > elinks [3] to vim [4]. Unfortunately, it is converted to ISO-8859-1 and all > characters not representable in ISO-8859-1 end up as substitute sequences, > e.g. /- for the cross. This has been fixed in ELinks 0.12.GIT if you configure --enable-utf-8 and select UTF-8 as the charset for the terminal (different from the UTF-8 I/O option available in prior versions). Bug 822 - Should enable CONFIG_UTF8 by default (after it's safe) http://bugzilla.elinks.cz/show_bug.cgi?id=822 *************** It's from this tread: http://linuxfromscratch.org/pipermail/elinks-users/2007-February/001393.html unfortunately the response isn't available in mailing list archive. From kris.vanbruwaene at gmail.com Mon Apr 16 04:50:03 2007 From: kris.vanbruwaene at gmail.com (Kris Van Bruwaene) Date: Mon, 16 Apr 2007 12:50:03 +0200 Subject: [elinks-users] ELinks & UTF-8 In-Reply-To: <46235441.6000505@vrt.be> References: <46235441.6000505@vrt.be> Message-ID: cga2000 schreef: > Is anyone running ELinks successfully in linux under one of the UTF-8 > locales? I have it working on elinks 0.10.6 under Ubuntu Dapper (6.10). My locale is nl_BE.UTF-8, elinks is set up with default character set ISO-8859-15 and I have "UTF-8-I/O" selected under Terminal Options. Hope this helps. Kris From cga2000 at optonline.net Mon Apr 16 18:03:38 2007 From: cga2000 at optonline.net (cga2000) Date: Mon, 16 Apr 2007 20:03:38 -0400 Subject: [elinks-users] ELinks & UTF-8 In-Reply-To: <200704161525.44157.tony.szturc@seznam.cz> References: <20070416005848.GB30229@turki.gavron.org> <200704161455.20166.tony.szturc@seznam.cz> <200704161525.44157.tony.szturc@seznam.cz> Message-ID: <20070417000337.GD30229@turki.gavron.org> On Mon, Apr 16, 2007 at 09:25:44AM EDT, Tonda Szturc wrote: > On Monday 16 of April 2007 14:55:20 Tonda Szturc wrote: > > If you would like to try it, go there - > > http://elinks.or.cz/download.html and grab the snapshot, build it and then, > > go Setup => Character set => Unicode UTF-8. ?Hope it helps. > Sorry, I missed one important information - see text below: > > ************** > > The only remaining problem is to get the original UTF-8 contents from > > elinks [3] to vim [4]. Unfortunately, it is converted to ISO-8859-1 and all > > characters not representable in ISO-8859-1 end up as substitute sequences, > > e.g. /- for the cross. > > This has been fixed in ELinks 0.12.GIT if you configure > --enable-utf-8 and select UTF-8 as the charset for the terminal > (different from the UTF-8 I/O option available in prior versions). > > Bug 822 - Should enable CONFIG_UTF8 by default (after it's safe) > http://bugzilla.elinks.cz/show_bug.cgi?id=822 > > *************** > It's from this tread: > http://linuxfromscratch.org/pipermail/elinks-users/2007-February/001393.html > unfortunately the response isn't available in mailing list archive. > _______________________________________________ > elinks-users mailing list > elinks-users at linuxfromscratch.org > http://linuxfromscratch.org/mailman/listinfo/elinks-users Fantastic news .. and thanks much for replying. I'll experiment with this newer version asap. Thanks, cga From yan at seiner.com Mon Apr 16 19:11:32 2007 From: yan at seiner.com (Yan Seiner) Date: Mon, 16 Apr 2007 18:11:32 -0700 Subject: [elinks-users] editing form fields with lua Message-ID: <46241EC4.1070403@seiner.com> Is it possible to hook into the form fields to do some editing with lua? I need to intercept keystrokes and modify the values in the fields. I've been looking at the code all day long, and I still can't figure out how all the pieces fit together.... Not enough coffee.... --Yan From kon at iki.fi Tue Apr 17 01:27:25 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Tue, 17 Apr 2007 10:27:25 +0300 Subject: [elinks-users] editing form fields with lua In-Reply-To: <46241EC4.1070403@seiner.com> References: <46241EC4.1070403@seiner.com> Message-ID: <87tzvfsboi.fsf@Astalo.kon.iki.fi> Yan Seiner writes: > Is it possible to hook into the form fields to do some editing with > lua? I need to intercept keystrokes and modify the values in the fields. Not at the moment. The most up-to-date documentation is here: http://pasky.or.cz/gitweb.cgi?p=elinks.git;a=blob;hb=HEAD;f=doc/lua-scripting.txt http://elinks.cz/documentation/html/manual.html-chunked/ch14.html is currently a bit stale because of toolchain problems. From yan at seiner.com Tue Apr 17 08:28:58 2007 From: yan at seiner.com (Yan Seiner) Date: Tue, 17 Apr 2007 07:28:58 -0700 Subject: [elinks-users] editing form fields with lua In-Reply-To: <87tzvfsboi.fsf@Astalo.kon.iki.fi> References: <46241EC4.1070403@seiner.com> <87tzvfsboi.fsf@Astalo.kon.iki.fi> Message-ID: <4624D9AA.30105@seiner.com> Kalle Olavi Niemitalo napsal(a): > Yan Seiner writes: > > >> Is it possible to hook into the form fields to do some editing with >> lua? I need to intercept keystrokes and modify the values in the fields. >> > > Not at the moment. The most up-to-date documentation is here: > http://pasky.or.cz/gitweb.cgi?p=elinks.git;a=blob;hb=HEAD;f=doc/lua-scripting.txt > Thanks. On reading that, one more question: Is it possible to POST from the goto_URL? I'm thinking I could get about 98% of what I need with the xdialog + goto_url if I could POST the entries from xdialog to the server... --Yan From yan at seiner.com Tue Apr 17 10:11:34 2007 From: yan at seiner.com (Yan Seiner) Date: Tue, 17 Apr 2007 09:11:34 -0700 Subject: [elinks-users] editing form fields with lua In-Reply-To: <87tzvfsboi.fsf@Astalo.kon.iki.fi> References: <46241EC4.1070403@seiner.com> <87tzvfsboi.fsf@Astalo.kon.iki.fi> Message-ID: <4624F1B6.3070907@seiner.com> Kalle Olavi Niemitalo wrote: > Yan Seiner writes: > > >> Is it possible to hook into the form fields to do some editing with >> lua? I need to intercept keystrokes and modify the values in the fields. >> > > Not at the moment. The most up-to-date documentation is here: > http://pasky.or.cz/gitweb.cgi?p=elinks.git;a=blob;hb=HEAD;f=doc/lua-scripting.txt > Hmmm... On talking this over with my co-workers, would it be possible to provide these hooks? Basically, we need to make these changes to the way elinks operates: 1. Enter edit mode automatically as soon as you enter a form field (i.e. without pressing Enter) 2. bring up a custom editor that has some metaknowledge about the field. So we would need to know either some custom attributes of the field, or the name. 3. We would submit and reload the form on exiting the custom editor. Is there any documentation of the input system that would allow us to make these changes? --Yan From kon at iki.fi Tue Apr 17 13:17:26 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Tue, 17 Apr 2007 22:17:26 +0300 Subject: [elinks-users] editing form fields with lua In-Reply-To: <4624F1B6.3070907@seiner.com> References: <46241EC4.1070403@seiner.com> <87tzvfsboi.fsf@Astalo.kon.iki.fi> <4624F1B6.3070907@seiner.com> Message-ID: <87ejmiq08p.fsf@Astalo.kon.iki.fi> Yan Seiner writes: > 1. Enter edit mode automatically as soon as you enter a form field > (i.e. without pressing Enter) There is the document.browse.forms.insert_mode option already. OTOH, if you set it to 0, then Esc won't leave edit mode. From steve at holmesgrown.com Tue Apr 24 10:54:32 2007 From: steve at holmesgrown.com (Steve Holmes) Date: Tue, 24 Apr 2007 09:54:32 -0700 Subject: [elinks-users] CGI Scripts Message-ID: <20070424165432.GA5104@lnx3.holmesgrown.com> I'm trying to test/develop some local CGI scripts that I would run directly with elinks and *NOT* with an http server. I have elinks properly configured to run CGI and when the script is initially loaded, all seems to be fine. However, when I submit the form with 'post' method, I get an internal err from elinks - something about form.c 99 assertion failed. Anyone know anything about this? I'm currently using elinks 0.11 right now. Thanks for any help. -- HolmesGrown Solutions The best solutions for the best price! http://holmesgrown.ld.net/ From lars.bjorndal at broadpark.no Tue Apr 24 14:57:15 2007 From: lars.bjorndal at broadpark.no (Lars =?iso-8859-1?Q?Bj=F8rndal?=) Date: Tue, 24 Apr 2007 22:57:15 +0200 Subject: [elinks-users] Enable/disable ECMscript + Reading source Message-ID: Hello! I've two questions: 1. Is it possible to enable/disable ECMscript through a short cut key binding? 2. If you want to read source code with Elinks from the console, the lines is too long most of the time, to fit into the 80 character long screen line. Is it, or could it be possible to get the long lines floating to the next line, like it is e.g. in emacs/less and other program also with Elinks? Lars From steve at holmesgrown.com Tue Apr 24 19:47:59 2007 From: steve at holmesgrown.com (Steve Holmes) Date: Tue, 24 Apr 2007 18:47:59 -0700 Subject: [elinks-users] Enable/disable ECMscript + Reading source In-Reply-To: References: Message-ID: <20070425014759.GA5425@lnx3.holmesgrown.com> When I run into that, I just use the shift W command to turn on wrap mode. HTH. On Tue, Apr 24, 2007 at 10:57:15PM +0200, Lars Bj?rndal wrote: > Hello! > > I've two questions: > > 1. Is it possible to enable/disable ECMscript through a short cut key > binding? > > 2. If you want to read source code with Elinks from the console, the > lines is too long most of the time, to fit into the 80 character > long screen line. Is it, or could it be possible to get the long > lines floating to the next line, like it is e.g. in emacs/less and > other program also with Elinks? > > Lars > _______________________________________________ > elinks-users mailing list > elinks-users at linuxfromscratch.org > http://linuxfromscratch.org/mailman/listinfo/elinks-users -- HolmesGrown Solutions The best solutions for the best price! http://holmesgrown.ld.net/ From kon at iki.fi Tue Apr 24 22:41:03 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Wed, 25 Apr 2007 07:41:03 +0300 Subject: [elinks-users] CGI Scripts In-Reply-To: <20070424165432.GA5104@lnx3.holmesgrown.com> References: <20070424165432.GA5104@lnx3.holmesgrown.com> Message-ID: <874pn5m5gg.fsf@Astalo.kon.iki.fi> Steve Holmes writes: > However, when I submit the form with 'post' method, I get an > internal err from elinks - something about form.c 99 assertion > failed. Please show the exact error message. > I'm currently using elinks 0.11 right now. ELinks 0.11.3 includes one fix for POSTing to a local CGI. Are you using that, or do you still have 0.11.2? From kon at iki.fi Tue Apr 24 22:53:03 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Wed, 25 Apr 2007 07:53:03 +0300 Subject: [elinks-users] Enable/disable ECMscript + Reading source In-Reply-To: References: Message-ID: <87wt01kqc0.fsf@Astalo.kon.iki.fi> lars.bjorndal at broadpark.no (Lars Bj?rndal) writes: > 1. Is it possible to enable/disable ECMscript through a short cut key > binding? There is no built-in action for that, but if your ELinks was configured with Lua scripting, then you can implement a Lua function that changes the option, and bind that to a key. At http://bugzilla.elinks.cz/, there is an enhancement request about toggling proxy use with a keyboard shortcut; it has an attached Lua script that you could adapt. I seem unable to access the server now, so I can't give you the bug number. From witekfl at poczta.onet.pl Wed Apr 25 10:43:37 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Wed, 25 Apr 2007 18:43:37 +0200 Subject: [elinks-users] CGI Scripts In-Reply-To: <20070424165432.GA5104@lnx3.holmesgrown.com> References: <20070424165432.GA5104@lnx3.holmesgrown.com> Message-ID: <20070425164337.GA30353@pldmachine.fixsoftware.pl> On Tue, Apr 24, 2007 at 09:54:32AM -0700, Steve Holmes wrote: > I'm trying to test/develop some local CGI scripts that I would run > directly with elinks and *NOT* with an http server. I have elinks > properly configured to run CGI and when the script is initially loaded, > all seems to be fine. However, when I submit the form with 'post' > method, I get an internal err from elinks - something about form.c 99 > assertion failed. > > Anyone know anything about this? I'm currently using elinks 0.11 right > now. Thanks for any help. It's a guess. I have a problem with a assertion failure related to forms. Maybe this patch helps. check_html_form_hierarchy: Old code was buggy. Old code caused the assertion failure on the shutdownday's page. --- commit 00037979d2c0b78dcc1dc51d559ad364f987faf3 tree 4fd242edb5df049e523c8395ff70f7670e7bb8a3 parent 55c00e0a125c1aab935878c8e404e8938d058fe3 author Witold Filipczyk Fri, 23 Mar 2007 13:16:39 +0100 committer Witold Filipczyk Fri, 23 Mar 2007 13:16:39 +0100 src/document/html/renderer.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/document/html/renderer.c b/src/document/html/renderer.c index 96590d2..6dd72b2 100644 --- a/src/document/html/renderer.c +++ b/src/document/html/renderer.c @@ -1837,8 +1837,8 @@ check_html_form_hierarchy(struct part *part) foreachsafe (fc, next, form_controls) { foreach (form, document->forms) { - if (fc->position < form->form_num - || form->form_end < fc->position) + if (form->form_num <= fc->position + && fc->position <= form->form_end) continue; fc->form = form; From witekfl at poczta.onet.pl Wed Apr 25 11:51:43 2007 From: witekfl at poczta.onet.pl (Witold Filipczyk) Date: Wed, 25 Apr 2007 19:51:43 +0200 Subject: [elinks-users] CGI Scripts In-Reply-To: <20070424165432.GA5104@lnx3.holmesgrown.com> References: <20070424165432.GA5104@lnx3.holmesgrown.com> Message-ID: <20070425175143.GA3229@pldmachine.fixsoftware.pl> On Tue, Apr 24, 2007 at 09:54:32AM -0700, Steve Holmes wrote: > I'm trying to test/develop some local CGI scripts that I would run > directly with elinks and *NOT* with an http server. I have elinks > properly configured to run CGI and when the script is initially loaded, > all seems to be fine. However, when I submit the form with 'post' > method, I get an internal err from elinks - something about form.c 99 > assertion failed. > > Anyone know anything about this? I'm currently using elinks 0.11 right > now. Thanks for any help. Ignore previous reply. Does assertion failure occur in src/document/html/parser/forms.c:99 ? You don't have
set, do you? Could you send the code of CGI scripts? Witek From yan at seiner.com Wed Apr 25 18:09:26 2007 From: yan at seiner.com (Yan Seiner) Date: Wed, 25 Apr 2007 17:09:26 -0700 Subject: [elinks-users] Building an external editor for forms Message-ID: <462FEDB6.4080303@seiner.com> I'd like to build a custom editor for forms. This editor needs to know the data from an entire row of a form as it calculates values based on several fields. The idea is to hand over the document_view structure to the editor, which will then use the data from the entire form to do its thing. If I read the code correctly, I think all of the forms data is stored in struct form_control in the values and labels fields. Is that correct? and if so, where are the attributes stored? Thanks, --Yan From steve at holmesgrown.com Thu Apr 26 10:39:38 2007 From: steve at holmesgrown.com (Steve Holmes) Date: Thu, 26 Apr 2007 09:39:38 -0700 Subject: [elinks-users] CGI Scripts In-Reply-To: <20070425175143.GA3229@pldmachine.fixsoftware.pl> References: <20070424165432.GA5104@lnx3.holmesgrown.com> <20070425175143.GA3229@pldmachine.fixsoftware.pl> Message-ID: <20070426163938.GA4082@lnx3.holmesgrown.com> On Wed, Apr 25, 2007 at 07:51:43PM +0200, Witold Filipczyk wrote: > Does assertion failure occur in src/document/html/parser/forms.c:99 ? > You don't have set, do you? > Could you send the code of CGI scripts? First I did a little more experimentation and got the assertion error to go away but then the parameter list is always empty. BTW, I got this sample script to work fine with my Apache server. Oh, to answer previous questions, I'm still using version 0.11.1 and the error goes away so quickly, I cannot capture it; I know it is line 99 of something with form.c in the name. The error goes away and the CGI form comes back up. My experimentation was to add the action=... to the form definition and that actually stopped the assertion err as I mentioned before. The following script is my original version that still demos the error. It uses the CGI object in Perl 5.8. Just press on the shout or scream buttons to exhibit the problem. The sample is below. ----- Begin script ----- #!/usr/bin/perl use CGI ':standard'; print header; print start_html("Example CGI.pm Form"); print "

Example CGI.pm Form

\en"; print_prompt(); do_work(); print_tail(); print end_html; sub print_prompt { print start_form(-name=>'cgi-bin/sample1.cgi'); print "What's your name?
"; print textfield('name'); print checkbox('Not my real name'); print "

Where can you find English Sparrows?
"; print checkbox_group( -name=>'Sparrow locations', -values=>[England,France,Spain,Asia,Hoboken], -linebreak=>'yes', -defaults=>[England,Asia]); print "

How far can they fly?
", radio_group( -name=>'how far', -values=>['10 ft','1 mile','10 miles','real far'], -default=>'1 mile'); print "

What's your favorite color? "; print popup_menu(-name=>'Color', -values=>['black','brown','red','yellow'], -default=>'red'); print hidden('Reference','Monty Python and the Holy Grail'); print "

What have you got there?
"; print scrolling_list( -name=>'possessions' -values=>['A Coconut','A Grail','An Icon', 'A Sword','A Ticket'], -size=>5, -multiple=>'true'); print "

Any parting comments?
"; print textarea(-name=>'Comments', -rows=>10, -columns=>50); print "

",reset; print submit('Action','Shout'); print submit('Action','Scream'); print endform; print "


\n"; } sub do_work { my(@values,$key); print "

Here are the current settings in this form

"; foreach $key (param) { print "$key -> "; @values = param($key); print join(", ", at values),"
\n"; } } sub print_tail { print <
Lincoln D. Stein

Home Page END } ----- End script ----- -- HolmesGrown Solutions The best solutions for the best price! http://holmesgrown.ld.net/ From steve at holmesgrown.com Thu Apr 26 11:27:24 2007 From: steve at holmesgrown.com (Steve Holmes) Date: Thu, 26 Apr 2007 10:27:24 -0700 Subject: [elinks-users] CGI Scripts In-Reply-To: <20070425175143.GA3229@pldmachine.fixsoftware.pl> References: <20070424165432.GA5104@lnx3.holmesgrown.com> <20070425175143.GA3229@pldmachine.fixsoftware.pl> Message-ID: <20070426172724.GA4449@lnx3.holmesgrown.com> On Wed, Apr 25, 2007 at 07:51:43PM +0200, Witold Filipczyk wrote: > Does assertion failure occur in src/document/html/parser/forms.c:99 ? > You don't have set, do you? > Could you send the code of CGI scripts? I just tried something else and All problems appear to be gone. I left in the action=sample2.cgi and I changed the method from post to get. It now works perfectly. Does elinks require get method for CGI scripts? Note that the CGI class for Perl defaults the method to 'post'. -- HolmesGrown Solutions The best solutions for the best price! http://holmesgrown.ld.net/ From kon at iki.fi Thu Apr 26 12:04:32 2007 From: kon at iki.fi (Kalle Olavi Niemitalo) Date: Thu, 26 Apr 2007 21:04:32 +0300 Subject: [elinks-users] CGI Scripts In-Reply-To: <20070426163938.GA4082@lnx3.holmesgrown.com> References: <20070424165432.GA5104@lnx3.holmesgrown.com> <20070425175143.GA3229@pldmachine.fixsoftware.pl> <20070426163938.GA4082@lnx3.holmesgrown.com> Message-ID: <87k5vz811r.fsf@Astalo.kon.iki.fi> Steve Holmes writes: > The following script is my original version that still demos the error. Thank you. I get this error: INTERNAL ERROR at /home/Kalle/src/MIRROR/elinks-0.11.1/src/document/html/parser/forms.c:99: assertion !form->action || !strchr(form->action, POST_CHAR) failed! This bug has been fixed in ELinks 0.11.3. In the future, to catch assertion failures that disappear too fast from the screen, try redirecting stderr to a file. From steve at holmesgrown.com Fri Apr 27 08:07:29 2007 From: steve at holmesgrown.com (Steve Holmes) Date: Fri, 27 Apr 2007 07:07:29 -0700 Subject: [elinks-users] CGI Scripts In-Reply-To: <87k5vz811r.fsf@Astalo.kon.iki.fi> References: <20070424165432.GA5104@lnx3.holmesgrown.com> <20070425175143.GA3229@pldmachine.fixsoftware.pl> <20070426163938.GA4082@lnx3.holmesgrown.com> <87k5vz811r.fsf@Astalo.kon.iki.fi> Message-ID: <20070427140729.GA3596@lnx3.holmesgrown.com> On Thu, Apr 26, 2007 at 09:04:32PM +0300, Kalle Olavi Niemitalo wrote: > Thank you. I get this error: > > INTERNAL ERROR at /home/Kalle/src/MIRROR/elinks-0.11.1/src/document/html/parser/forms.c:99: > assertion !form->action || !strchr(form->action, POST_CHAR) failed! > > This bug has been fixed in ELinks 0.11.3. > In the future, to catch assertion failures that disappear too > fast from the screen, try redirecting stderr to a file. Yes, I just upgraded to 0.11.3 and the original sample1 script works flawlessly now. thanks for the help. I'll keep the redirection tip in mind if I should it again. Now off to write some local client apps that can use elinks as the user interface. -- HolmesGrown Solutions The best solutions for the best price! http://holmesgrown.ld.net/ From yan at seiner.com Fri Apr 27 16:52:51 2007 From: yan at seiner.com (Yan Seiner) Date: Fri, 27 Apr 2007 15:52:51 -0700 Subject: [elinks-users] launching a flash player Message-ID: <46327EC3.6070309@seiner.com> How do I configure elinks to launch my own flash player? The man page says: mime.type Handler <-> MIME type association. The first sub-tree is the MIME class while the second sub-tree is the MIME type (ie. image/gif handler will reside at mime.type.image.gif). Each MIME type option should contain (case-sensitive) name of the MIME handler (its properties are stored at mime.handler.). so this would be mime.type.application.x-shockwave-flash swfplayer? From thomas.adam22 at gmail.com Fri Apr 27 17:18:27 2007 From: thomas.adam22 at gmail.com (Thomas Adam) Date: Sat, 28 Apr 2007 00:18:27 +0100 Subject: [elinks-users] launching a flash player In-Reply-To: <46327EC3.6070309@seiner.com> References: <46327EC3.6070309@seiner.com> Message-ID: <20070427231827.GA3251@localdomain> On Fri, Apr 27, 2007 at 03:52:51PM -0700, Yan Seiner wrote: > How do I configure elinks to launch my own flash player? > > The man page says: > > mime.type > Handler <-> MIME type association. The first sub-tree is the MIME > class while the second sub-tree is the MIME type (ie. image/gif > handler will reside at mime.type.image.gif). Each MIME type option > should contain (case-sensitive) name of the MIME handler (its > properties are stored at mime.handler.). > so this would be mime.type.application.x-shockwave-flash swfplayer? Either that, or use /etc/mailcap -- Thomas Adam -- "He wants you back, he screams into the night air, like a fireman going through a window that has no fire." -- Mike Myers, "This Poem Sucks". From yan at seiner.com Mon Apr 30 12:05:06 2007 From: yan at seiner.com (Yan Seiner) Date: Mon, 30 Apr 2007 11:05:06 -0700 Subject: [elinks-users] LIST_HEAD and *prev *next Message-ID: <46362FD2.90309@seiner.com> Could someone please clue me in on how to use *prev and *next pointers for struct form_control? I seem to be traversing the list OK, but it segfaults at some point and I have no idea why... I haven't found the right way to test for the end of the list. The ptr values seem OK when they print. Here's the code snippet: while (temp_fc->prev != NULL) { temp_fc = temp_fc->prev; syslog(LOG_DEBUG,"Prev element ptr: %p\n",temp_fc); if(strncmp(fc->_P_idindex, temp_fc->_P_idindex,3) == 0) break; // temp_fs = find_form_state(doc_view, temp_fc); syslog(LOG_DEBUG,"Prev element ID: %s value %s\n",temp_fc->_P_idindex,"yyy"); // free(temp_fs); } On another topic, I've commented out the find_form_state and subsequent free. I haven't been able to find a 'free_form_state' type of function. Could someone please clue me in on how to free the structure allocated with find_form_state? Thanks, --Yan