[Conkeror] flailing about on upgrade

Mark Eichin eichin at gmail.com
Sat Mar 22 23:02:31 PDT 2008


On Sat, Mar 22, 2008 at 6:08 PM, Jeremy Maitin-Shepard
<jeremy at jeremyms.com> wrote:
> "Mark Eichin" <eichin at gmail.com> writes:
>
>  > I'd been running an older 0.42 out of git, and as part of a general
>  > upgrade (ff3, ubuntu 8.04 alpha, etc.) I upgraded to current git as of
>  > yesterday.  This hasn't gone well :-)  I had a lot of customizations
>  > that depended on internals which have (reasonably enough) changed.
>  > Some of them I've been able to just delete, because the underlying
>  > functions are sufficient now (yay.)  Some things I'm still mystified
>  > by:
>
>  >   * conkeror.url_remoting_fn = conkeror.find_url_new_buffer;  is now,
>  > *approximately*,
>  >      url_remoting_fn = load_url_in_new_buffer;
>  >      except that that loads it in a background buffer, not in a
>  > foreground one like the old way...
>
>  > Ah, turns out that I can redefine it:
>  > function load_url_in_new_buffer_really(url, ctx) {
>  >     create_buffer_in_current_window(buffer_creator(content_buffer,
>  > $load = url, $configuration = ctx.config),
>  >                                     OPEN_NEW_BUFFER);
>  > }
>
>  > url_remoting_fn = load_url_in_new_buffer_really;
>
>  > Shouldn't load_url_in_new_buffer just obey browser_default_open_target
>  > though?
>
>  browser_default_open_target is actually used just for window open
>  requests generated by either page JavaScript window.open calls or
>  target=_blank.
>
>  I agree, though, that load_url_in_new_buffer should foreground the new
>  buffer, and I'll fix that.

Cool.

>  >   * I guessed correctly that "c 0" replaces C.  How do I *paste* into
>  > the browser now? c-y does something I don't yet get, and m-space is
>  > unbound...
>
>  If you want to paste a URL, you can use C-y while in a URL entry
>  minibuffer.

I think I was getting bit by the usual "X paste doesn't actually work
half the time" bugs; c-y does get a value to paste from *somewhere*
but it isn't what I select in emacs or xterm, at least most of the
time; whatever m-space does was more reliable, I think.

>  >   * "ReferenceError: XMLHttpRequest is not defined"  anyone know off
>  > hand how I get at that from the rcfile now?
>
>  var req = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance();
>
>  See:
>
>  http://developer.mozilla.org/en/docs/nsIXMLHttpRequest

Ah, the example at the end, yeah, that works.

>  The RC file no longer loads in the context of a particular window.
>  Instead it loads when conkeror first starts, before any windows are
>  open, in a global conkeror context.  Due to oddities in JavaScript, a
>  fair number of names like XMLHttpRequest are actually just bound as
>  properties of the top-level window object, and thus are not available,
>  but you can always access them by the normal XPCOM mechanisms.

Ah, got it.  (That also explains why a lot of my other hacks don't work. :-)

>  >   * how do I get passthrough so that I can use gmail?
>
>  C-M-q  switches to pass through mode, escape  switches back.

Oh, and it's even mentioned in the new c-h t output :-)

>  C-q quotes a single key.

Hmm.  Unfortunately neither of these work as well as "letting anything
unbound leak through" did; in particular, having to switch out of pass
through just to get M-n/M-p and C-x C-f to work is tedious, and
switching back in isn't going to be easy to learn either.  Maybe that
means I should look at prism-google-mail instead... though it does
suggest that for passthrough there's a difference between "buffer"
commands and "windowmanger" commands.

>  > (My apologies if it sounds like I'm complaining - it's just that my
>  > command bindings are in my fingers, not my head, so when they don't
>  > work it gets really frustrating, and when I go back to classic
>  > firefox, basic editting keys like c-n and c-p pop up windows which is
>  > kind of painful :-)
>
>  If you come to #conkeror on irc.freenode.net, I and others will probably
>  also be there to help, if you have any additional questions.  Feedback
>  is always helpful.

Hmm, second excuse in a week to get back on irc :-)

>  > On a related note - anyone using pyxpcom with conkeror?  It was a
>  > plenary session topic at Pycon (mozilla team apparently considers
>  > python "the first second-class language" :-) but I don't quite grok
>  > the level at which it operates...
>
>  As far as I understand, with some work it might be possible to produce
>  XPCOM components in Python, but because Conkeror doesn't actually expose
>  any XPCOM interfaces related to its internals, you wouldn't be able to
>  do anything very interesting with Conkeror from Python.  Possibly
>  pyxpcom could allow Conkeror to be rewritten mostly from scratch in
>  python, but that would be a lot of work and probably provide little
>  gain.  Possibly the only advantage it would provide is speed ---
>  JavaScript is actually quite a powerful language, but it is quite slow.
>  I think a lot of the noticeable slowness, though, is due to rendering
>  rather than JavaScript.

My main interest is actually in whether some of the things I run as
external daemons (and use XMLHttpRequest to communicate with) could be
done as in-browser objects instead - ie. write bits of python and then
call them from javascript code in rcfile (which could pass in any
relevant values, as it does now, without having to expose any new
APIs.)  That's an area in which my own code is painfully slow because
it has to quote unicode in buffers down to something 8-bit that it can
send over XMLHttpRequest, which would work better from the python
side.

-- 
_Mark_ <eichin at thok.org> <eichin at gmail.com>


More information about the Conkeror mailing list