From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shun-ichi GOTO Newsgroups: gmane.emacs.devel Subject: First call of url-generic-parse-url is broken Date: Mon, 13 Nov 2006 15:21:47 +0900 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1163398965 15999 80.91.229.2 (13 Nov 2006 06:22:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2006 06:22:45 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 13 07:22:43 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GjVDH-0003id-9E for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2006 07:22:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjVDF-000364-Ui for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2006 01:22:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GjVCy-00034m-Op for emacs-devel@gnu.org; Mon, 13 Nov 2006 01:22:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GjVCv-00034N-Iu for emacs-devel@gnu.org; Mon, 13 Nov 2006 01:22:16 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjVCv-00034J-DQ for emacs-devel@gnu.org; Mon, 13 Nov 2006 01:22:13 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GjVCv-0005X1-8X for emacs-devel@gnu.org; Mon, 13 Nov 2006 01:22:13 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GjVCn-0003f7-1Q for emacs-devel@gnu.org; Mon, 13 Nov 2006 07:22:05 +0100 Original-Received: from zippo.taiyo.co.jp ([59.139.21.101]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Nov 2006 07:22:05 +0100 Original-Received: from gotoh by zippo.taiyo.co.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Nov 2006 07:22:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: zippo.taiyo.co.jp User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.90 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/3.00-dev (KIKU) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:62170 Archived-At: The function url-generic-parse-url 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 calls url-scheme-get-property in the middle of the parsing to get port number for scheme. But url-scheme-get-property invoke url-generic-parse-url again to parse url value in url-proxy-services. Because url-generic-parse-url uses fixed named buffer, the buffer contents for first parse is broken by 2nd one. I suggest using with-temp-buffer for allocating working buffer instead of get-buffer-create. Or move use of url-schem-get-property to end of function before (vector ...). --- Regards, Shun-ichi Goto R&D Group, TAIYO Corp., Tokyo, JAPAN