David Kettler <[email protected]> writes: > Another feature of interactive that would be useful is the alternates > mechanism. For instance I usually want url_remoting_fn to > OPEN_NEW_BUFFER. But sometimes I want OPEN_NEW_BUFFER_BACKGROUND. I > currently use the code below, but alternates would be nicer. > > Does this sound like something worth pursuing? > > Current code that would be neater with alternates: > > /* For url_remoting_fn; load in a new buffer. If -uu is given on the > * command line, do so in the background. */ > function load_url_in_new_buffer_perhaps_bg(url, ctx) { > create_buffer_in_current_window( > buffer_creator(content_buffer, $load = url, > $configuration = ctx.config), > ctx.prefix_argument ? OPEN_NEW_BUFFER_BACKGROUND : OPEN_NEW_BUFFER, > !ctx.prefix_argument); > } > > url_remoting_fn = load_url_in_new_buffer_perhaps_bg;
Hi David, This is very much like what I would like to do, but messier than I want to do it. You have noticed the existence of the command-line switch `-uu' which allows you to give a universal-arg prefix to a command called by the `-f' switch. I do intend to extend this behavior to urls passed on the command line, so that `alternates' can be used. However, to accomplish that, I would like to deprecate the variable `url_remoting_fn' and replace it by something along the lines of `default_remoting_command'. Its value will be the name of an interactive command instead of a function. That command will respect -uu. This change requires a modification to the interactive system to remove the assumption (for some commands) that an existing window is available. Incidentally, the reason that -uu has such a funny name is that `-u' is already consumed by Mozilla. I was also thinking of changing it to `+u' to get around that limitation, but using `+' as a switch prefix will require a little adjustment of the command-line module, and I haven't gotten around to it. It's going to take me a long time to catch up with all the outstanding patches on the mailing list, but I am mindful of them and appreciate your patience. I'll try to address each item individually. -- John Foerch _______________________________________________ Conkeror mailing list [email protected] https://www.mozdev.org/mailman/listinfo/conkeror
