librelist archives

« back to archive

Default auto-zoom tip brokenDate: Fri, 01 May 2015 14:36:09 +0100

Default auto-zoom tip brokenDate: Fri, 01 May 2015 14:36:09 +0100

From:
Phil Hudson
Date:
2015-05-02 @ 14:55
The snippet for auto-zoom at

  http://conkeror.org/Tips?highlight=%28default%29%7C%28zoom%29#Default_Zoom_Level

has been changed.

It used to use content_buffer_started_loading_hook. It now uses
create_buffer_late hook. Why?

I've updated my own implementation, which is based on this, and it no 
longer works.

--
Phil Hudson                   http://hudson-it.ddns.net
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63

Re: Default auto-zoom tip brokenDate: Fri, 01 May 2015 14:36:09 +0100

From:
Philip Hudson
Date:
2015-05-02 @ 20:19
Further to this, I'm beginning to think I may have uncovered a
regression in Conkeror code.

Running my hook function directly using M-: and explicitly passing the
current buffer, it works as expected. (That's what running the hook
should do too.) So I'm pretty confident the problem is in the "run()"
method of the hook "class".

The only other hook function is a simple one-line assignment of null to
the buffer's favicon, which I assume is too simple to fail.

The error I'm getting is this:

  call interactively: TypeError: invalid 'in' operand x

I get this when calling either content_buffer_started_
loading_hook.run()
or create_buffer_late_hook.run() with my function added to the hook.

Neither my hook function nor the favicon-clearing one uses the 'in'
operator or declares or references any identifier 'x'. Hence, I suspect
a bug in some other code. Sounds reasonable, doesn't it?

Now, the question is what other code, and here I'm stuck. How do I go
about debugging this?

On 2 May 2015 at 15:55, Phil Hudson <phil.hudson@iname.com> wrote:
> The snippet for auto-zoom at
>
>   
http://conkeror.org/Tips?highlight=%28default%29%7C%28zoom%29#Default_Zoom_Level
>
> has been changed.
>
> It used to use content_buffer_started_loading_hook. It now uses
> create_buffer_late hook. Why?
>
> I've updated my own implementation, which is based on this, and it no 
longer works.
>
> --
> Phil Hudson                   http://hudson-it.ddns.net
> @UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63



-- 
Phil Hudson                   http://hudson-it.ddns.net
@UWascalWabbit                 PGP/GnuPG ID: 0x887DCA63