[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: oneline patch to ~/.emacs.d/elpa/w3m-20190222.738/w3m-favicon.el



In [emacs-w3m:13266]
On Mon, 25 Feb 2019 15:28:35 +0000, rrandresf@xxxxxxxxx wrote:
> Recently. I have added this line to my dotemacs w3m setup.

> (setq
> w3m-use-favicon t
> )

> Then on some sites I am getting an "out of range" error.

Could you let me know some of such sites?  A guard for such
breakage already exists as follows:

(defun w3m-favicon-retrieve (url type target)
[...]
	    (if (and ok
		     ;; Some broken servers provide empty content.
		     (>= (buffer-size) 4))

But this criterion would probably be not enough to detect it and
have to be improved.  I should do it.

> so I have added this line to the function

> (defun w3m-favicon-convert (data type)
>   "Convert the favicon DATA in TYPE to the favicon image and return it."
> +  (when (> (length data) 0)
>   (when (or (not (eq type 'ico))

Thanks.  But this change will propagate an invalid nil image to
the other programs that use it.  So, I think it would be better
to shut it out in the upper stream, i.e., `w3m-favicon-retrieve'.

Regards,