emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <dmaus@ictsoc.de>
To: "Vincent Belaïche" <vincent.b.1@hotmail.fr>
Cc: David Maus <dmaus@ictsoc.de>, emacs-orgmode@gnu.org
Subject: Re: %20 in file://... URL
Date: Mon, 29 Nov 2010 21:03:00 +0100	[thread overview]
Message-ID: <87ipzf6gp7.wl%dmaus@ictsoc.de> (raw)
In-Reply-To: <BLU104-W15A3F7F6097ED8F6D95CEB84210@phx.gbl>


[-- Attachment #1.1: Type: text/plain, Size: 2596 bytes --]

At Fri, 26 Nov 2010 23:11:13 +0100,
Vincent Belaïche wrote:
> 
> [1  <text/plain; iso-8859-1 (quoted-printable)>]
> 
> 
> [...]
> 
> 
> > 1. The percent escaping/unescaping functions are not unicode aware;
> 
> My understanding/feeling is that a link in a file foo.org should be
> interpreted with the coding scheme of this file. 

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;
> 
> 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 escaped.

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.

> 
> 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
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

  parent reply	other threads:[~2010-11-29 20:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23  5:25 Vincent Belaïche
2010-11-24 20:57 ` David Maus
2011-02-12 14:36   ` Bastien
     [not found] ` <BLU104-W15A3F7F6097ED8F6D95CEB84210@phx.gbl>
2010-11-29 20:03   ` David Maus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-12-30  5:29 Vincent Belaïche
2010-11-22 15:46 Vincent Belaïche
2010-11-22 18:16 ` David Maus
2011-02-12 15:02   ` Bastien
2010-11-22 15:46 Vincent Belaïche
2010-11-13  6:18 Vincent Belaïche
2010-11-13  6:28 ` Vincent Belaïche
2010-11-14 17:30 ` David Maus
2010-11-17 20:43 ` David Maus
2010-11-17 20:43 ` David Maus
2010-11-05  6:42 Vincent Belaïche
2010-11-05  8:39 ` Giovanni Ridolfi
2010-10-27 21:19 Vincent Belaïche
2010-10-26  5:15 Vincent Belaïche
2010-10-26 15:39 ` Giovanni Ridolfi
2010-10-24 20:49 Vincent Belaïche
2010-10-24 21:02 ` David Maus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ipzf6gp7.wl%dmaus@ictsoc.de \
    --to=dmaus@ictsoc.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=vincent.b.1@hotmail.fr \
    --subject='Re: %20 in file://... URL' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).