Re: [elinks-dev] [PATCH 1/2] Add half-page-down and half-page-up commands
On Sat, Aug 14, 2010 at 09:24:20PM +0200, Fabienne Ducroquet wrote: Signed-off-by: Fabienne Ducroquet fabi...@gmail.com [...] Thank you for the patches. I committed them (finally) and credited you in AUTHORS. Sorry it took so long. Best regards, -- Miciah Dashiel Butler Masters miciah.mast...@gmail.com ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [PATCH 09/10] Add preferred_document_width option.
On 06/10/2009 08:18 AM, أحمد المحمودي wrote: Hello, Sorry, in yesterday's email, I didn't issue a 'bt' command in GDB, here is the backtrace: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1225446624 (LWP 25859)] init_document_options (ses=0x0, doo=0xbfa7832c) at /tmp/buildd/elinks-0.13~20090601/src/document/options.c:39 39 /tmp/buildd/elinks-0.13~20090601/src/document/options.c: No such file or directory. in /tmp/buildd/elinks-0.13~20090601/src/document/options.c (gdb) bt #0 init_document_options (ses=0x0, doo=0xbfa7832c) at /tmp/buildd/elinks-0.13~20090601/src/document/options.c:39 #1 0x0813ef1d in dump_formatted (fd=1, download=0x0, cached=0x8cf5e58) at /tmp/buildd/elinks-0.13~20090601/src/viewer/dump/dump.c:117 [...] OK, the problem is clear now. The patch in question contains the following: diff --git a/src/document/options.c b/src/document/options.c index 9208d64..93d9c7b 100644 --- a/src/document/options.c +++ b/src/document/options.c @@ -32,6 +32,13 @@ init_document_options(struct session *ses, struct document_options *doo) doo-use_document_colors = get_opt_int(document.colors.use_document_colors, ses); doo-margin = get_opt_int(document.browse.margin_width, ses); + + doo-document_width = 0; + if (get_opt_bool(document.browse.use_preferred_document_width, ses)) + doo-document_width = get_opt_int(document.browse.preferred_document_width, ses); + if (doo-document_width = 0 || doo-document_width ses-tab-term-width) + doo-document_width = ses-tab-term-width; ses is NULL when ELinks is run with -dump. Before the patch, the renderer used document_options.box instead of document_options.document_width. Both the dump viewer and the regular viewer set document_options.box after calling init_document_options. Really, I think that the patch should be using document_options.box instead of ses-tab-term-width regardless of which viewer is used (dump or regular). So here is one possible solution: 1. Both callers to init_document_options (render_document_frames and dump_formatted) should first set document_options.box and then call init_document_options; 2. init_document_options should preserve document_options.box (it currently clears the whole structure at the beginning of the routine); and 3. the patch should be changed to use document_options.box. Alternatively to 1 and 2, callers to init_document_options could pass the values for the box as arguments so that init_document_options can set document_options.box itself. Does the above sound reasonable? -- Miciah Masters miciah.mast...@gmail.com / mdm0...@ecu.edu ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] [PATCH 04/10] Added option to change colors of HTML forms.
On 05/13/2009 12:01 AM, elinks-dev-boun...@linuxfromscratch.org wrote: Settings are specified by document.colors.form document.colors.use_form_color The latter setting determines whether the color is used when document colors are being used. Have you considered using CSS? Set document.css.stylesheet = user.css and put input {color:pink} or form {color:pink} or similar in ~/.elinks/user.css. -- Miciah Masters miciah.mast...@gmail.com / mdm0...@ecu.edu ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] What is 'sparse' and where to get it?
On Sat, Sep 09, 2006 at 06:07:16PM +0200, Witold Filipczyk wrote: Hi! make check uses 'sparse'. What is 'sparse', what does it do and where to get it? -- Witek Here is an article with links: http://lwn.net/Articles/87538/ -- Miciah Masters [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] Re: [patch 1/5] Define separate structs for events
On Sat, Aug 05, 2006 at 10:15:25AM +0300, Kalle Olavi Niemitalo wrote: Miciah Dashiel Butler Masters [EMAIL PROTECTED] writes: [...] What if we introduced a separate routine to convert term_event to interlink_event, so as to minimise change to handle_interlink_event? I don't see how that would help, as handle_interlink_event converts From interlink_event to term_event, rather than vice versa. [...] How about a separate routine to convert from interlink_event to term_event? -- Miciah Masters [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
[elinks-dev] Re: Feature Requests
On Fri, Jun 23, 2006 at 03:41:13PM +0530, Ligesh wrote: On Fri, Jun 23, 2006 at 05:06:09AM +, Miciah Dashiel Butler Masters wrote: On Tue, Jun 20, 2006 at 11:52:35AM +0530, Ligesh wrote: On Tue, Jun 20, 2006 at 06:03:21AM +, Miciah Dashiel Butler Masters wrote: So I am talking about simple editing, for instance, in the input URL box. The general editing for simple data everywhere; filling in forms etc. I'll see about adding a few actions tomorrow. I am sure you know it, but the code is in the inpfield.c file. There is a switch case, and you need to add one a case ACT_EDIT_KILL_WORD above the ACT_EDIT_KILL_TO_BOL. There is a lot of code duplication between the general UI widgets and document form controls, which I would like to clean up, but I eventually just wrote a patch for the functionality presently under discussion: http://pasky.or.cz/gitweb.cgi?p=elinks.git;a=commit;h=29ffe71bc1b0ed6322105c1ebcb565f6793ea81e Yeah, I saw that. It is present in two places. The remove word works beautifully. There is a very minute issue though, in the emacs remove word, the delimiter is not 'space', but rather ANY meta character. So that, if we have [...] This should be easy enough. Should I just use isalnum instead of isspace? Next question: Should this be configurable? We already have too many options. -- Miciah Masters [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
[elinks-dev] Re: Doing Crazy stuff.
On Fri, Jun 23, 2006 at 04:30:00PM +0530, Ligesh wrote: a) Ok, now for some crazy stuff. I want to view my history in vim, and select the link to go, and when I exit from vim, it should Go to that particular page. I can make vim do absolutely anything. Is there something in Lua using which I can accomplish this? Add this to hooks.lua: function select_history_item_in_vim() local url local f local fn = elinks_home..goto_url os.execute(vim ..elinks_home..globhist) f = io.open(fn, r) if f then url = f:read() f:close() os.remove(fn) end if url then return goto_url, url end end Then add something like vimhist = select_history_item_in_vim, to console_hook_functions (and make sure that you define select_history_item_in_vim above that!) so that you enter 'vimhist' in the Lua console, or add: bind_key(main, Ctrl-v, select_history_item_in_vim) to hooks.lua. Then you need to make VIM save the URL (and only the URL) of the history item that you would like ELinks to load to ~/.elinks/goto_url. The above code automatically reads this file and deletes it. b) I want to have key to do goole search. That is, when you press this key, you will be presented with an input box. Whatever you enter will be automatically searched in google, and you will be put into the search results page. Add this to hooks.lua: bind_key (main, Ctrl-g, function () xdialog(, function (url) return goto_url, http://google.com/search?q=..url end) end) -- Miciah Masters [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
Re: [elinks-dev] std(data, def.source);
On Sat, Oct 29, 2005 at 04:13:24PM -0400, Buddy Bell wrote: I am trying to modify elinks to reload and then save to file a certain web page every five minutes. In the process of getting the html source saved without a dialog requiring input I ran across the statement std(data, def.source); at stmt 581 of menu.c under dialogs. It must be what is saving the html but I can find no other reference to it searching for std( in the source directories. Is it a subroutine, a macro, a c statement? Using google I can't find anything on it. There is also no man page for std. If you could explain to a relative newbie were it comes from I would appreciate it. Thanks. BB I believe that you are looking at the query_file routine in src/dialogs/menu.c. std is a parameter to query_file. Today's new word is callback: if you grep the source, you'll see that functions call query_file with any of start_download, continue_download, download, or save_formatted as the argument for std; these are called callbacks. query_file needs to know what to do with the file, so to keep it nice and generic, it takes a callback function either to call or to pass as a callback to input_dialog so that the callback is eventually registered as the callback for the OK button in the prompt for the file's name. The complicated type for the std parameter: void (*std)(void *, unsigned char *) is saying that std must be a pointer to a function that takes a void pointer and a string and returns nothing (void). Any callback for query_file must have this type. Other than that, there is nothing special one must do to use a function as a callback. In tp_save in src/session/download.c, for example, we have: query_file(type_query-ses, type_query-uri, type_query, continue_download, tp_cancel, 1); continue_download is defined above: static void continue_download(void *data, unsigned char *file) ... In C, continue_download and continue_download are equivalent (AIUI). So, tp_save is passing query_file the callback continue_download. Also, tp_cancel is given as the callback for query_file's cancel parameter. I hope that that helps, -- Miciah Masters [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev
[elinks-dev] Re: [ELinks] elinks - zas: Pass struct term_event_keyboard * to delete...
On Tue, May 17, 2005 at 09:33:09PM -, [EMAIL PROTECTED] wrote: This is an automated notification of a change to the ELinks CVS tree. Author: zas Module: elinks Tag: TRUNK Date: Tue May 17 21:33:09 2005 GMT Log message: Pass struct term_event_keyboard * to delete_keybinding(), add_keybinding() and kbd_ev_lookup(). Files affected: elinks/src/config: dialogs.c (1.222 - 1.223) http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/config/dialogs.c.diff?r1=1.222r2=1.223f=u kbdbind.c (1.284 - 1.285) http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/config/kbdbind.c.diff?r1=1.284r2=1.285f=u kbdbind.h (1.151 - 1.152) http://cvsweb.elinks.or.cz/cvsweb.cgi/elinks/src/config/kbdbind.h.diff?r1=1.151r2=1.152f=u Diffs: elinks/src/config/dialogs.c |3 -- elinks/src/config/kbdbind.c | 38 ++-- elinks/src/config/kbdbind.h |4 +-- 3 files changed, 23 insertions(+), 22 deletions(-) Index: elinks/src/config/dialogs.c [...] Index: elinks/src/config/kbdbind.c [...] @@ -143,24 +143,27 @@ int kbd_action(enum keymap kmap, struct term_event *ev, int *event) { + struct term_event_keyboard kbd; struct keybinding *kb; if (ev-ev != EVENT_KBD) return -1; - kb = kbd_ev_lookup(kmap, get_kbd_key(ev), get_kbd_modifier(ev), event); + kbd.key = get_kbd_key(ev); + kbd.modifier = get_kbd_modifier(ev); + kb = kbd_ev_lookup(kmap, kbd, event); return kb ? kb-action : -1; } [...] Index: elinks/src/config/kbdbind.h [...] Why not pass ev-info.keyboard to kbd_ev_lookup? If there is a good reason, a comment is in order. -- Miciah Masters [EMAIL PROTECTED] / [EMAIL PROTECTED] ___ elinks-dev mailing list elinks-dev@linuxfromscratch.org http://linuxfromscratch.org/mailman/listinfo/elinks-dev