From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: %20 in file://... URL Date: Mon, 29 Nov 2010 21:03:00 +0100 Message-ID: <87ipzf6gp7.wl%dmaus@ictsoc.de> References: <80ipzofw6j.fsf@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============0296991940==" Return-path: Received: from [140.186.70.92] (port=50374 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PN9wa-0000XV-2o for emacs-orgmode@gnu.org; Mon, 29 Nov 2010 15:03:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PN9wY-00031Y-BS for emacs-orgmode@gnu.org; Mon, 29 Nov 2010 15:03:23 -0500 Received: from mailout110.xlhost.de ([213.202.242.110]:35190 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PN9wX-00030d-T9 for emacs-orgmode@gnu.org; Mon, 29 Nov 2010 15:03:22 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Vincent =?UTF-8?B?QmVsYcOvY2hl?= Cc: David Maus , emacs-orgmode@gnu.org --===============0296991940== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Mon_Nov_29_21:02:58_2010-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Mon_Nov_29_21:02:58_2010-1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable At Fri, 26 Nov 2010 23:11:13 +0100, Vincent Bela=C3=AFche wrote: >=20 > [1 ] >=20 >=20 > [...] >=20 >=20 > > 1. The percent escaping/unescaping functions are not unicode aware; >=20 > My understanding/feeling is that a link in a file foo.org should be > interpreted with the coding scheme of this file.=20 I think this is not reasoble: The information about the coding system of the file where the link was created is not carried with the link. E.g. the unescaping function would have no idea about how to properly unescape the escaped chars. > Now I am surprised that you write that there is no unicode support, become > some code like this looks like unicoding the stuff: You are right: I should have said: The *escaping* function is not unicode aware. The unescaping function wasn't neither, but in the development version on Github I replace the old `org-link-unescape' with the function formerly known as `org-protocol-unhex-string'. > > 2. The percent escaping/unescaping functions require a user to > > explicitly tell which characters should be escaped; >=20 > That should be dependant on the type of link, file and http should support > that all characters are escaped, or that no character but % and ] are esc= aped. Correct. The new algorithm escapes characters if one of these conditions is true: - the character is a ASCII control character (<32, 127) - the character is the percent sign - the character is a non-ASCII character (>127, unicode) - the character is in the user supplied list For unescaping there is no table, it just unescapes all percent escaped characters. >=20 > I have a question to you: emacs has a url package to interprete url. Why = does > org does not rely on this. Good question. This is something to find out: There is C-h v org-url-encoding-use-url-hexify RET org-url-encoding-use-url-hexify is a variable defined in `org.el'. Its value is nil Documentation: Not documented as a variable. This variable was added back in 2009 (commit b077f710) but seems not used at all. The only difference I can see is that you can pass org-link-escape in a table of user defined characters that should be escaped -- but not sure if this functionality is really needed. So the next step is check all functions that use escape/unescape and see if replacing the calls to org-link-escape/unescape can be replaced with calls to url-hexify/unhexify. Thanks, -- David --=20 OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --pgp-sign-Multipart_Mon_Nov_29_21:02:58_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAkz0BvIACgkQma24O1pEeObyswEAruMLsSPX0h48fAmWZvSclSz4 aDM7Pm+vLGMvuDbAbkwA/0jUyWjjOals/ZJdt5gkB77ZjStP3prZvCS9tsTMJBt4 =SNy8 -----END PGP SIGNATURE----- --pgp-sign-Multipart_Mon_Nov_29_21:02:58_2010-1-- --===============0296991940== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0296991940==--