From: "Jan Böcker" <jan.boecker@jboecker.de>
To: dmg@uvic.ca
Cc: emacs-orgmode@gnu.org
Subject: Re: org-protocol: non-ASCII characters
Date: Sat, 06 Feb 2010 14:50:26 +0100 [thread overview]
Message-ID: <4B6D73A2.8000403@jboecker.de> (raw)
In-Reply-To: <86d40k9702.fsf_-_@mn.cs.uvic.ca>
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
> I have been looking around and I am not sure how to solve this
> problem. Withing Evince and Xournal I am encoding any non alphanum (as
> defined by the C macro) each byte that is contained in the filename
> individually.
>
> Does anybody know which are the characters above 0 (zero) that need to
> be encoded for a safe org link?
AFAIK, your current approach is correct.
I think I figured it out for evince: the file name you get from evince
is already URI-encoded.
The attached patch fixes the problem for me, but I do not know if it is
the right thing to do. I assume that the forward slashes in the file
name still have to be encoded so that org-protocol is not confused; the
patch disables URI-encoding for percent signs, so that already
URI-encoded characters pass through unharmed.
- Jan
[-- Attachment #2: qnd-fix.patch --]
[-- Type: text/plain, Size: 378 bytes --]
diff --git a/libview/ev-view.c b/libview/ev-view.c
index c8145ff..c575831 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5752,7 +5752,7 @@ ev_view_previous_page (EvView *view)
static gint is_unchanged_uri_char(char c)
{
- return isalnum(c);
+ return ((c == '%') || isalnum(c));
}
static void encode_uri(gchar *encoded_uri, gint bufsize, const gchar *uri)
[-- Attachment #3: 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
next prev parent reply other threads:[~2010-02-06 13:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-31 8:39 org-remember support in xournal D M German
2010-01-31 8:45 ` dmg
2010-02-03 9:19 ` Jan Böcker
2010-02-03 9:22 ` dmg
2010-02-04 18:43 ` org-protocol: non-ASCII characters D M German
2010-02-06 13:50 ` Jan Böcker [this message]
2010-02-06 14:35 ` Jan Böcker
2010-02-08 11:30 ` Sebastian Rose
2010-02-12 22:23 ` dmg
2010-02-13 13:22 ` Jan Böcker
2010-02-15 9:41 ` Sebastian Rose
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=4B6D73A2.8000403@jboecker.de \
--to=jan.boecker@jboecker.de \
--cc=dmg@uvic.ca \
--cc=emacs-orgmode@gnu.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public 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).