emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] unhex org-link for shell command


From: address@hidden
Subject: [O] unhex org-link for shell command
Date: Wed, 17 Jan 2018 17:55:22 +0800

I'm developing an Emacs package https://github.com/stardiviner/org-send-ebook .
I found Org-mode hex spaces in filename with "%20", So I reverse this with function `(url-unhex-string (org-element-property :path (org-element-context)))`. But this only works for English filename. If it is Chinese filename. this will caused error.

Is there Org-mode built-in function which return the file path with out hexing spaces '%20' ?
Or Does Emacs has functions can unhex '%20' correctly on Chinese?

Here is the test case:
org link:
[[file:Data/Books/%E6%80%8E%E6%A0%B7%E8%AF%BB%E4%B9%A6.mobi][怎样读书 (mobi)]]
And there is the result of `(org-element-property :path (org-element-context))`:
"Data/Books/%E6%80%8E%E6%A0%B7%E8%AF%BB%E4%B9%A6.mobi"

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]