From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 02 22:39:34 2010 Received: (at submit) by debbugs.gnu.org; 3 Jun 2010 02:39:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK0LF-0008Rn-NQ for submit@debbugs.gnu.org; Wed, 02 Jun 2010 22:39:33 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK0LD-0008Rh-GP for submit@debbugs.gnu.org; Wed, 02 Jun 2010 22:39:32 -0400 Received: from lists.gnu.org ([199.232.76.165]:49464) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OK0L9-0008V9-Rg for submit@debbugs.gnu.org; Wed, 02 Jun 2010 22:39:27 -0400 Received: from [140.186.70.92] (port=51687 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OK0L4-0000Co-9v for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2010 22:39:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OK0L2-0001SK-Ca for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2010 22:39:22 -0400 Received: from mail-gy0-f169.google.com ([209.85.160.169]:42618) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK0L2-0001SE-7u for bug-gnu-emacs@gnu.org; Wed, 02 Jun 2010 22:39:20 -0400 Received: by gyg4 with SMTP id 4so6420720gyg.0 for ; Wed, 02 Jun 2010 19:39:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=AFIFHOp/vnUKUjLKUafZ7k8QorFGFPamEyTJZW3P4kc=; b=qNHzMZVD1dxvHy5DvJURUm04eQXaH4Q4EEyXBN7DiUpReotI6GhP+5dQgXH6WR3r8K pwdY12j+p2jJPqv5Dr1puLapFLsGRxDESQtHKcuEx2F1/wOfTj+4RHjSbOZfQJ2cmpj9 J+OM7+uGela5hG0rA+OghWeBGBR1N2Kd4rDJo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=dTfgFpQ+1847lcmSMO9zeFtNCTjODBpg4T62KJDivyIA2cSwY/bIEPGMWjApkra1H6 l/IUMFQ2JavazHRTYgHzlCyAv7eQ9NBuPbo78RvyQDklUqBkQyWUEXAgdcpI/kRR9uwX BjYAv8VKVAwlVvhtpI0HelTbRmsd3HzN2ptPM= Received: by 10.101.4.26 with SMTP id g26mr10281172ani.157.1275532759338; Wed, 02 Jun 2010 19:39:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.44.20 with HTTP; Wed, 2 Jun 2010 19:38:59 -0700 (PDT) From: Lennart Borgman Date: Thu, 3 Jun 2010 04:38:59 +0200 Message-ID: Subject: url-filename => "/c:/some/file.txt" To: Emacs Bugs Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) (setq x (url-generic-parse-url "file:///c:/some/file.txt")) (url-filename x) => "/c:/some/file.txt" Should not that be "c:/some/file.txt"? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 03 07:14:08 2010 Received: (at 6339) by debbugs.gnu.org; 3 Jun 2010 11:14:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK8NE-0003SM-FN for submit@debbugs.gnu.org; Thu, 03 Jun 2010 07:14:08 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OK8NB-0003Rz-J4 for 6339@debbugs.gnu.org; Thu, 03 Jun 2010 07:14:06 -0400 Received: by fxm6 with SMTP id 6so4564fxm.3 for <6339@debbugs.gnu.org>; Thu, 03 Jun 2010 04:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=vqeEozSQB+Y84n/IlsEwLU2SmccpF0vvXIi+7gQLgD0=; b=unQ+xXi+ebHYhoEhRCvsYklwdAl+laoOwDGWiDyvEz65R5ww/kkEHIwsNfAdXasWtm s9/VI0y9mhX2SMqqlPjIgGuOiJH2un1q/yc9+K/LzB4u6ppkdhZaQKLD5mX08AX9tPrt COIDQ+EZ0nsNqohkvJjpp0ChSavj2lT7O1ab8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Zpt4wHRjTzpCPdDNxEZ1zWFBEHrMnYmI7bcVUFWoFDEsbdJgd2NtAYsbc313z1EiAs O8Pi9CfZGwQQp+78Gg4XWQpD/dGhg3iAyrGciurFMbvFdUPF360w4DkG/7/nZo9OUG7P j+NAvtmHVvUTGuHuw9cHMm+l7xWUPig0EAz2M= Received: by 10.204.74.30 with SMTP id s30mr2804792bkj.27.1275563639421; Thu, 03 Jun 2010 04:13:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.32.18 with HTTP; Thu, 3 Jun 2010 04:13:39 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 3 Jun 2010 13:13:39 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 6339 Cc: 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) > Should not that be "c:/some/file.txt"? Yes. Juanma From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 26 07:50:27 2010 Received: (at 6339) by debbugs.gnu.org; 26 Jul 2010 11:50:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdMCP-0002oF-TD for submit@debbugs.gnu.org; Mon, 26 Jul 2010 07:50:26 -0400 Received: from mail-bw0-f44.google.com ([209.85.214.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdMCO-0002o9-Mj for 6339@debbugs.gnu.org; Mon, 26 Jul 2010 07:50:25 -0400 Received: by bwz7 with SMTP id 7so3016794bwz.3 for <6339@debbugs.gnu.org>; Mon, 26 Jul 2010 04:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=BukINBBtPRkGmjbb2Kjto4WdBHCmjdApY/lUftzGZ/w=; b=UCXyM9gN7bgPY1ADF7QnJC+0LcW1HxcvAcKX5Vp2ja9Ll1xZH1mPTjqdMDP75XHjzG UQOlgtGieT+036Od7mbcVNusPi8LdyTu0tnNo+QT5gEhbru03WwSZwyp5B8PWA5yBd1e BxzlDCUWl+889iAI/AqCS7F1Zqv55yvrZBLYo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=Wt/KQjBX7YOhmKM74MaK5SAaGlU2PsB3acmw1gKuRNquRGUb/HMFnpoyzzseTSwZpY 171NWNv+ibv4L1b9ZGy/q+4pAQ7HNGTkGL/nE5iwx5vnmj0sWXMMnG3N0b8MjHsCYV7G 9QGcDHLLSsn6JhoKR7Eslmr5BENeRq/i4QtTY= Received: by 10.204.178.146 with SMTP id bm18mr5215074bkb.99.1280145029118; Mon, 26 Jul 2010 04:50:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.180.136 with HTTP; Mon, 26 Jul 2010 04:50:09 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Mon, 26 Jul 2010 13:50:09 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 6339 Cc: 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) On Thu, Jun 3, 2010 at 04:38, Lennart Borgman w= rote: > (setq x (url-generic-parse-url "file:///c:/some/file.txt")) > (url-filename x) =3D> "/c:/some/file.txt" > > Should not that be "c:/some/file.txt"? This is caused by url-generic-parse-url thinking that in file://HOST/PATH, the path is /PATH, when in fact, according to the relevant RFCs, "/" is a separator and part of the URI syntax, and PATH is an absolute path (to be interpreted as starting from / on Unix, but that's irrelevant). This was extensively discussed in bug#5345. The subyacent cause of the bug, IMHO, is that many software for POSIX environments that parses URIs just takes the /PATH part as a whole because it is easier than removing the slash and then re-adding it. That breaks on Windows file: URIs, as this bug, and #5345, show. So the right fix IMO is as simple as the attached patch. The problem is that it will likely cause trouble for other users of url-generic-parse-url which wrongly assume that the path part will be rooted at /. Another, hacky & ugly, fix is removing the slash only if the PATH part matches /[A-Z]:. I'd rather fix it the good way and watch the fireworks. =C2=A0 =C2=A0 Juanma =3D=3D=3D modified file 'lisp/url/url-parse.el' --- lisp/url/url-parse.el 2010-06-22 16:48:53 +0000 +++ lisp/url/url-parse.el 2010-07-26 11:46:11 +0000 @@ -148,4 +148,5 @@ ;; 3.3. Path + (when (looking-at "/") (forward-char 1)) ;; Gross hack to preserve ';' in data URLs (setq save-pos (point)) From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 26 08:01:19 2010 Received: (at 6339) by debbugs.gnu.org; 26 Jul 2010 12:01:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdMMw-0002wu-95 for submit@debbugs.gnu.org; Mon, 26 Jul 2010 08:01:19 -0400 Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdMMu-0002wp-D8 for 6339@debbugs.gnu.org; Mon, 26 Jul 2010 08:01:17 -0400 Received: by gyg8 with SMTP id 8so876595gyg.3 for <6339@debbugs.gnu.org>; Mon, 26 Jul 2010 05:01:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=ZL7NlTEw5Otu86bTfJIYJjwzdYfxGcEwD4CYPDON554=; b=OHPv3lYYvy4rrOSlYvkKhU/Cup1FWumrjvbUJJPANMq+FSMSEcmajYDndFxCmytISg m20yqzz9XOo22nQ6LrYNTWmVCtsTM7hu4upDrtpSHKc6mZ61bBRi2LGwI6vpKV4RVoAw PqmzYP3VGs0KebUxuDLhrxIdohDvOtllvSh7k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=vmOJv6ODZI9rfYU/eHQRReH/okVpReL+ccI09S6sNtKXpClPaZBBkVPR0ljjoJ2Oyp xnSGNW65YsHCH6MGmyJxjy8Kq4QRdO3SP0Zwxew3xkz6nXt/+DmaReNIcjrnwsz4G06S Mane3iaHPW1cLZA/QuhDOViGwHdffgdna6Hh4= Received: by 10.100.137.6 with SMTP id k6mr7699587and.146.1280145679151; Mon, 26 Jul 2010 05:01:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.5.72 with HTTP; Mon, 26 Jul 2010 05:00:59 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Mon, 26 Jul 2010 14:00:59 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: 6339 Cc: 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) On Mon, Jul 26, 2010 at 1:50 PM, Juanma Barranquero wrote: > > The subyacent cause of the bug, IMHO, is that many software for POSIX > environments that parses URIs just takes the /PATH part as a whole > because it is easier than removing the slash and then re-adding it. > That breaks on Windows file: URIs, as this bug, and #5345, show. > > So the right fix IMO is as simple as the attached patch. The problem > is that it will likely cause trouble for other users of > url-generic-parse-url which wrongly assume that the path part will be > rooted at /. > > Another, hacky & ugly, fix is removing the slash only if the PATH part > matches /[A-Z]:. > > I'd rather fix it the good way and watch the fireworks. I agree. From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 01 14:46:35 2010 Received: (at 6339) by debbugs.gnu.org; 1 Aug 2010 18:46:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfdYR-0004LZ-IL for submit@debbugs.gnu.org; Sun, 01 Aug 2010 14:46:35 -0400 Received: from mail-iw0-f172.google.com ([209.85.214.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OfdYQ-0004LU-K5 for 6339@debbugs.gnu.org; Sun, 01 Aug 2010 14:46:35 -0400 Received: by iwn38 with SMTP id 38so3053495iwn.3 for <6339@debbugs.gnu.org>; Sun, 01 Aug 2010 11:46:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=nTXMCYjJQ8289l6zs/9EfVYPuf01SF4gjmURkd0G4A8=; b=wHFakOuQqGQyaXq2Cb/Ketsb0yzX8yM6IYpcehSaXc6NsdJfYAqjSiS4Wy5FZFx9k8 cV6JySLKEClSbqwDmC2DR7ZX4mMe+wDax7yS7gzR+Wik3RqxCakvzoG3j/YgIU/430ML XBOH99JwH+obfOLdy4KtJMUbhssbJ8OOliwJ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=otrwXNkCZIKSj+hRajhkjEVcOKx0/3LXN0//+LG+lqEYiOpHps7Vm1OsiPIfSuxklT v2rsgFvUvnfisgXgFesyCTg/q7pc+DMK1LC6+QGgyOrtlHP2ZY05bzyFDUhtoKkbjN/x vo4Os7m8h+FzY2vp9E3vAOF2R6DEXuAHCDBng= Received: by 10.231.31.7 with SMTP id w7mr5714254ibc.83.1280688415354; Sun, 01 Aug 2010 11:46:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.162.4 with HTTP; Sun, 1 Aug 2010 11:46:35 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Sun, 1 Aug 2010 20:46:35 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: 6339@debbugs.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 6339 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Anyone opposed to trying this patch on the trunk and seeing what breaks? J > =3D=3D=3D modified file 'lisp/url/url-parse.el' > --- lisp/url/url-parse.el =C2=A0 =C2=A0 =C2=A0 2010-06-22 16:48:53 +0000 > +++ lisp/url/url-parse.el =C2=A0 =C2=A0 =C2=A0 2010-07-26 11:46:11 +0000 > @@ -148,4 +148,5 @@ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; 3.3. Path > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (looking-at "/") (forward-char 1)) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Gross hack to preserve ';' in data = URLs > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq save-pos (point)) > From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 02 03:51:13 2010 Received: (at 6339) by debbugs.gnu.org; 2 Aug 2010 07:51:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofpnk-0001pd-QQ for submit@debbugs.gnu.org; Mon, 02 Aug 2010 03:51:13 -0400 Received: from mailout-de.gmx.net ([213.165.64.22] helo=mail.gmx.net) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1Ofpnh-0001pY-UZ for 6339@debbugs.gnu.org; Mon, 02 Aug 2010 03:51:11 -0400 Received: (qmail invoked by alias); 02 Aug 2010 07:51:30 -0000 Received: from p4FC190C9.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [79.193.144.201] by mail.gmx.net (mp004) with SMTP; 02 Aug 2010 09:51:30 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1//is0zSS7/NpW8pCFlJHeN97NeSmToevQ/CUv4Qk NY8eLa4zJHey6J From: Michael Albinus To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: Date: Mon, 02 Aug 2010 09:51:29 +0200 In-Reply-To: (Juanma Barranquero's message of "Sun, 1 Aug 2010 20:46:35 +0200") Message-ID: <87pqy14flq.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 6339 Cc: 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Juanma Barranquero writes: > Anyone opposed to trying this patch on the trunk and seeing what breaks? I'm in favour of this patch. The current behaviour could cause trouble to Tramp. > J Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 16:36:31 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 20:36:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6TWw-0006hG-St for submit@debbugs.gnu.org; Wed, 21 Sep 2011 16:36:31 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6TWr-0006gk-5f for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 16:36:26 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R6TWU-00069O-1x; Wed, 21 Sep 2011 22:36:02 +0200 From: Lars Magne Ingebrigtsen To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" In-Reply-To: (Juanma Barranquero's message of "Mon, 26 Jul 2010 13:50:09 +0200") Date: Wed, 21 Sep 2011 22:28:17 +0200 Message-ID: References: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Oneohtrix Point Never's _Returnal_: "Nil Admirari" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1R6TWU-00069O-1x X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1317242162.23613@SJjEFZg94Us+4udRKb3TVA X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6339 Cc: Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Juanma Barranquero writes: > On Thu, Jun 3, 2010 at 04:38, Lennart Borgman = wrote: > >> (setq x (url-generic-parse-url "file:///c:/some/file.txt")) >> (url-filename x) =3D> "/c:/some/file.txt" >> >> Should not that be "c:/some/file.txt"? [...] > I'd rather fix it the good way and watch the fireworks. > > =A0 =A0 Juanma > > =3D=3D=3D modified file 'lisp/url/url-parse.el' > --- lisp/url/url-parse.el 2010-06-22 16:48:53 +0000 > +++ lisp/url/url-parse.el 2010-07-26 11:46:11 +0000 > @@ -148,4 +148,5 @@ > ;; 3.3. Path > + (when (looking-at "/") (forward-char 1)) > ;; Gross hack to preserve ';' in data URLs > (setq save-pos (point)) If I say: (setq x (url-generic-parse-url "file:///home/larsi/foo.txt")) Then I get (url-filename x) =3D> "/home/larsi/foo.txt" as expected. Would your patch break that? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 18:22:03 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 22:22:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VB5-000322-L4 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 18:22:03 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VB3-00031d-4z for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 18:22:02 -0400 Received: by gxk19 with SMTP id 19so1585472gxk.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 15:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=F94Dnazu9ntAM64+AzsarcAkDvsh1jFEkkdwwHJaRgM=; b=E0cvBD01wUhdoYyQzZmnEGiggnQoTQ6yK0vruFkacZEC63aU2tp3oQUKED2NeoUnQV JSBzTEu/9o6CmyGB/36CJwxNzIwP0UyGzs4sS/Z2yxb+gJUrDD8r04ZCyeYJuJidGHOs z6OcUp+5RGB5B3ZaQI5FpuF7mJCYJK3l5ZUr4= Received: by 10.42.130.193 with SMTP id w1mr837087ics.176.1316643703350; Wed, 21 Sep 2011 15:21:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 15:21:03 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 00:21:03 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lars Magne Ingebrigtsen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Wed, Sep 21, 2011 at 22:28, Lars Magne Ingebrigtsen wro= te: > If I say: > > (setq x (url-generic-parse-url "file:///home/larsi/foo.txt")) > > Then I get > > (url-filename x) > =3D> "/home/larsi/foo.txt" > > as expected. =C2=A0Would your patch break that? My patch would return "home/larsi/foo.txt", yes. But expecting the slash is a "bug" in you expectations, because the *filename* (the path, according to the RFCs, see below) of file:///home/larsi/foo.txt is not "/home/larsi/foo.txt". The slash is a separator, part of the URI syntax, and "home/larsi/foo.txt" is an absolute path. It's easier to see it with the full syntax, in things like file://localhost/home/larsi/foo.txt for example. The fact that url-filename returns the slash is a bug; just one that nobody has fixed or complained about because it makes easier to process the path than having to do (concat "/" (url-filename "file:///mypath")) At least, until you have a Windows URI. And no, this is *not* a Windows problem or a Windows bug, it's a bug that makes life easier for POSIX at the cost of making it uglier for Windows. =C2=A0 =C2=A0 Juanma >From RFC 1738 "Uniform Resource Locators (URL)" 3.10 FILES The file URL scheme is used to designate files accessible on a particular host computer. This scheme, unlike most other URL schemes, does not designate a resource that is universally accessible over the Internet. A file URL takes the form: file:/// where is the fully qualified domain name of the system on which the is accessible, and is a hierarchical directory path of the form //.../. For example, a VMS file DISK$USER:[MY.NOTES]NOTE123456.TXT might become As a special case, can be the string "localhost" or the empty string; this is interpreted as `the machine from which the URL is being interpreted'. The file URL scheme is unusual in that it does not specify an Internet protocol or access method for such files; as such, its utility in network protocols between hosts is limited. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 18:31:50 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 22:31:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VKX-0003FM-Iz for submit@debbugs.gnu.org; Wed, 21 Sep 2011 18:31:50 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VKV-0003FE-Ar for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 18:31:48 -0400 Received: by fxd18 with SMTP id 18so1998051fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 15:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=yMtDYV8Uphj0zgm/++VwtaF4PZVE04Q+I27KhXxVg+A=; b=jwdJBnn/3tG48s8NAJAH9NTjuys3zEQKNYwPjknY0HyrhsqUZbZM4byKtJhKgAdfh+ pBFflJHn7ei7MNm9WqnDoNv88m20d0jSFHcwQsskh6XMIz9yyWkw/Z78jeAswUodaZPc DFqBss9HSHGY5HqaB/dGEm4v2jt20ei2a07qE= Received: by 10.223.28.72 with SMTP id l8mr1760230fac.137.1316644289263; Wed, 21 Sep 2011 15:31:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 15:31:09 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 00:31:09 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 00:21, Juanma Barranquero wrote: > On Wed, Sep 21, 2011 at 22:28, Lars Magne Ingebrigtsen w= rote: > >> If I say: >> >> (setq x (url-generic-parse-url "file:///home/larsi/foo.txt")) >> >> Then I get >> >> (url-filename x) >> =3D> "/home/larsi/foo.txt" >> >> as expected. =C2=A0Would your patch break that? > > My patch would return "home/larsi/foo.txt", yes. > > But expecting the slash is a "bug" in you expectations, because the > *filename* (the path, according to the RFCs, see below) of > > =C2=A0file:///home/larsi/foo.txt > > is not "/home/larsi/foo.txt". The slash is a separator, part of the > URI syntax, and "home/larsi/foo.txt" is an absolute path. It's easier > to see it with the full syntax, in things like > > =C2=A0file://localhost/home/larsi/foo.txt > > for example. The fact that url-filename returns the slash is a bug; > just one that nobody has fixed or complained about because it makes > easier to process the path than having to do > > =C2=A0(concat "/" (url-filename "file:///mypath")) Are we not dealing with two different file name syntaxes here that just happens to look very similar? I.e. the URL file name syntax and the unix style file name syntax. url-filename is now returning the file name in unix style. This is, as you said, practical, but a bit surprising. I suspect there are some small mixing of those syntaxes elsewhere too. My suggestion would be to keep them and document them. > At least, until you have a Windows URI. And no, this is *not* a > Windows problem or a Windows bug, it's a bug that makes life easier > for POSIX at the cost of making it uglier for Windows. Indeed. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 18:46:19 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 22:46:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VYY-0003b6-W8 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 18:46:19 -0400 Received: from mail-pz0-f50.google.com ([209.85.210.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VYV-0003au-4C for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 18:46:16 -0400 Received: by pzk37 with SMTP id 37so3197960pzk.9 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 15:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=ZJCRGXYtpgU2fvxR5xLDfifhI6R4DV7vQBM6iz4O/pI=; b=Krg+HeZVAYKpBxx0bJSmIGRNg3RL+ma8lNI7yq8kmmKdRTmfeRFEMpYsNL7R5FsXr3 MLheGkxA0JqZyoV5qncKXxPHwSkiL0tFJz9k1a1QBZmw/KQMhzD7qpEENItVDSKYwpbW 17yZwZyBUEQUxbhTYAZWo5FdE084yvpvHBBMk= Received: by 10.68.44.225 with SMTP id h1mr49362pbm.85.1316645157070; Wed, 21 Sep 2011 15:45:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 15:45:17 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 00:45:17 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Sep 22, 2011 at 00:31, Lennart Borgman wrote: > Are we not dealing with two different file name syntaxes here that > just happens to look very similar? I.e. the URL file name syntax and > the unix style file name syntax. I would expect that an accessor for the filename slot of a struct called URL would interpret the struct as a URL, and the "filename" of the URL does not start with a slash. Why would I expect that url-filename (url-generic-parse-url, in fact) returns anything "unix style" specific? > url-filename is now returning the file name in unix style. No. (url-generic-parse-url "file:///C:/my/file.xt") =3D> [cl-struct-url "file" nil nil "" 21 "/C:/my/file.txt" nil nil t nil] That's not a "file name in unix style", that's a bug, clear and simple. There's no reason why url-generic-parse-url should think that a URL is in some kind of "unix style". What if it is a VMS filename? > This is, as > you said, practical, but a bit surprising. I suspect there are some > small mixing of those syntaxes elsewhere too. My suggestion would be > to keep them and document them. "Keep them and document them" still means that it does not work for Windows or VMS or anything not POSIX-style. And fixing it just for these systems means that we keep a bug for POSIX sake and make other systems jump around hoops. Ugly, to say the least. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 18:52:31 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 22:52:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VeY-0003jR-No for submit@debbugs.gnu.org; Wed, 21 Sep 2011 18:52:31 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6VeX-0003jK-64 for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 18:52:30 -0400 Received: by fxd18 with SMTP id 18so2010632fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 15:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=671zFCocGehliF3j8/WsKCmvKw2Nf2JVbgKDZlEv1dk=; b=Qy6MF8UdN6pM7CEOMas0pWYorIeEuI6LizpbXN0C5Ql8CnJMBxUW9yOSVWyFoLTssL DBdmfmam8jSaz3nHBHPxD7vg78mc4N8Yxjz1815UqzGE1EsEu5D/GEtxUmIa+RI8xCdd kX/H+1B1Tv1pGwCgzsViYM8Sz8U6uXeAnScZY= Received: by 10.223.48.69 with SMTP id q5mr1841019faf.80.1316645531254; Wed, 21 Sep 2011 15:52:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 15:51:51 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 00:51:51 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 00:45, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 00:31, Lennart Borgman > wrote: > >> Are we not dealing with two different file name syntaxes here that >> just happens to look very similar? I.e. the URL file name syntax and >> the unix style file name syntax. > > I would expect that an accessor for the filename slot of a struct > called URL would interpret the struct as a URL, and the "filename" of > the URL does not start with a slash. Why would I expect that > url-filename (url-generic-parse-url, in fact) returns anything "unix > style" specific? > >> url-filename is now returning the file name in unix style. > > No. > > =C2=A0(url-generic-parse-url "file:///C:/my/file.xt") =3D> [cl-struct-url > "file" nil nil "" 21 "/C:/my/file.txt" nil nil t nil] > > That's not a "file name in unix style", that's a bug, clear and > simple. Ah, yes, of course. I thought everyone reading here was clear about that. > There's no reason why url-generic-parse-url should think that > a URL is in some kind of "unix style". What if it is a VMS filename? You are right. I did not mean to imply that the current behaviour is ok. >> This is, as >> you said, practical, but a bit surprising. I suspect there are some >> small mixing of those syntaxes elsewhere too. My suggestion would be >> to keep them and document them. > > "Keep them and document them" still means that it does not work for > Windows or VMS or anything not POSIX-style. And fixing it just for > these systems means that we keep a bug for POSIX sake and make other > systems jump around hoops. Ugly, to say the least. Of course the behaviour must be fixed too. I meant to write that it is ok that url-filename returns a system-dependent absolute file name (for local files). From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 19:00:01 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 23:00:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6Vlp-0003t5-0s for submit@debbugs.gnu.org; Wed, 21 Sep 2011 19:00:01 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6Vln-0003sy-FG for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 18:59:59 -0400 Received: by gxk19 with SMTP id 19so1603567gxk.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 15:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=CX9WRpZjXZ7By2rMqySx6cX5AQ/oQK/HH9xaPtqDVbI=; b=FXXR571BpA5Imk38fRzjMRmOcywMOkRVJIzKG5nDRj4BboDNbbSIQLSz2AZiiFIgqh RjjlHqWJCf//4bRYZ1s6zkd2mOm6gHHanCeVFxfxkv9eXyzL+MM74bccRoSrirI/kKOm SAdczBsxmARuxhYFuRXRbHoy6OXWbtcAuyoGg= Received: by 10.68.26.97 with SMTP id k1mr110492pbg.17.1316645981136; Wed, 21 Sep 2011 15:59:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 15:59:01 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 00:59:01 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Sep 22, 2011 at 00:51, Lennart Borgman wrote: > Of course the behaviour must be fixed too. I meant to write that it is > ok that url-filename returns a system-dependent absolute file name > (for local files). When you do (url-filename (url-generic-parse-url "file:///SOMEPATH")) you are not checking SOMEPATH against the local filesystem (the path does not need to exist, for example). So, when you say "system-dependant" and "local files", what you're really saying is that SOMEPATH should be analyzed to see whether it is POSIX-style, or Windows-style, or whatever, to "fix it" or "leave it alone" according to the detected style. And yes, we have already discussed that. It is certainly possible. It is also ugly and ad hoc, and ugly too. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 19:17:41 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 23:17:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6W2u-0004HB-RF for submit@debbugs.gnu.org; Wed, 21 Sep 2011 19:17:41 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6W2s-0004H3-UD for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 19:17:39 -0400 Received: by fxd18 with SMTP id 18so2025205fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 16:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=L7VKt4AiddCKzRRtSWEhoFIM+p5vNCjNnpbAxchkjyg=; b=miACO8QNznPvJQyjQe6/gx7wCqmTdIcGTqufYx34WyPC3wCH/f1BpJmKkSlxLUCNnL FwwAnCFV4hiBVI9XNzBrEoCnbInscc1kq5YCv9pKJh5D+vSHFQvbyc2j+br/TxLIgVkD ib3gun/oi3jffSfP1V0QCdIgcu7id0aJ/crCs= Received: by 10.223.28.72 with SMTP id l8mr1821991fac.137.1316647040616; Wed, 21 Sep 2011 16:17:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 16:15:38 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 01:15:38 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 00:59, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 00:51, Lennart Borgman > wrote: > >> Of course the behaviour must be fixed too. I meant to write that it is >> ok that url-filename returns a system-dependent absolute file name >> (for local files). > > When you do (url-filename (url-generic-parse-url "file:///SOMEPATH")) > you are not checking SOMEPATH against the local filesystem (the path > does not need to exist, for example). So, when you say > "system-dependant" and "local files", what you're really saying is > that SOMEPATH should be analyzed to see whether it is POSIX-style, or > Windows-style, or whatever, to "fix it" or "leave it alone" according > to the detected style. The analysis of "file:///SOMEPATH" should probably be system independent (since it is an URL that is analysed). But the return value should be system dependant since it is supposed to be a local file system absolute path. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 19:19:53 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 23:19:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6W53-0004K8-B9 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 19:19:53 -0400 Received: from mail-yi0-f44.google.com ([209.85.218.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6W51-0004K1-KE for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 19:19:52 -0400 Received: by yic13 with SMTP id 13so1341725yic.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 16:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=aty1DDxevkjRuBCPWMzRDjr/EeSMb+JwkDtxWYWOCok=; b=ZNEHGP8CbGy6dp/SyiFE0OQbUZPttJMHhB7uEmAFz7WxtpD+mHmNo1XSolIiFSYsFD 7nq3YFjhj6DRavrB9qIKJkaijsT19Orqb4N9HFjm32FtpcZrY0kjVq1EUPV+FtEQZa/n +Kn7u7O+RLhxaWImM8wyirluwWSWgHo2HSUfw= Received: by 10.68.14.102 with SMTP id o6mr198974pbc.51.1316647173082; Wed, 21 Sep 2011 16:19:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 16:18:53 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 01:18:53 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Sep 22, 2011 at 01:15, Lennart Borgman wrote: > But the return value should be system dependant since it is supposed > to be a local file system absolute path. Do you mean that Emacs running in a POSIX system cannot process file URLs for Windows local files, for example? =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 19:36:09 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 23:36:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6WKm-0004gb-PK for submit@debbugs.gnu.org; Wed, 21 Sep 2011 19:36:09 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6WKk-0004gU-Kg for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 19:36:07 -0400 Received: by fxd18 with SMTP id 18so2034619fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 16:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=CreQY4Te+ajUli4udlTzPFA6kXMosAhH+7DEZ40Y6XA=; b=BUxqX94DvESPSBK6xejMEz506O6ZpMhtcAQWcW5XANrE+Uo4lou3f5Yoiu8fDqXIMq c6ZTNk725Ixx1GxVkZO3sqqJQnxHoQMQPUAYHQmHRuHSJnicb7x7TnOOk2NXLcJQpkyB AufyjXgx9V/C+cH6xo2QVwembky56cKyaI8Fk= Received: by 10.223.8.2 with SMTP id f2mr1899892faf.23.1316648070151; Wed, 21 Sep 2011 16:34:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 16:32:40 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 01:32:40 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 01:18, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 01:15, Lennart Borgman > wrote: > >> But the return value should be system dependant since it is supposed >> to be a local file system absolute path. > > Do you mean that Emacs running in a POSIX system cannot process file > URLs for Windows local files, for example? I am not sure. Are URL style file name context dependent? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 19:38:16 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 23:38:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6WMp-0004jc-OZ for submit@debbugs.gnu.org; Wed, 21 Sep 2011 19:38:15 -0400 Received: from mail-yx0-f172.google.com ([209.85.213.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6WMn-0004jU-Fk for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 19:38:13 -0400 Received: by yxt33 with SMTP id 33so1614890yxt.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 16:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=zUzIHfr2KSEKvL+DO0jS3PCd+e6Y32jLo93tf+B43nQ=; b=KPs/bg+gY2LO0cPsX8prdjc5xvwds/wK5xpNJnqWk4tZSzMvNERqrNmOa+G2uGcoJS XZjN5SO94f2P/tY1R61b5iwacP2eHW5dE1ihBYB0NsTndQ1DiJ/zXmp54LRNbOiOMLH/ PDW48rdj+S44zNYWV0EqTbOP3K4GcGY+IvbRk= Received: by 10.68.7.132 with SMTP id j4mr274300pba.102.1316648275092; Wed, 21 Sep 2011 16:37:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 16:37:15 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 01:37:15 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Sep 22, 2011 at 01:32, Lennart Borgman wrote: > I am not sure. Are URL style file name context dependent? I don't understand your question, but I will be quite surprised if the answer to my previous question is "yes". =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 19:47:27 2011 Received: (at 6339) by debbugs.gnu.org; 21 Sep 2011 23:47:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6WVi-0004wF-Lx for submit@debbugs.gnu.org; Wed, 21 Sep 2011 19:47:27 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6WVf-0004w7-GG for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 19:47:24 -0400 Received: by fxd18 with SMTP id 18so2039643fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 16:47:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=fg/gvf7WCW6/3CXf7z4wiKCyA4V08rrxtcFdm/XMv5o=; b=N2MCfKV4kC+HLO/+8zAa4N8oql4hfdGBRx3TX3Ww3g/SqqcvuxmetIsz5XiKEwKsoA bguIwNfng5tdB1pvkuAPpf0jFAk3BsE0ft/9Js/dwID8Bb3jHTa3AlwgR49V004BKIvL 2laksbuOnLpRYkYconez5/2Joh3obm18Z1dIc= Received: by 10.223.28.72 with SMTP id l8mr1864209fac.137.1316648825319; Wed, 21 Sep 2011 16:47:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 16:46:45 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 01:46:45 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 01:37, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 01:32, Lennart Borgman > wrote: > >> I am not sure. Are URL style file name context dependent? > > I don't understand your question, but I will be quite surprised if the > answer to my previous question is "yes". Then your answer to my question is that you will be surprised if URL style file names are context dependent. ;-) But unfortunately that might not be the right answer... Take this URL file name: file:///c:/some/file.txt On windows that would be "c:/some/file.txt". What would it mean on a unix system? I guess it would mean "/c:/some/file.txt", but I am not sure. Perhaps that is an invalid file name on unix? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 20:33:08 2011 Received: (at 6339) by debbugs.gnu.org; 22 Sep 2011 00:33:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XDu-0005wQ-V2 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 20:33:08 -0400 Received: from mail-pz0-f50.google.com ([209.85.210.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XDs-0005wI-Ql for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 20:33:05 -0400 Received: by pzk37 with SMTP id 37so3401330pzk.9 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 17:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=849eulI6AXa7F22cpg1NkvrFo4m6nP9vuQirYpxt3xI=; b=vkOvTPDSgP9OFTSQXREK4VUhUYcnRrUQV/jKoVP1snoac5OIXnCVc+OWKAhTsWXy3h WFEVY7BGqdjXiSV2geEFFZYfzrazuXhwp8EZhn8M6ZCJJQVVK+/zC7xEH5TYc2OkRZlU qGyZYL4XhNWTTOozHTA6x+rlnm/ZnlJdBY9V4= Received: by 10.68.44.225 with SMTP id h1mr521250pbm.85.1316651566063; Wed, 21 Sep 2011 17:32:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 17:32:05 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 02:32:05 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Sep 22, 2011 at 01:46, Lennart Borgman wrote: > But unfortunately that might not be the right answer... Take this URL fil= e name: > > =C2=A0 file:///c:/some/file.txt > > On windows that would be "c:/some/file.txt". What would it mean on a > unix system? I guess it would mean "/c:/some/file.txt", but I am not > sure. Perhaps that is an invalid file name on unix? Quite likely, but IMO you're missing the point. file:///c:/some/file.txt is a URL, i.e., it's a pointer to some specific file in some specific place (or files with identical path and name in different hosts, because the URL is missing the HOST part, defaulting then to localhost). In fact, it is the URL that points to a file, in some filesystem, with absolute path "c:/some/file.txt". Whether that file exists, and whether that path makes sense when you apply it locally to a POSIX system, i.e., whether you can access a file with that URL, is irrelevant to the fact that "c:/some/file.txt" is the path of the URL. You're muddling the waters when you insist in "context" and "local system" and the like, because that affects to the *use* of the URL, not its syntax. Splitting a URL into pieces according to the RFC does not depend on where you do it or how do you intend to use it. We wouldn't be having this discussion in an alternative world where the POSIX path separator was still "/", but the good people who wrote the URI/URL specs had chosen "#" as the field separator in URLs: file:##HOST#PATH file:###c:/some/file.txt vs. file:###some/file.txt No one would try to split that as "#some/file.txt". =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 20:41:28 2011 Received: (at 6339) by debbugs.gnu.org; 22 Sep 2011 00:41:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XM0-00069E-91 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 20:41:28 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XLu-000693-My for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 20:41:24 -0400 Received: by fxd18 with SMTP id 18so2069081fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 17:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=uBofjUjxtT5nvV9M3bHv6e0l8AJJjWQ4kuftkw3rBpY=; b=fnhXv8JmpX3gEOqKZ4zc4G016wUnvliaDRZXlv8jf2t9TSny+6/R1UtBAoaRoZsDcd nfZEyKD/qhLlMyiRa1jImz1B5Iq7Rf8L+KDNJ4tXjJgpSSPNrOimcAKXXRxV8vjlzNfV ECQj2lq1I+OXXPSLJr0KRgYLhqtu+3Pv01pqM= Received: by 10.223.18.149 with SMTP id w21mr1948357faa.118.1316652064283; Wed, 21 Sep 2011 17:41:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 17:40:43 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 02:40:43 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 02:32, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 01:46, Lennart Borgman > wrote: > >> But unfortunately that might not be the right answer... Take this URL fi= le name: >> >> =C2=A0 file:///c:/some/file.txt >> >> On windows that would be "c:/some/file.txt". What would it mean on a >> unix system? I guess it would mean "/c:/some/file.txt", but I am not >> sure. Perhaps that is an invalid file name on unix? > > Quite likely, but IMO you're missing the point. > > file:///c:/some/file.txt is a URL, i.e., it's a pointer to some > specific file in some specific place (or files with identical path and > name in different hosts, because the URL is missing the HOST part, > defaulting then to localhost). In fact, it is the URL that points to a > file, in some filesystem, with absolute path "c:/some/file.txt". Yes, but please remember if you make that interpretation (which I hope is the correct one) then "c:/some/file.txt" is an absolute local file name in URL file name syntax. So if we hold on to that interpretation then maybe we should say (and document ;-) that url-filename returns such a file name and that it needs to be translated to the actually used systems file syntax to be used there. This would be an incompatible change from the current (faulty) behaviour, but I think it would be the best. > Whether that file exists, and whether that path makes sense when you > apply it locally to a POSIX system, i.e., whether you can access a > file with that URL, is irrelevant to the fact that "c:/some/file.txt" > is the path of the URL. You're muddling the waters when you insist in > "context" and "local system" and the like, because that affects to the > *use* of the URL, not its syntax. Splitting a URL into pieces > according to the RFC does not depend on where you do it or how do you > intend to use it. Ah, yes. I think we are saying the same thing about the problem here. > We wouldn't be having this discussion in an alternative world where > the POSIX path separator was still "/", but the good people who wrote > the URI/URL specs had chosen "#" as the field separator in URLs: > file:##HOST#PATH > > =C2=A0file:###c:/some/file.txt =C2=A0vs. =C2=A0file:###some/file.txt > > No one would try to split that as "#some/file.txt". That is a good example. From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 21:00:28 2011 Received: (at 6339) by debbugs.gnu.org; 22 Sep 2011 01:00:29 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XeO-0006Yf-00 for submit@debbugs.gnu.org; Wed, 21 Sep 2011 21:00:28 -0400 Received: from mail-yi0-f44.google.com ([209.85.218.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XeI-0006YV-UN for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 21:00:24 -0400 Received: by yic13 with SMTP id 13so1381992yic.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 18:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=M22Vo6zjVZLFj7toeEjfS9FF/fcjXtHoR/CPKb4mvjQ=; b=ier1Tu11fYEQqJQ8HTnNySj6gzx7Q1zwbJDXB67YKq/utJp2nv8x8ImCCtPvS/F2uJ v0ocwvbLt019V9F29S48wZBkap4ejCVSg26Q8sbQIdsqw/7RR3qJe0xtKIejwrH+lQkI GCPU0ZfOiIvcX3FLhxjkKGc0xm1R3GNXe16XA= Received: by 10.68.26.97 with SMTP id k1mr655991pbg.17.1316653204303; Wed, 21 Sep 2011 18:00:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 17:59:24 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 02:59:24 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Sep 22, 2011 at 02:40, Lennart Borgman wrote: > Yes, but please remember if you make that interpretation (which I hope > is the correct one) then "c:/some/file.txt" is an absolute local file > name in URL file name syntax. > > So if we hold on to that interpretation then maybe we should say (and > document ;-) that url-filename returns such a file name and that it > needs to be translated to the actually used systems file syntax to be > used there. > > This would be an incompatible change from the current (faulty) > behaviour, but I think it would be the best. Isn't that what I've been saying all along? =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 21:08:34 2011 Received: (at 6339) by debbugs.gnu.org; 22 Sep 2011 01:08:34 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XmD-0006jP-GR for submit@debbugs.gnu.org; Wed, 21 Sep 2011 21:08:34 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XmB-0006jF-9a for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 21:08:32 -0400 Received: by fxd18 with SMTP id 18so2086598fxd.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 18:08:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=pgFE6HO1o7KdYA3POrLtFpVYKXRhAf75s/pVXllkIQY=; b=xyLG3B2GblW0XHH3CsGQj8BS7E8PccA2m1z5PnBC5lozTIF7z856xoY6SW09piR9dE z5nRuStz/4Zjy2HxbgIxNsp0SyonSBDQyKPmdhzEjbA9Y9r/RyUypaqtsiTJxjMtF2p6 FiwE9Rtsh9cbiNznUltOvQrFNGZRsD6tAdwrw= Received: by 10.223.39.3 with SMTP id d3mr2018991fae.99.1316653692268; Wed, 21 Sep 2011 18:08:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Wed, 21 Sep 2011 18:07:52 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 03:07:52 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 02:59, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 02:40, Lennart Borgman > wrote: > >> Yes, but please remember if you make that interpretation (which I hope >> is the correct one) then "c:/some/file.txt" is an absolute local file >> name in URL file name syntax. >> >> So if we hold on to that interpretation then maybe we should say (and >> document ;-) that url-filename returns such a file name and that it >> needs to be translated to the actually used systems file syntax to be >> used there. >> >> This would be an incompatible change from the current (faulty) >> behaviour, but I think it would be the best. > > Isn't that what I've been saying all along? If you say so ;-) From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 21 21:15:06 2011 Received: (at 6339) by debbugs.gnu.org; 22 Sep 2011 01:15:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XsY-0006sb-Gg for submit@debbugs.gnu.org; Wed, 21 Sep 2011 21:15:06 -0400 Received: from mail-gx0-f172.google.com ([209.85.161.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6XsW-0006sU-Q1 for 6339@debbugs.gnu.org; Wed, 21 Sep 2011 21:15:05 -0400 Received: by gxk19 with SMTP id 19so1657256gxk.3 for <6339@debbugs.gnu.org>; Wed, 21 Sep 2011 18:14:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=M7UO/AoYKs4mXguJy4KdNceJGWA/gofV/9BxPTOqAQA=; b=AZtQURRWJxh0kbXixprXB2/UrROomRkrIJo1/MmdjsavTfY+jJ6HdPSN49YJM+kE8D fWwb2St5zMoII5vMf2pUDqSOkfsaA6uOyuIgMrmHowtbUT0eOVfS83dtTAqD7EIsZMUB ieC3r9wNTAh+bMhNb+1LTmpzeN1TLbni5VVU0= Received: by 10.68.14.102 with SMTP id o6mr718777pbc.51.1316654086057; Wed, 21 Sep 2011 18:14:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Wed, 21 Sep 2011 18:14:06 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 22 Sep 2011 03:14:06 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Lennart Borgman Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Sep 22, 2011 at 03:07, Lennart Borgman wrote: > If you say so ;-) Well, > Yes, but please remember if you make that interpretation (which I hope > is the correct one) then "c:/some/file.txt" is an absolute local file > name in URL file name syntax. This is what the RFC says. I even quoted it. > So if we hold on to that interpretation then maybe we should say (and > document ;-) that url-filename returns such a file name This I didn't say (but any change or unexpected behavior should be document= ed). > and that it > needs to be translated to the actually used systems file syntax to be > used there. I explicitly talked about (concat "/" (url-filename ...)) > This would be an incompatible change from the current (faulty) > behaviour, but I think it would be the best. This is what I've been saying in pretty much every message from this thread= . So yes, "I say so". =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 22 05:53:18 2011 Received: (at 6339) by debbugs.gnu.org; 22 Sep 2011 09:53:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6fy1-00034X-ST for submit@debbugs.gnu.org; Thu, 22 Sep 2011 05:53:18 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R6fxz-00034P-BG for 6339@debbugs.gnu.org; Thu, 22 Sep 2011 05:53:16 -0400 Received: by fxd18 with SMTP id 18so2395862fxd.3 for <6339@debbugs.gnu.org>; Thu, 22 Sep 2011 02:52:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=qUNAb2Wajl11n+oSxeQp5zHuxs/IW56VzP0ltFgtEWY=; b=xSK6MuJk7mxT06978IAkfkvpFVDyKlQLu8ZjPnrRs0bm3sR6SSI6tbvNbzB4Rv4b7R DAa0Ize9/G75yq0gvM0IAHuJNMUDaP54EsQIaTMb4acgnH59kn5xDOHU9T8sGi5YnaIJ id3XubYR8zXn5DNJYGXlf/By1qjoK8b2ThS4Q= Received: by 10.223.8.2 with SMTP id f2mr2754350faf.23.1316685174573; Thu, 22 Sep 2011 02:52:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Thu, 22 Sep 2011 02:52:34 -0700 (PDT) In-Reply-To: References: From: Lennart Borgman Date: Thu, 22 Sep 2011 11:52:34 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Juanma Barranquero Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Thu, Sep 22, 2011 at 03:14, Juanma Barranquero wrote: > > This is what I've been saying in pretty much every message from this thread. > > So yes, "I say so". And I said in my second message that I agree... ;-) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 23 23:36:06 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 03:36:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7J26-0001Sv-DD for submit@debbugs.gnu.org; Fri, 23 Sep 2011 23:36:06 -0400 Received: from mail-gw0-f44.google.com ([74.125.83.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7J23-0001Sn-GD for 6339@debbugs.gnu.org; Fri, 23 Sep 2011 23:36:04 -0400 Received: by gwj15 with SMTP id 15so4359185gwj.3 for <6339@debbugs.gnu.org>; Fri, 23 Sep 2011 20:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=GYazriDoitw7x35v6J3xzMyw/6ngQSAAJXScm9yeq1c=; b=jLLC0u7/Ch9ohJgOTeTWouPbDAa8eD3F3/FACZyM+QG453QwrZnxM8VvviRZR82gX9 5Ro+iH95vuIBKqW492MgkQFmkqaoMUN7pSooDwYhFSXE6F/0nxj5/qFt+TZlIlZBb4kT DRIz7AzXeVwJTHhjKB2LLYLua4IMHSceDJS6U= Received: by 10.236.154.137 with SMTP id h9mr25938531yhk.26.1316835333240; Fri, 23 Sep 2011 20:35:33 -0700 (PDT) Received: from home.jasonrumney.net ([180.75.159.53]) by mx.google.com with ESMTPS id w50sm2833055yhi.2.2011.09.23.20.35.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Sep 2011 20:35:31 -0700 (PDT) Received: from wanchan (wanchan [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by home.jasonrumney.net (Postfix) with ESMTPS id 22BD53D6; Sat, 24 Sep 2011 11:35:17 +0800 (MYT) From: Jason Rumney To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: Date: Sat, 24 Sep 2011 11:35:17 +0800 In-Reply-To: (Juanma Barranquero's message of "Thu, 22 Sep 2011 02:32:05 +0200") Message-ID: <87bouahatm.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) Juanma Barranquero writes: > file:///c:/some/file.txt is a URL, i.e., it's a pointer to some > specific file in some specific place (or files with identical path and > name in different hosts, because the URL is missing the HOST part, > defaulting then to localhost). In fact, it is the URL that points to a > file, in some filesystem, with absolute path "c:/some/file.txt". No. That is not an absolute path on most platforms. The absolute path on POSIX platforms would be /c:/some/file.txt, which is consistant with other URL schemes where the initial / forms part of the PATH portion of the URL. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 05:00:41 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 09:00:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7O6C-0000Ow-RP for submit@debbugs.gnu.org; Sat, 24 Sep 2011 05:00:41 -0400 Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7O68-0000On-4N for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 05:00:37 -0400 Received: by gyd12 with SMTP id 12so3162608gyd.3 for <6339@debbugs.gnu.org>; Sat, 24 Sep 2011 02:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=XYsn8Zj7W0aHcF63APX7WREFhJfW0wvtTds8NtTPhEk=; b=PSfwe6f9kKuoStKZEe/9hf79mVKxFdp7CL23LrNH7k+GjO9zMwyDIRylpjQZUL4dFJ PdOZ5hfGAqayfBcidDT4kxBPpzZuiW4f2GDdwgBto/4DqepQiUsMsFkOZ/vwTZTcWj73 X0c6EuZEZ7aCVQnrL727Q+GmWmqRvJDIrxxPo= Received: by 10.68.33.232 with SMTP id u8mr1309486pbi.119.1316854804042; Sat, 24 Sep 2011 02:00:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Sat, 24 Sep 2011 01:59:24 -0700 (PDT) In-Reply-To: <87bouahatm.fsf@gnu.org> References: <87bouahatm.fsf@gnu.org> From: Juanma Barranquero Date: Sat, 24 Sep 2011 10:59:24 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Jason Rumney Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Sat, Sep 24, 2011 at 05:35, Jason Rumney wrote: > No. That is not an absolute path on most platforms. The spec says that the PATH part is an absolute path. You can argue that, in POSIX, "some/file.txt" is an absolute path, because all PATH parts of file: URIs must be understood as such (and so, have an implicit / at the front), or you can argue that these paths should be propertly rooted (and so, the correct way for a POSIX file: reference is file:////some.file.txt). But no amount of defining or redefining "absolute" is going to change the fact that the third slash in file:/// is a separator, and no part of the PATH, according to the spec. > The absolute path on > POSIX platforms would be /c:/some/file.txt, which is consistant with > other URL schemes where the initial / forms part of the PATH portion of > the URL. I don't know what other URLs schemes say, but certainly RFC 1738 says: 3.3. HTTP The HTTP URL scheme is used to designate Internet resources accessible using HTTP (HyperText Transfer Protocol). The HTTP protocol is specified elsewhere. This specification only describes the syntax of HTTP URLs. An HTTP URL takes the form: http://:/? where and are as described in Section 3.1. If : is omitted, the port defaults to 80. No user name or password is allowed. is an HTTP selector, and is a query string. The is optional, as is the and its preceding "?". If neither nor is present, the "/" may also be omitted. Within the and components, "/", ";", "?" are reserved. The "/" character may be used within HTTP to designate a hierarchical structure. so it's no different of "file:". The slash is a separator. If people doesn''t want to change the way Emacs works, and prefer to add ad hoc fixes for Windows URIs, I can do nothing against it. It's ugly, but such is life. But let's accept that using that slash is just a shortcut because it conveniently happens to coincide with the POSIX slash separator, not because it is really part of the path. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 05:08:14 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 09:08:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7ODV-0000ZQ-6H for submit@debbugs.gnu.org; Sat, 24 Sep 2011 05:08:13 -0400 Received: from mail-pz0-f50.google.com ([209.85.210.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7ODT-0000ZI-3K for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 05:08:11 -0400 Received: by pzk37 with SMTP id 37so9862956pzk.9 for <6339@debbugs.gnu.org>; Sat, 24 Sep 2011 02:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=S5wnEck0Y8kra99sUGUOgNx7GCWeO3wH9UKXSIpJDu8=; b=JHcas065PU270/U4n7hMKjiAV/vQdIbQ79PVGLmO7w8YJ4z/eLBKVxahy7AfCJl2AZ hoz2ivF68bfFrLxm8AWPp6WPp7PE80KC0QD0rFoO7az2nfQh24En7QtX+4ivqIDEvBVm x+ccsMN+vTshnXTh4svowyyVxXM51A6jLOVY0= Received: by 10.68.19.100 with SMTP id d4mr15468712pbe.34.1316855259103; Sat, 24 Sep 2011 02:07:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Sat, 24 Sep 2011 02:06:58 -0700 (PDT) In-Reply-To: References: <87bouahatm.fsf@gnu.org> From: Juanma Barranquero Date: Sat, 24 Sep 2011 11:06:58 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Jason Rumney Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Sat, Sep 24, 2011 at 10:59, Juanma Barranquero wrote: > You can argue > that, in POSIX, "some/file.txt" is an absolute path, because all PATH > parts of file: URIs must be understood as such (and so, have an > implicit / at the front), I mean that "some/file.txt" is an absolute path, in the context of decoding and splitting an URI, of course. Obviously it is not in general terms. That said, I suppose that people who thinks that the third slash is not a separator, but part of the PATH, should also be arguing in favor of Windows-style file: URIs being of the form "file://C:/some/file.txt" (which is clearly incorrect, according to the spec, and certainly unused in the wild). What does not make sense is arguing that the value returned by url-generic-parse-url is correct. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 05:47:43 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 09:47:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7Opj-0001RZ-0g for submit@debbugs.gnu.org; Sat, 24 Sep 2011 05:47:43 -0400 Received: from mail-fx0-f44.google.com ([209.85.161.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7Oph-0001RS-Fs for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 05:47:42 -0400 Received: by fxd18 with SMTP id 18so4181613fxd.3 for <6339@debbugs.gnu.org>; Sat, 24 Sep 2011 02:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=1fu5nDVFKWFF/sELgcXku24HwxiCuEP1sIl9PnQm7zk=; b=HOCA6omvssJr8VSYV2Pepzu3rMrrTCoiwePHcW9Pe9zbu5oQ5N2ZSA1CVvyRT4wKTY OitFrVRPghe+zorPxIj0WTyE1cFp5aYkUk9o5mqVvRjfiyJoLMzDFwE0AfRbCclOJppk ol6Jm0ppWtT4iFheHZsUC5Xo98uBwKzCa+Qpk= Received: by 10.223.39.3 with SMTP id d3mr6704945fae.99.1316857629418; Sat, 24 Sep 2011 02:47:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Sat, 24 Sep 2011 02:46:48 -0700 (PDT) In-Reply-To: <87bouahatm.fsf@gnu.org> References: <87bouahatm.fsf@gnu.org> From: Lennart Borgman Date: Sat, 24 Sep 2011 11:46:48 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Jason Rumney Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Juanma Barranquero , Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) On Sat, Sep 24, 2011 at 05:35, Jason Rumney wrote: > Juanma Barranquero writes: > >> file:///c:/some/file.txt is a URL, i.e., it's a pointer to some >> specific file in some specific place (or files with identical path and >> name in different hosts, because the URL is missing the HOST part, >> defaulting then to localhost). In fact, it is the URL that points to a >> file, in some filesystem, with absolute path "c:/some/file.txt". > > No. That is not an absolute path on most platforms. This is not about absolute path in the platform syntax. It is an absolute path as understood as part of an URL. That has to be translated to a platform path. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 07:54:10 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 11:54:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7Qo6-00054j-Cl for submit@debbugs.gnu.org; Sat, 24 Sep 2011 07:54:10 -0400 Received: from mail-out.m-online.net ([212.18.0.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7Qo4-00054a-7R for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 07:54:09 -0400 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 523C4188A17D; Sat, 24 Sep 2011 13:53:35 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 66A8E1C0008F; Sat, 24 Sep 2011 13:53:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id EdyPCMPhYUhE; Sat, 24 Sep 2011 13:53:34 +0200 (CEST) Received: from igel.home (ppp-88-217-112-198.dynamic.mnet-online.de [88.217.112.198]) by mail.mnet-online.de (Postfix) with ESMTP; Sat, 24 Sep 2011 13:53:34 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id AA713CA296; Sat, 24 Sep 2011 13:53:33 +0200 (CEST) From: Andreas Schwab To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: <87bouahatm.fsf@gnu.org> X-Yow: I'm not available for comment.. Date: Sat, 24 Sep 2011 13:53:33 +0200 In-Reply-To: (Juanma Barranquero's message of "Sat, 24 Sep 2011 10:59:24 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org, Jason Rumney X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Juanma Barranquero writes: > I don't know what other URLs schemes say, but certainly RFC 1738 says: > > 3.3. HTTP Note that the interpretation of the local part is scheme dependent, so you cannot compare file: and http: directly. RFC 1738 defines fileurl in terms of fpath, which is shared with ftpurl. In an ftp URL an absolute fpath needs to be written with a leading escaped slash (%2F). RFCs 4722 and 5022 consistently use four leading slashes for an absolute file name. OTOH there are a few occurrences of file URLs denoting absolute paths with only three slashes in other RFCs. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 08:29:18 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 12:29:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7RM6-0005sL-0w for submit@debbugs.gnu.org; Sat, 24 Sep 2011 08:29:18 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7RM4-0005sC-4T for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 08:29:16 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1R7RLU-0008WI-E2; Sat, 24 Sep 2011 08:28:40 -0400 Date: Sat, 24 Sep 2011 08:28:40 -0400 Message-Id: Content-Type: text/plain; charset=ISO-8859-15 From: Richard Stallman To: Jason Rumney In-reply-to: <87bouahatm.fsf@gnu.org> (message from Jason Rumney on Sat, 24 Sep 2011 11:35:17 +0800) Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: <87bouahatm.fsf@gnu.org> X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 6339 Cc: lekktu@gmail.com, larsi@gnus.org, 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: rms@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > defaulting then to localhost). In fact, it is the URL that points to a > file, in some filesystem, with absolute path "c:/some/file.txt". No. That is not an absolute path on most platforms. Please note that the GNU terminology for this is "file name" -- "path" means a list of directories, only. -- Dr Richard Stallman President, Free Software Foundation 51 Franklin St Boston MA 02110 USA www.fsf.org www.gnu.org Skype: No way! That's nonfree (freedom-denying) software. Use free telephony http://directory.fsf.org/category/tel/ From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 17:57:51 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 21:57:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7aEJ-0004JB-3l for submit@debbugs.gnu.org; Sat, 24 Sep 2011 17:57:51 -0400 Received: from mail-gy0-f172.google.com ([209.85.160.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7aEG-0004J3-4l for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 17:57:49 -0400 Received: by gyd12 with SMTP id 12so3414568gyd.3 for <6339@debbugs.gnu.org>; Sat, 24 Sep 2011 14:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=ybGAGqGMJHGnAntbrrMPodwMtl+ANZB5vILijmqOO68=; b=YPCFatN7h0CfGL9NJGY7NqzFtkd7AsKYLui+9m13OXWc9t+hYzZghI0pJTVXysAOcB Ahcbqwofj6h1KDnN2bgsQ3OXvBqQAvPyAdsOXXHSn5c90tsHzHdJTGhEBNXYQ6A0NN3H nZzpYORrNTqykifEvsWZgJRaltGTB4V7vTP3A= Received: by 10.68.14.102 with SMTP id o6mr18882799pbc.51.1316901433199; Sat, 24 Sep 2011 14:57:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Sat, 24 Sep 2011 14:56:33 -0700 (PDT) In-Reply-To: References: <87bouahatm.fsf@gnu.org> From: Juanma Barranquero Date: Sat, 24 Sep 2011 23:56:33 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org, Jason Rumney X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) On Sat, Sep 24, 2011 at 13:53, Andreas Schwab wrote= : > In an ftp URL an absolute fpath needs to be written with a leading > escaped slash (%2F). =C2=A0RFCs 4722 and 5022 consistently use four leadi= ng > slashes for an absolute file name. =C2=A0OTOH there are a few occurrences= of > file URLs denoting absolute paths with only three slashes in other RFCs. I think we're in agreement: there are several ways to interpret the PATH part, but in all cases, it does not include the separator slash. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 19:43:24 2011 Received: (at 6339) by debbugs.gnu.org; 24 Sep 2011 23:43:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7bsR-0006ga-T5 for submit@debbugs.gnu.org; Sat, 24 Sep 2011 19:43:24 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7bsL-0006gM-I8 for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 19:43:19 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id F03691C02FAA; Sun, 25 Sep 2011 01:42:40 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id B6DA71C0015B; Sun, 25 Sep 2011 01:42:40 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id fovE1DRTMPOf; Sun, 25 Sep 2011 01:42:40 +0200 (CEST) Received: from igel.home (ppp-88-217-112-198.dynamic.mnet-online.de [88.217.112.198]) by mail.mnet-online.de (Postfix) with ESMTP; Sun, 25 Sep 2011 01:42:40 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id CF97CCA296; Sun, 25 Sep 2011 01:42:39 +0200 (CEST) From: Andreas Schwab To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: <87bouahatm.fsf@gnu.org> X-Yow: I'm also pre-POURED pre-MEDITATED and pre-RAPHAELITE!! Date: Sun, 25 Sep 2011 01:42:39 +0200 In-Reply-To: (Juanma Barranquero's message of "Sat, 24 Sep 2011 23:56:33 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org, Jason Rumney X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Juanma Barranquero writes: > On Sat, Sep 24, 2011 at 13:53, Andreas Schwab wrote: > >> In an ftp URL an absolute fpath needs to be written with a leading >> escaped slash (%2F).  RFCs 4722 and 5022 consistently use four leading >> slashes for an absolute file name.  OTOH there are a few occurrences of >> file URLs denoting absolute paths with only three slashes in other RFCs. > > I think we're in agreement: there are several ways to interpret the > PATH part, but in all cases, it does not include the separator slash. That's not the point. If you interpret the local part as an absolute file name you have to prepend a slash after decomposing. If not, then file:///etc/hosts wouldn't work as probably intended. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 24 20:03:23 2011 Received: (at 6339) by debbugs.gnu.org; 25 Sep 2011 00:03:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7cBm-00078Z-Mo for submit@debbugs.gnu.org; Sat, 24 Sep 2011 20:03:23 -0400 Received: from mail-pz0-f50.google.com ([209.85.210.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7cBj-00078Q-HX for 6339@debbugs.gnu.org; Sat, 24 Sep 2011 20:03:21 -0400 Received: by pzk37 with SMTP id 37so11428908pzk.9 for <6339@debbugs.gnu.org>; Sat, 24 Sep 2011 17:02:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=xlRKf+SnC/8RJZfxhe5NWm+mv/7dPkeRLcVa5oierFQ=; b=oBQGocx1Ws4ZWOMx5LveoC6elrzfNfnnQBrXP7xtXNgM51iuVT9LVmR9CkkS6lEUU9 0MXNdD56I5846PE92/5wVD2zGNJ3Z1orVLO0CKReiZ9GyEur9dNP2BjYuMbG2Zoqw1RD e/nvnxSmYMRzUdVz4/39Vym46fzKmyQGGMWUY= Received: by 10.68.19.100 with SMTP id d4mr19177672pbe.34.1316908964093; Sat, 24 Sep 2011 17:02:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Sat, 24 Sep 2011 17:02:03 -0700 (PDT) In-Reply-To: References: <87bouahatm.fsf@gnu.org> From: Juanma Barranquero Date: Sun, 25 Sep 2011 02:02:03 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Andreas Schwab Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Lars Magne Ingebrigtsen , 6339@debbugs.gnu.org, Jason Rumney X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Sun, Sep 25, 2011 at 01:42, Andreas Schwab wrote= : > If you interpret the local part as an absolute > file name you have to prepend a slash after decomposing. =C2=A0If not, th= en > file:///etc/hosts wouldn't work as probably intended. Of course. But that's not the point. The point is that how do you interpret the local part is only important *after* decomposing the URI. It's not url-generic-parse-url's task to do any interpretation. Its docstring says just this: Return an url-struct of the parts of url. The CL-style struct contains the following fields: TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS. It says nothing of interpreting any of it, and specifically FILENAME, POSIX-style. And if it does interpret it POSIX-style it is wreaking havoc with Windows file: URIs (that's the whole point of this bug report). So, of course I agree with you when you say "If you interpret the local part as an absolute file name you have to prepend a slash after decomposing.", or more precisely, with what Lennart said previously: > This is not about absolute path in the platform syntax. It is an > absolute path as understood as part of an URL. That has to be > translated to a platform path. But this discussion is not about how to use the decomposed URI, is about whether the decomposition is correct, or buggy (and so should be fixed). I think the RFCs (the one I quoted and the ones you quoted) show clearly that the current decomposition is erroneous, though convenient for POSIX systems. At this point, I can see only two options: - Fix the bug, and fix also the places where the return value of url-generic-parse-url / url-filename is assumed to be a POSIX absolute path. - Leave it as is, and implement some ad hoc hack to make it work with Windows file: URIs. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 01:08:51 2011 Received: (at submit) by debbugs.gnu.org; 6 Oct 2011 05:08:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBgCR-000751-Bd for submit@debbugs.gnu.org; Thu, 06 Oct 2011 01:08:51 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBgCN-00074o-Sd for submit@debbugs.gnu.org; Thu, 06 Oct 2011 01:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBgCA-0006UK-Me for submit@debbugs.gnu.org; Thu, 06 Oct 2011 01:08:35 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:35156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBgCA-0006UG-LC for submit@debbugs.gnu.org; Thu, 06 Oct 2011 01:08:34 -0400 Received: from eggs.gnu.org ([140.186.70.92]:47820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBgC9-00084U-OE for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 01:08:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RBgC8-0006U6-Pt for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 01:08:33 -0400 Received: from lo.gmane.org ([80.91.229.12]:33641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RBgC8-0006U2-CH for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 01:08:32 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RBgC5-0002HH-1M for bug-gnu-emacs@gnu.org; Thu, 06 Oct 2011 07:08:29 +0200 Received: from c-71-237-25-24.hsd1.co.comcast.net ([71.237.25.24]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Oct 2011 07:08:29 +0200 Received: from kevin.d.rodgers by c-71-237-25-24.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Oct 2011 07:08:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" Date: Wed, 05 Oct 2011 23:09:08 -0600 Lines: 44 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-25-24.hsd1.co.comcast.net User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.23) Gecko/20110920 Thunderbird/3.1.15 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) On 9/21/11 7:14 PM, Juanma Barranquero wrote: > On Thu, Sep 22, 2011 at 03:07, Lennart Borgman > wrote: > >> If you say so ;-) > > Well, > >> Yes, but please remember if you make that interpretation (which I hope >> is the correct one) then "c:/some/file.txt" is an absolute local file >> name in URL file name syntax. > > This is what the RFC says. I even quoted it. > >> So if we hold on to that interpretation then maybe we should say (and >> document ;-) that url-filename returns such a file name > > This I didn't say (but any change or unexpected behavior should be documented). > >> and that it >> needs to be translated to the actually used systems file syntax to be >> used there. > > I explicitly talked about (concat "/" (url-filename ...)) Don't you mean: (expand-file-name (url-filename ...) "/") >> This would be an incompatible change from the current (faulty) >> behaviour, but I think it would be the best. > > This is what I've been saying in pretty much every message from this thread. > > So yes, "I say so". > > Juanma > > > > -- Kevin Rodgers Denver, Colorado, USA From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 07:57:48 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 11:57:48 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBmaC-00054N-HH for submit@debbugs.gnu.org; Thu, 06 Oct 2011 07:57:48 -0400 Received: from mail-qw0-f44.google.com ([209.85.216.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBmaA-000546-CH for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 07:57:47 -0400 Received: by qadb12 with SMTP id b12so1980895qad.3 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 04:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=5kWQhysc2DyykIt+K4HnG46/AHFoAa7pdK9jKAJEkMM=; b=YwwM7Y9mu3zSCA8noqkLkNkxlOu7qOifWiwLmgSO2fSBrQ1k4EhusyLIW28WS0XlUe 6Z9I93fCgDUHplbnWQpwR0wkQqAv0PzAsyOWxn8BmgNxD7PkoQ7gggWDVIl/6oBOVbGq sxi+NYB6b7njNPP+0ltAoyIQzCx5OnA4niqi0= Received: by 10.68.60.2 with SMTP id d2mr5330385pbr.82.1317902252097; Thu, 06 Oct 2011 04:57:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Thu, 6 Oct 2011 04:56:52 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 6 Oct 2011 13:56:52 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Kevin Rodgers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Oct 6, 2011 at 07:09, Kevin Rodgers wro= te: > Don't you mean: (expand-file-name (url-filename ...) "/") That's better and more correct, yes. BTW, I would like to know whether we will finally do anything with this bug. The fix is clear, is just that apparently some people dislike it. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 08:44:01 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 12:44:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBnIv-00068z-2j for submit@debbugs.gnu.org; Thu, 06 Oct 2011 08:44:01 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBnIq-00068h-Sl; Thu, 06 Oct 2011 08:43:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwKAMOhjU7O+JxS/2dsb2JhbABEmQ2PIIEGgVMBAQQBViMQCw4mEhQYDSSIEbcMhywEoQyERA X-IronPort-AV: E=Sophos;i="4.68,496,1312171200"; d="scan'208";a="140138849" Received: from 206-248-156-82.dsl.teksavvy.com (HELO pastel.home) ([206.248.156.82]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 06 Oct 2011 08:43:42 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2FC20592D4; Thu, 6 Oct 2011 08:43:41 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" Message-ID: References: Date: Thu, 06 Oct 2011 08:43:41 -0400 In-Reply-To: (Juanma Barranquero's message of "Thu, 6 Oct 2011 13:56:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> Don't you mean: (expand-file-name (url-filename ...) "/") > That's better and more correct, yes. > BTW, I would like to know whether we will finally do anything with > this bug. The fix is clear, is just that apparently some people > dislike it. Could someone (re)send the proposed patch? Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 09:41:26 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 13:41:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBoCU-0000UB-6F for submit@debbugs.gnu.org; Thu, 06 Oct 2011 09:41:26 -0400 Received: from mail-pz0-f50.google.com ([209.85.210.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBoCQ-0000Tx-5F for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 09:41:23 -0400 Received: by pzk37 with SMTP id 37so7035706pzk.9 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 06:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=ttGPWz8KQNkZQv6S6kgGY77coK3vvl093NFz7hfigbQ=; b=aLZ+vdQDG2sM6Qk5HCftNuiVyTYelcIppiYZ/TNm/6vgnRmy29Wesv/4noybzJjzpQ p4HqQmDA9Wd2w21ZnLfyVpxM3EUW2c5IKnoYJQQU9ZdlBamSPEvNWwp1CcYEVDMuo3eI p79tNe8/lrD6I1upsvq+BrVkdVFWqUCo1KV8Y= Received: by 10.68.24.35 with SMTP id r3mr5718525pbf.116.1317908467287; Thu, 06 Oct 2011 06:41:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Thu, 6 Oct 2011 06:40:27 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 6 Oct 2011 15:40:27 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) > Could someone (re)send the proposed patch? The proposed patch is this, or something similar to this: =3D=3D=3D modified file 'lisp/url/url-parse.el' --- lisp/url/url-parse.el 2010-06-22 16:48:53 +0000 +++ lisp/url/url-parse.el 2010-07-26 11:46:11 +0000 @@ -148,4 +148,5 @@ ;; 3.3. Path + (when (looking-at "/") (forward-char 1)) ;; Gross hack to preserve ';' in data URLs (setq save-pos (point)) but the gist of it is, make url-generic-parse-url not consider the slash separator as part of the path. If we agree in that, we can then decide whether that place is the right one to do it or not. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 10:25:24 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 14:25:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBot2-0001mx-8Q for submit@debbugs.gnu.org; Thu, 06 Oct 2011 10:25:24 -0400 Received: from mail-qw0-f44.google.com ([209.85.216.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBosz-0001ml-UY for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 10:25:22 -0400 Received: by qadb12 with SMTP id b12so2127224qad.3 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 07:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=Zwm4QQ8A9/UvpTLKl2QSShPWPJZVsVgyUKy80+84rUM=; b=bT1pzU6ajkwEkkVbOd3nR78680daN+x4V6Iin5ZCHDJbIOuwEQqUM7kEOvFYENOYGS n2Blv5zaLd5YlhMRZpPeiJf4Ez7vR2yKDzxSHKoZsFjbhKd+q291uF798Y4PZxSr18e5 ajIl5Iqz65HvoDUaTK+s5wUGIPLQjUdK9fJwU= Received: by 10.224.212.1 with SMTP id gq1mr481272qab.277.1317911107255; Thu, 06 Oct 2011 07:25:07 -0700 (PDT) Received: from home.jasonrumney.net ([180.75.146.74]) by mx.google.com with ESMTPS id z1sm6578300qao.1.2011.10.06.07.25.03 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Oct 2011 07:25:06 -0700 (PDT) Received: by home.jasonrumney.net (Postfix, from userid 1000) id 1A3F4DA3; Thu, 6 Oct 2011 22:24:58 +0800 (MYT) From: Jason Rumney To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: Date: Thu, 06 Oct 2011 22:24:57 +0800 In-Reply-To: (Juanma Barranquero's message of "Thu, 6 Oct 2011 15:40:27 +0200") Message-ID: <87sjn6qjt2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , Stefan Monnier , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) Juanma Barranquero writes: >> Could someone (re)send the proposed patch? > > The proposed patch is this, or something similar to this: > > === modified file 'lisp/url/url-parse.el' > --- lisp/url/url-parse.el 2010-06-22 16:48:53 +0000 > +++ lisp/url/url-parse.el 2010-07-26 11:46:11 +0000 > @@ -148,4 +148,5 @@ > ;; 3.3. Path > + (when (looking-at "/") (forward-char 1)) > ;; Gross hack to preserve ';' in data URLs > (setq save-pos (point)) > > but the gist of it is, make url-generic-parse-url not consider the > slash separator as part of the path. If we agree in that, we can then > decide whether that place is the right one to do it or not. This is a general url-parsing function, changing this to not return the leading / on the file portion of the url will break every other user of this function. This needs to be done for file URLs only, and be system-dependent. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 10:31:43 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 14:31:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBoz9-0001wC-8i for submit@debbugs.gnu.org; Thu, 06 Oct 2011 10:31:43 -0400 Received: from mail-vw0-f44.google.com ([209.85.212.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBoz7-0001vx-5q for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 10:31:42 -0400 Received: by vws5 with SMTP id 5so2289927vws.3 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 07:31:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=8lMktH3n+bjM9HUZSnAHDYxeXh8KwqC3MO/OwSEKh4I=; b=dDiewtQWWZ2UYO5UeQnpOGEgwPqLHT3uK+E5O2Y+oT4yB04Ev1I34JrUCX0si1uc5y eXC+cPl9xvtAAeFrrQ7OxZ11NsI+bDtm6GIO9PR/7wBXpyjhiCL+uXDiKWpJVyxu2uin suGr87Ir9j9mK8cKGTouVfVE6ytDRjoGe0RlY= Received: by 10.68.34.226 with SMTP id c2mr5999611pbj.99.1317911486145; Thu, 06 Oct 2011 07:31:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Thu, 6 Oct 2011 07:30:46 -0700 (PDT) In-Reply-To: <87sjn6qjt2.fsf@gnu.org> References: <87sjn6qjt2.fsf@gnu.org> From: Juanma Barranquero Date: Thu, 6 Oct 2011 16:30:46 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Jason Rumney Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , Stefan Monnier , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Oct 6, 2011 at 16:24, Jason Rumney wrote: > This is a general url-parsing function, changing this to not return > the leading / on the file portion of the url will break every other user > of this function. Only the ones that incorrectly assume that the slash is part of the path. The ones that use expand-file-name, as Kevin pointed out, will continue to work. > This needs to be done for file URLs only Perhaps, but for non-file URLs, the slash isn't part of the path either. That's what the RFCs say. > and be system-dependent. That's a hack. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 10:39:25 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 14:39:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBp6T-00028T-FG for submit@debbugs.gnu.org; Thu, 06 Oct 2011 10:39:20 -0400 Received: from mail-qw0-f44.google.com ([209.85.216.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBp65-00027R-NC for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 10:39:01 -0400 Received: by qadb12 with SMTP id b12so2142803qad.3 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 07:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=DjNa97UKj7wxh8g/+ru/qDtHypxPbUI5KYNqWsbg3U0=; b=TBle1I27zlpYaqJmSQrA3DGzStLElKf4Lp7IQsejtOXawSGbgOGfy7thVaS159RDzu NMT/FZcpGZFyI4HaiYKMTQWCtFxVc5eGusDRbeaIa/agHSgy6M36yVkj4VNTDozsBKQ5 shJA5okj7uxxQqDdnaKJMFs/4D3K6hpyV6E6U= Received: by 10.224.186.144 with SMTP id cs16mr579635qab.63.1317911919046; Thu, 06 Oct 2011 07:38:39 -0700 (PDT) Received: from home.jasonrumney.net ([180.75.146.74]) by mx.google.com with ESMTPS id du5sm6588146qab.14.2011.10.06.07.38.34 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 06 Oct 2011 07:38:37 -0700 (PDT) Received: by home.jasonrumney.net (Postfix, from userid 1000) id 30F82DA3; Thu, 6 Oct 2011 22:38:29 +0800 (MYT) From: Jason Rumney To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: <87sjn6qjt2.fsf@gnu.org> Date: Thu, 06 Oct 2011 22:38:29 +0800 In-Reply-To: (Juanma Barranquero's message of "Thu, 6 Oct 2011 16:30:46 +0200") Message-ID: <87lisyqj6i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -3.6 (---) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , Stefan Monnier , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.6 (---) Juanma Barranquero writes: > On Thu, Oct 6, 2011 at 16:24, Jason Rumney wrote: > >> This is a general url-parsing function, changing this to not return >> the leading / on the file portion of the url will break every other user >> of this function. > > Only the ones that incorrectly assume that the slash is part of the > path. The ones that use expand-file-name, as Kevin pointed out, will > continue to work. It is incorrect to assume that the slash is NOT part of the file portion of the URL, when actual usage in http, ftp, gopher and file URLs on platforms other than Windows and VMS relies on the leading slash being preserved. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 10:50:53 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 14:50:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBpHh-0002Pw-Ba for submit@debbugs.gnu.org; Thu, 06 Oct 2011 10:50:53 -0400 Received: from mail-pz0-f50.google.com ([209.85.210.50]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBpHf-0002Pj-3E for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 10:50:52 -0400 Received: by pzk37 with SMTP id 37so7204979pzk.9 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 07:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=5KABVl2sPGXdMEB7W3PBcXBquncNf9YBnz3CJHBSPPc=; b=RcxHLf6fA+GooaCzaG+bkr7WT8SXJBpLWlSVluzJ7l9CGGSjlMYvSkTKlEpF7+7kFX xcjNy1Ldjn2uKYboopuLqIJf51R7KygAsvZF3cjhOGWJu9Ft5OA7QZa1Q2aX8XPNq0Bd poY2f3TUnoY+HmBjQusxUdWyHZyrKp2BPjkrw= Received: by 10.68.14.97 with SMTP id o1mr6484933pbc.0.1317912636082; Thu, 06 Oct 2011 07:50:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Thu, 6 Oct 2011 07:49:56 -0700 (PDT) In-Reply-To: <87lisyqj6i.fsf@gnu.org> References: <87sjn6qjt2.fsf@gnu.org> <87lisyqj6i.fsf@gnu.org> From: Juanma Barranquero Date: Thu, 6 Oct 2011 16:49:56 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Jason Rumney Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , Stefan Monnier , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Oct 6, 2011 at 16:38, Jason Rumney wrote: > It is incorrect to assume that the slash is NOT part of the file portion > of the URL, when actual usage in http, ftp, gopher and file URLs on > platforms other than Windows and VMS relies on the leading slash being > preserved. [Today is my "whole disagreement day", it seems.] It's a fact that the slash is NOT part of the file portion, whatever shortcuts people have taken along the years. That said, someone who really thinks that this is a Windows-specific problem, even if it is not, can trivially "fix" it with an ugly hack. Let's hope someone does and we can close this bug report forever. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 11:09:07 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 15:09:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBpZL-0003as-Mn for submit@debbugs.gnu.org; Thu, 06 Oct 2011 11:09:07 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBpZI-0003aP-Rp for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 11:09:05 -0400 Received: by wwi18 with SMTP id 18so4298496wwi.15 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 08:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=SkAdbijLXutpmUO7F8J7tk+ynEUN7zFf+yDAykmAFuA=; b=q/nuQcGvmx7uCHsTDhBWQa9Ha/n4PZxhU/1VHEiO7bsyqxJ6bmK1QIqEhAA5HPau3G kGNZijRtwJfI7csWwXYeaJrckbJFBlTMwwba1M/fbtwlIIGrQsiY0P7cZOE34pxPcmD7 PIZt2zBc0WmWooyeVuReiu14tL377Mu9ZwVp0= Received: by 10.216.55.210 with SMTP id k60mr1061999wec.61.1317913729926; Thu, 06 Oct 2011 08:08:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.20.229 with HTTP; Thu, 6 Oct 2011 08:08:17 -0700 (PDT) In-Reply-To: <87lisyqj6i.fsf@gnu.org> References: <87sjn6qjt2.fsf@gnu.org> <87lisyqj6i.fsf@gnu.org> From: Lennart Borgman Date: Thu, 6 Oct 2011 17:08:17 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Jason Rumney Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 6339 Cc: Juanma Barranquero , Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) On Thu, Oct 6, 2011 at 16:38, Jason Rumney wrote: > Juanma Barranquero writes: > >> On Thu, Oct 6, 2011 at 16:24, Jason Rumney wrote: >> >>> This is a general url-parsing function, changing this to not return >>> the leading / on the file portion of the url will break every other user >>> of this function. >> >> Only the ones that incorrectly assume that the slash is part of the >> path. The ones that use expand-file-name, as Kevin pointed out, will >> continue to work. > > It is incorrect to assume that the slash is NOT part of the file portion > of the URL, when actual usage in http, ftp, gopher and file URLs on > platforms other than Windows and VMS relies on the leading slash being > preserved. Didn't we conclude before that the URL style file part does not include the leading "/"? Or was there any objection to this? AFAICS the URL style file part simply does not have the same (as *nix systems) file syntax. So I agree with Juanma here (which is not too common ;-). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 11:09:17 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 15:09:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBpZU-0003bD-UE for submit@debbugs.gnu.org; Thu, 06 Oct 2011 11:09:17 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBpZT-0003aP-0E for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 11:09:15 -0400 Received: by mail-ww0-f46.google.com with SMTP id 18so4298496wwi.15 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 08:09:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=SkAdbijLXutpmUO7F8J7tk+ynEUN7zFf+yDAykmAFuA=; b=SXahuhSUrUiKqN1cOYPZvQRyc6V30KQhVd/KL9K+Be4E0MrnWNy5b6JK6GTC38WZBT i0nN8B7HhZrDt4GNcqjE3STCdiXkXdk8/f8+RN/OMK3X5VOcy4sIb+HzIdWKHwdgokW9 tPtW3M8/mKLFe2ygQ3GuVG/U61KPkmG4lE3Io= Received: by 10.216.220.129 with SMTP id o1mr1251094wep.61.1317913745500; Thu, 06 Oct 2011 08:09:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.181.85 with HTTP; Thu, 6 Oct 2011 08:08:38 -0700 (PDT) In-Reply-To: <87lisyqj6i.fsf@gnu.org> References: <87sjn6qjt2.fsf@gnu.org> <87lisyqj6i.fsf@gnu.org> From: Lennart Borgman Date: Thu, 6 Oct 2011 17:08:38 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Jason Rumney Content-Type: text/plain; charset=UTF-8 X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 6339 Cc: Juanma Barranquero , Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) On Thu, Oct 6, 2011 at 16:38, Jason Rumney wrote: > Juanma Barranquero writes: > >> On Thu, Oct 6, 2011 at 16:24, Jason Rumney wrote: >> >>> This is a general url-parsing function, changing this to not return >>> the leading / on the file portion of the url will break every other user >>> of this function. >> >> Only the ones that incorrectly assume that the slash is part of the >> path. The ones that use expand-file-name, as Kevin pointed out, will >> continue to work. > > It is incorrect to assume that the slash is NOT part of the file portion > of the URL, when actual usage in http, ftp, gopher and file URLs on > platforms other than Windows and VMS relies on the leading slash being > preserved. Didn't we conclude before that the URL style file part does not include the leading "/"? Or was there any objection to this? AFAICS the URL style file part simply does not have the same (as *nix systems) file syntax. So I agree with Juanma here (which is not too common ;-). From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 11:40:18 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 15:40:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBq3V-0004Jm-LF for submit@debbugs.gnu.org; Thu, 06 Oct 2011 11:40:18 -0400 Received: from relais.videotron.ca ([24.201.245.36]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBq3T-0004Jd-6B for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 11:40:16 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ceviche.home ([70.83.132.46]) by VL-VM-MR004.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0LSN00HV2I1HYI70@VL-VM-MR004.ip.videotron.ca> for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 11:36:57 -0400 (EDT) Received: by ceviche.home (Postfix, from userid 20848) id AAD486642D; Thu, 06 Oct 2011 11:31:16 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" Message-id: References: Date: Thu, 06 Oct 2011 11:31:16 -0400 In-reply-to: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) >> Could someone (re)send the proposed patch? > The proposed patch is this, or something similar to this: > === modified file 'lisp/url/url-parse.el' > --- lisp/url/url-parse.el 2010-06-22 16:48:53 +0000 > +++ lisp/url/url-parse.el 2010-07-26 11:46:11 +0000 > @@ -148,4 +148,5 @@ > ;; 3.3. Path > + (when (looking-at "/") (forward-char 1)) > ;; Gross hack to preserve ';' in data URLs > (setq save-pos (point)) > but the gist of it is, make url-generic-parse-url not consider the > slash separator as part of the path. If we agree in that, we can then > decide whether that place is the right one to do it or not. I understand the gist of it. I'm interested in the actual resulting code changes: the above sample patch fails to include the corresponding (expand-file-name (url-filename ...) "/"), for example. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 11:57:40 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 15:57:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBqKK-0004hv-73 for submit@debbugs.gnu.org; Thu, 06 Oct 2011 11:57:40 -0400 Received: from mail-vw0-f44.google.com ([209.85.212.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBqKI-0004hi-EM for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 11:57:39 -0400 Received: by vws5 with SMTP id 5so2385751vws.3 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 08:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=+hWXpw6UF0PcWtQ4NuhmNgaqevCa+vHoSlHfQ9Wvd7I=; b=b9jCAzQ+ybK1m9/y5Vxhb5l9e5fp6/VUDyQwSTq+1KEWnfFNf+IfTgD3TNtFTFrU9n 10mrpzgpG0bAmM2kDrI5sCqXgFt3BQX+6JrQpLC1z8TOaqbT/06qs0WkLEghEMu2lrDH k9Ewg/UFen7x+wqQAfaHAdQlBmem1NTxwRThY= Received: by 10.68.19.4 with SMTP id a4mr6692712pbe.14.1317916643228; Thu, 06 Oct 2011 08:57:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Thu, 6 Oct 2011 08:56:43 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 6 Oct 2011 17:56:43 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Oct 6, 2011 at 17:31, Stefan Monnier wro= te: > I understand the gist of it. I'm sure of it. > I'm interested in the actual resulting > code changes: the above sample patch fails to include the corresponding > (expand-file-name (url-filename ...) "/"), for example. There are 41 uses of (url-filename ...) in the Emacs sources, all of them in url\url*.el except two in net/xesam.el. I'm unwilling to go looking for things to fix and prepare such a patch unless there's some consensus that removing the slash is the Right Thing to Do. If the decision is that no, it isn't, then I suppose things like these: ---- C:\Devel\emacs\repo\trunk\lisp\url\url-handlers.el (or (file-name-directory (url-filename url)) "/") ---- C:\Devel\emacs\repo\trunk\lisp\url\url-parse.el (or (url-filename urlobj) "/") ---- C:\Devel\emacs\repo\trunk\lisp\url\url-expand.el (if (string-match "^/" (url-filename urlobj)) will have to be checked to see whether they are right for Windows. =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 12:49:45 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 16:49:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBr8j-0005xj-1r for submit@debbugs.gnu.org; Thu, 06 Oct 2011 12:49:45 -0400 Received: from relais.videotron.ca ([24.201.245.36]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBr8f-0005xZ-9K for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 12:49:42 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from ceviche.home ([70.83.132.46]) by VL-VM-MR004.ip.videotron.ca (Oracle Communications Messaging Exchange Server 7u4-22.01 64bit (built Apr 21 2011)) with ESMTP id <0LSN007SML99YOA0@VL-VM-MR004.ip.videotron.ca> for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 12:46:24 -0400 (EDT) Received: by ceviche.home (Postfix, from userid 20848) id 18615660B6; Thu, 06 Oct 2011 12:49:20 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" Message-id: References: Date: Thu, 06 Oct 2011 12:49:20 -0400 In-reply-to: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) >> I'm interested in the actual resulting >> code changes: the above sample patch fails to include the corresponding >> (expand-file-name (url-filename ...) "/"), for example. > There are 41 uses of (url-filename ...) in the Emacs sources, all of > them in url\url*.el except two in net/xesam.el. But the patch you sent changes url-generic-parse-url so it presumably can affect many more places that just those that call url-filename. > I'm unwilling to go looking for things to fix and prepare such a patch > unless there's some consensus that removing the slash is the Right > Thing to Do. I think it's the right thing to do. But maybe the best patch will need to rename the `filename' slot and to define url-filename to do the (expand-file-name (url-somethingelse URL) "/") or something like that. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 12:55:19 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 16:55:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBrE6-00065Y-Rm for submit@debbugs.gnu.org; Thu, 06 Oct 2011 12:55:19 -0400 Received: from mail-vx0-f172.google.com ([209.85.220.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBrE4-00065J-MI for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 12:55:17 -0400 Received: by vcbfo11 with SMTP id fo11so2461768vcb.3 for <6339@debbugs.gnu.org>; Thu, 06 Oct 2011 09:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=oZV0h5i/Yfj4jAZ514KoiRZlyewpUVgO+mqb2kdrttU=; b=tpdxTCz3szvxXIqk90GqnoRM57vuZ6nCT5E4mJyBUdqumnFbgSvtf5tCU1K5Q17Npv 2FQq+RsC9H9Krq26lGClFBaLZ0U2dn4mR0bjA9U91bybC2oiPW+mHGDtKy8sbVfiiR6l nnhuDcnwWLu7Tsoa5PIT4EHGGthrz8g27TTKU= Received: by 10.68.14.97 with SMTP id o1mr7102244pbc.0.1317920101113; Thu, 06 Oct 2011 09:55:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.223.13 with HTTP; Thu, 6 Oct 2011 09:54:21 -0700 (PDT) In-Reply-To: References: From: Juanma Barranquero Date: Thu, 6 Oct 2011 18:54:21 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Stefan Monnier Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) On Thu, Oct 6, 2011 at 18:49, Stefan Monnier wro= te: > But the patch you sent changes url-generic-parse-url so it presumably > can affect many more places that just those that call url-filename. url-generic-parse-url returns a url struct, and url-filename is the accessor for the slot. If there's code that uses the slot without going through the accessor, well... I think that's a bug (or, at the very least, dangerous and ugly) and sooner or later we'll find about it. > I think it's the right thing to do. =C2=A0But maybe the best patch will n= eed > to rename the `filename' slot and to define url-filename to do the > (expand-file-name (url-somethingelse URL) "/") or something like that. I don't think you can do that, because, as explained before in the thread, splitting the URL and using its parts are independent actions. It is entirely possible to split a file URL and then use it in different systems, isn't it? =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 06 17:09:20 2011 Received: (at 6339) by debbugs.gnu.org; 6 Oct 2011 21:09:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBvBv-0000Xc-L9 for submit@debbugs.gnu.org; Thu, 06 Oct 2011 17:09:20 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RBvBs-0000XO-T6 for 6339@debbugs.gnu.org; Thu, 06 Oct 2011 17:09:17 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGAYjk7O+JxS/2dsb2JhbABCqDKBBoFTAQEEAVYjEAsOJhIUGA0kiBG4V4csBKEMhEQ X-IronPort-AV: E=Sophos;i="4.68,498,1312171200"; d="scan'208";a="140196654" Received: from 206-248-156-82.dsl.teksavvy.com (HELO ceviche.home) ([206.248.156.82]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 06 Oct 2011 17:09:00 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 884B9663BE; Thu, 6 Oct 2011 17:08:59 -0400 (EDT) From: Stefan Monnier To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" Message-ID: References: Date: Thu, 06 Oct 2011 17:08:58 -0400 In-Reply-To: (Juanma Barranquero's message of "Thu, 6 Oct 2011 18:54:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 6339 Cc: Kevin Rodgers , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) >> But the patch you sent changes url-generic-parse-url so it presumably >> can affect many more places that just those that call url-filename. > url-generic-parse-url returns a url struct, and url-filename is the > accessor for the slot. If there's code that uses the slot without > going through the accessor, well... I think that's a bug (or, at the > very least, dangerous and ugly) and sooner or later we'll find > about it. Sorry, yes, the above paragraph was written before I remembered that url-filename was an accessor. I just forgot to erase it before sending. >> I think it's the right thing to do. =A0But maybe the best patch will need >> to rename the `filename' slot and to define url-filename to do the >> (expand-file-name (url-somethingelse URL) "/") or something like that. > I don't think you can do that, because, as explained before in the > thread, splitting the URL and using its parts are independent actions. > It is entirely possible to split a file URL and then use it in > different systems, isn't it? Let's not talk about that for now. Once there's a working patch there'll be less chance for confusion. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed May 09 05:07:00 2012 Received: (at 6339) by debbugs.gnu.org; 9 May 2012 09:07:00 +0000 Received: from localhost ([127.0.0.1]:42210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SS2rL-0004hX-J1 for submit@debbugs.gnu.org; Wed, 09 May 2012 05:07:00 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:45167 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SS2rI-0004hP-TH for 6339@debbugs.gnu.org; Wed, 09 May 2012 05:06:57 -0400 Received: from [155.69.19.49] (port=50786 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SS2p9-0007X8-9d; Wed, 09 May 2012 05:04:43 -0400 From: Chong Yidong To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: Date: Wed, 09 May 2012 17:04:35 +0800 In-Reply-To: (Juanma Barranquero's message of "Mon, 26 Jul 2010 13:50:09 +0200") Message-ID: <87sjf94tek.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 6339 Cc: Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Ressurrecting this discussion... I just looked at the relevant code and at RFC 3986, and I think the problem is that the url object returned by url-generic-parse-url has badly named slots. That function ought to be following the RFC, instead of imposing its own interpretation of things. So the FILENAME slot, which is returned by url-filename, should really be two slots, PATH and QUERY, whose meanings are unambiguously defined in the URI spec. And there should be no expectation that the PATH part corresponds to a filename. In particular, RFC 3986 explicitly states that If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character. That is to say, the / is part of the path. Unfortunately, it's inconvenient to change the contents of the struct now, since that means changing the arglist of the url-parse-make-urlobj constructor; that constructor is already called from Tramp, and maybe other packages. So I think we should just explicitly state that the FILENAME slot is really PATH and QUERY together, and wash our hands of the matter. This also means that it should be up to callers to convert the FILENAME slot (i.e. PATH and QUERY) into proper filenames. The translation from URIs to filenames is scheme-independent anyway, so it shouldn't be handled at the level of url-generic-parse-url. From debbugs-submit-bounces@debbugs.gnu.org Wed May 09 07:55:43 2012 Received: (at 6339) by debbugs.gnu.org; 9 May 2012 11:55:43 +0000 Received: from localhost ([127.0.0.1]:42362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SS5Uc-0001o6-5T for submit@debbugs.gnu.org; Wed, 09 May 2012 07:55:42 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:63855) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SS5UZ-0001nr-W5 for 6339@debbugs.gnu.org; Wed, 09 May 2012 07:55:41 -0400 Received: by pbcwy7 with SMTP id wy7so375108pbc.3 for <6339@debbugs.gnu.org>; Wed, 09 May 2012 04:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=Mx7wA1fZB1BIqxFuxOFabxvbYaKg9OGS3UZH+oNc8Fg=; b=UGVNx10vxdTuDXnxZFL/pW/UVjisBGhpWVDsLfwXQ0EudK59TXsVRpCC4x2B65wNVz jekgxu4D1Kc0p6uAeRJHeoo3okimgqF9qVayYQkDE+tvtZht3dcMJNZj2OZL/j+TVAQD kEWhJvkLxm+r/aflBqrIxvXfWQkuOtYO9A9WVpjwlZrIOu1ndZMjTG4qQKn32RayoBsb e4AjO3PeVI3pYH1jnePSIQgRQHiw/5BJBQwW6w8e6CFeltRl0GX64VZ9vFAjaKeogPqz eaMO36Krn30YrtEA5AysTy/pfCxnFmA76qGfyFjBK+igYTrhKmfnLzrskRedfKlTBY0Z KfCw== Received: by 10.68.236.165 with SMTP id uv5mr8399886pbc.37.1336564402234; Wed, 09 May 2012 04:53:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.172.12 with HTTP; Wed, 9 May 2012 04:52:42 -0700 (PDT) In-Reply-To: <87sjf94tek.fsf@gnu.org> References: <87sjf94tek.fsf@gnu.org> From: Juanma Barranquero Date: Wed, 9 May 2012 13:52:42 +0200 Message-ID: Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" To: Chong Yidong Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 6339 Cc: Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On Wed, May 9, 2012 at 11:04 AM, Chong Yidong wrote: > In particular, RFC 3986 explicitly states that > > =C2=A0If a URI contains an authority component, then the path component m= ust > =C2=A0either be empty or begin with a slash ("/") character. > > That is to say, the / is part of the path. This means that it is part of the "path" component of the URI, used to separate and disambiguate, but does not say anything about how that is interpreted as a a filesystem path. In this case (with no authority): file:///C:/windows/path "/C:/windows/path" is the "path", but it is obviously not a filesystem path= . > So I think we should just explicitly state that the > FILENAME slot is really PATH and QUERY together, and wash our hands of > the matter. > > This also means that it should be up to callers to convert the FILENAME > slot (i.e. PATH and QUERY) into proper filenames. =C2=A0The translation f= rom > URIs to filenames is scheme-independent anyway, so it shouldn't be > handled at the level of url-generic-parse-url. I don't mind which way we fix it, but I'd be glad if we can avoid snarky and erroneous "Windows does this wrong" comments in the code while doing it... =C2=A0 =C2=A0 Juanma From debbugs-submit-bounces@debbugs.gnu.org Thu May 10 10:18:12 2012 Received: (at 6339) by debbugs.gnu.org; 10 May 2012 14:18:12 +0000 Received: from localhost ([127.0.0.1]:44945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SSUC3-00066r-Ed for submit@debbugs.gnu.org; Thu, 10 May 2012 10:18:11 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:59020 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SSUC1-00066j-Fy for 6339@debbugs.gnu.org; Thu, 10 May 2012 10:18:10 -0400 Received: from cm162.gamma80.maxonline.com.sg ([202.156.80.162]:41143 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SSU9k-0002er-Oy; Thu, 10 May 2012 10:15:49 -0400 From: Chong Yidong To: Juanma Barranquero Subject: Re: bug#6339: url-filename => "/c:/some/file.txt" References: <87sjf94tek.fsf@gnu.org> Date: Thu, 10 May 2012 22:15:35 +0800 In-Reply-To: (Juanma Barranquero's message of "Wed, 9 May 2012 13:52:42 +0200") Message-ID: <87lil0ruk8.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.96 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 6339 Cc: Lennart Borgman , 6339@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Juanma Barranquero writes: > I don't mind which way we fix it, but I'd be glad if we can avoid > snarky and erroneous "Windows does this wrong" comments in the code > while doing it... I've committed a fix to ffap to DTRT, and don't see what else to patch. Closing this bug; feel free to open a new one if there is a specific example of a caller doing the wrong thing. From debbugs-submit-bounces@debbugs.gnu.org Thu May 10 10:18:15 2012 Received: (at control) by debbugs.gnu.org; 10 May 2012 14:18:15 +0000 Received: from localhost ([127.0.0.1]:44947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SSUC7-000674-4y for submit@debbugs.gnu.org; Thu, 10 May 2012 10:18:15 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:59022 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SSUC3-00066q-2v for control@debbugs.gnu.org; Thu, 10 May 2012 10:18:11 -0400 Received: from cm162.gamma80.maxonline.com.sg ([202.156.80.162]:41144 helo=ulysses) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SSU9o-0002f3-2z for control@debbugs.gnu.org; Thu, 10 May 2012 10:15:52 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 6339 Date: Thu, 10 May 2012 22:15:45 +0800 Message-ID: <87r4usp1f2.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) close 6339 thanks From unknown Sun Jun 22 20:58:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 08 Jun 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator