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

Re: Patch to emacs-w3m

hello paul,

Paul Kinnucan <paulk@mathworks.com> writes:

> Hello Jose,
> As I stated in my original message, I already have fixed the so-called
> "bug" in the JDEE sources. I put the "bug" in quotes because there is
> no bug in the JDEE code. The original JDEE code works just fine
> without the change that I made. It is emacs-w3m that does not work and
> hence has a bug. The problem is that the original w3m-emacs code makes
> the assumption that creating a temp buffer does not change existing match
> data. This is a false assumption (and hence a bug) because of the
> possibility of a kill buffer hook function changing the match data
> after w3m-decode-entities-string finishes decoding but before it
> returns to its caller.

oh, i see: what you say makes perfect sense to me.

> Your fix solves that problem. However, it does not address another
> problem with the function, namely the inefficiency of creating a
> buffer just to decode a string. Unfortunately, my fix, while avoiding
> unnecessary buffer creation, was not general enough as it did not
> handle the cases where a string contains multiple entities or entities
> embedded in other text. I intend to contribute a version of
> w3m-decode-entities-string that handles the general case without
> creating a temporary buffer. The maintainers of emacs-w3m should feel
> free to ignore my contribution. However, I certainly hope that they
> will accept either your fix or my rewrite of
> w3m-decode-entities-string to avoid this needless inter-package
> compatibility problem in the future.

i look forward for your contribution, and hope too that it will be
incorporated to w3m... it the meantime, if katsumi agrees with us,
it'd be nice to incorporate my simple fix (assuming it's really a fix)
for the sake of current users (potentially) having problems with the
jde/w3m combo: what do you think, katsumi? :)

Holding on to anger is like grasping a hot coal with the intent of throwing
it at someone else; you are the one getting burned.
    -Buddha (c. 566-480 BCE)