From: Simon Thum <simon.thum@gmx.de>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Small org-contacts patch
Date: Sun, 22 Sep 2013 17:01:57 +0200 [thread overview]
Message-ID: <523F0665.9020803@gmx.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 561 bytes --]
Hi all,
the attached patch solves the problem of having hexified strings in hte
vCard export. It happens when you are entering tel: links and phone
numbers that start with `+`. The plus sign causes the link insert helper
to hexify the url.
In tel: links the plus makes sense for international numbers. The C-c
C-l helper makes that
[[tel:%-encoded glibberish][tel:+49 xxx]]
with the %-encoded part ending up in vCards. Which my phone accepts but
does not dial properly. So far I cleaned them manually but this seems a
better solution.
Cheers,
Simon
[-- Attachment #2: 0001-un-hexify-TEL-links-in-vCard-export.patch --]
[-- Type: text/x-patch, Size: 1111 bytes --]
From 8a1fdc7f87425fc6f7d6909fc9dc10cc0ca1745d Mon Sep 17 00:00:00 2001
From: Simon Thum <simon.thum@gmx.de>
Date: Sun, 22 Sep 2013 13:43:06 +0200
Subject: [PATCH] un-hexify TEL links in vCard export
This is required as a plus sign (e.g. +49 for germany) will cause
hexification in the link helper.
contrib/lisp/org-contacts.el: unhexify tel link
TINYCHANGE
---
contrib/lisp/org-contacts.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 97171d0..dbbc057 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -946,7 +946,7 @@ to do our best."
(setq phones-list (org-contacts-remove-ignored-property-values ignore-list (org-contacts-split-property tel)))
(setq result "")
(while phones-list
- (setq result (concat result "TEL:" (org-contacts-strip-link (car phones-list)) "\n"))
+ (setq result (concat result "TEL:" (org-link-unescape (org-contacts-strip-link (car phones-list))) "\n"))
(setq phones-list (cdr phones-list)))
result))
(when bday
--
1.8.1.5
next reply other threads:[~2013-09-22 15:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-22 15:01 Simon Thum [this message]
2013-09-25 12:33 ` Small org-contacts patch Bastien
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=523F0665.9020803@gmx.de \
--to=simon.thum@gmx.de \
--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).