[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: w3m-canonicalize-url misbehaviour
- From: Katsumi Yamaoka <yamaoka@xxxxxxx>
- Date: Wed, 04 Sep 2013 11:40:01 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 12141
- References: <87eh96ufdq.fsf@xxxxxxx> <87wqmxpx82.fsf@xxxxxx>
In [emacs-w3m : No.12139] Michael Heerdegen wrote:
> Manuel Giraud <manuel@xxxxxxxxxxxxxx> writes:
>> Here is a patch for w3m-canonicalize-url. Without it, the following
>> code:
>>
>> (let ((w3m-uri-replace-alist '(("\\`ddg:" w3m-search-uri-replace "duckduckgo")))
>> (w3m-search-engine-alist '(("duckduckgo" "https://duckduckgo.com/html/?q=%s"))))
>> (w3m-canonicalize-url "ddg:foo"))
>>
>> evaluates to "ddg:foo". So URI replacement is broken.
> Indeed. All URI like "foo:bar" are not working anymore. We (I) should
> have been testing the last change there better.
Manuel, thanks for reporting this. But your patch won't work
for emacs-w3m if `w3m-enable-google-feeling-lucky' is non-nil.
I.e.:
(let ((w3m-uri-replace-alist '(("\\`ddg:" w3m-search-uri-replace "duckduckgo")))
(w3m-search-engine-alist '(("duckduckgo" "https://duckduckgo.com/html/?q=%s"))))
(w3m-canonicalize-url "ddg:foo" t))
I slightly modified it and committed to the CVS repo.