* First call of url-generic-parse-url<f> is broken
@ 2006-11-13 6:21 Shun-ichi GOTO
2006-11-15 23:15 ` Magnus Henoch
0 siblings, 1 reply; 2+ messages in thread
From: Shun-ichi GOTO @ 2006-11-13 6:21 UTC (permalink / raw)
The function url-generic-parse-url<f> returns strange data on the first call.
Here is actual example:
;; this is my local setting
(setq url-proxy-services
'(("http" . "zippo:8080"))
;; first try
(url-generic-parse-url "http://www.meadowy.org/~gotoh/projects/trac-wiki/xmlrpc\
")
=> ["http" nil nil "www.meadowy.org" 80 "http://zippo:8080/" nil nil t]
~~~~~~~~~~~~~~~~~~~
strange!
;; again
(url-generic-parse-url "http://www.meadowy.org/~gotoh/projects/trac-wiki/xmlrpc\
")
=> ["http" nil nil "www.meadowy.org" 80 "/~gotoh/projects/trac-wiki/xmlrpc" nil ni\
l t]
I chaised and found a bug.
url-generic-parse-url<f> calls url-scheme-get-property<f> in the
middle of the parsing to get port number for scheme.
But url-scheme-get-property<f> invoke url-generic-parse-url<f> again
to parse url value in url-proxy-services.
Because url-generic-parse-url<f> uses fixed named buffer,
the buffer contents for first parse is broken by 2nd one.
I suggest using with-temp-buffer<f> for allocating working buffer
instead of get-buffer-create<f>.
Or move use of url-schem-get-property to end of function
before (vector ...).
--- Regards,
Shun-ichi Goto <gotoh@taiyo.co.jp>
R&D Group, TAIYO Corp., Tokyo, JAPAN
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: First call of url-generic-parse-url<f> is broken
2006-11-13 6:21 First call of url-generic-parse-url<f> is broken Shun-ichi GOTO
@ 2006-11-15 23:15 ` Magnus Henoch
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Henoch @ 2006-11-15 23:15 UTC (permalink / raw)
Shun-ichi GOTO <gotoh@taiyo.co.jp> writes:
> I chaised and found a bug.
> url-generic-parse-url<f> calls url-scheme-get-property<f> in the
> middle of the parsing to get port number for scheme.
> But url-scheme-get-property<f> invoke url-generic-parse-url<f> again
> to parse url value in url-proxy-services.
> Because url-generic-parse-url<f> uses fixed named buffer,
> the buffer contents for first parse is broken by 2nd one.
>
> I suggest using with-temp-buffer<f> for allocating working buffer
> instead of get-buffer-create<f>.
> Or move use of url-schem-get-property to end of function
> before (vector ...).
I did the former. Thanks!
Magnus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-15 23:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-13 6:21 First call of url-generic-parse-url<f> is broken Shun-ichi GOTO
2006-11-15 23:15 ` Magnus Henoch
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).