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

Re: [PATCH] RT reply form submission (Emacs-w3m bug)

Hi Bruno,

On Tue, 13 Oct 2015 11:20:04 -0300, Bruno Félix Rezende Ribeiro wrote:
> The problem is not at that very page, rather it's in servers running
> the RT software they provide there, like the GNU project's
> https://rt.gnu.org/.  Unfortunately, one can't test without logging
> into the system.  I'm sorry for not expressing myself clearly enough.

Ok, I've installed the change.

>> But it would be better to be:
>>       (if (cdr buf)
>> 	  (encode-coding-string (cdr buf) coding)
>> 	"")

> Well, I looked for the most internal change I could make as to not
> disrupt any existing functionality --- so I couldn't make any
> assumptions, and also I needed a fast and simple change and did not
> have time to study the surroundings semantics.

> For your patch to be equivalent to mine we have to assume that

>   (encode-coding-string "" coding) == ""

> If that is the case, I see no problem. ;-)

As far as I see the benchmark[1] tests, the encode-coding-string
funcall seems to take more time even if it does nothing:

(let ((buf '(nil . nil)) (coding 'utf-8))
  (benchmark 1000000
	     (encode-coding-string (if (cdr buf) (cdr buf) "") coding)))

(let ((buf '(nil . nil)) (coding 'utf-8))
  (benchmark 10000000
	     (if (cdr buf) (encode-coding-string  (cdr buf) coding) "")))

Probably such a large repetition will not take place, though. ;-)


[1] I use Lars' benchmark.el[2].  I feel it offers more practical
    result rather than the one that Emacs bundles.
[2] http://quimby.gnus.org/elisp/benchmark.el