emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Icalendar export and contacts
@ 2016-02-11 21:28 Simon Thum
  2016-02-11 23:01 ` Nicolas Goaziou
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Thum @ 2016-02-11 21:28 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I'm using the icalendar exporter and the vcard export in org-contacts. I 
use the [[tel:xxx]] links as they help keep things clean.

Unfortunately I now get

user-error: Unable to resolve link "tel:xxx"

and the icalendar export full stops. Is there a way to declare the link 
type (I am loading org-contact) or avoid the exporter messing with it? I 
did not find such a possibility in the manual.

In my use case, synchronization,, I don't care too much about the links 
being "resolved", I care about my export not failing badly.

Thanks in advance,

Simon

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-11 21:28 Icalendar export and contacts Simon Thum
@ 2016-02-11 23:01 ` Nicolas Goaziou
  2016-02-12  7:42   ` Simon Thum
  2016-02-12  8:29   ` Simon Thum
  0 siblings, 2 replies; 13+ messages in thread
From: Nicolas Goaziou @ 2016-02-11 23:01 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Hello,

Simon Thum <simon.thum@gmx.de> writes:

> Unfortunately I now get
>
> user-error: Unable to resolve link "tel:xxx"
>
> and the icalendar export full stops. Is there a way to declare the
> link type (I am loading org-contact)

See `org-add-link-type' in particular with the export argument.

> or avoid the exporter messing with it?

This is only possible in development version.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-11 23:01 ` Nicolas Goaziou
@ 2016-02-12  7:42   ` Simon Thum
  2016-02-12 22:41     ` Nicolas Goaziou
  2016-02-12  8:29   ` Simon Thum
  1 sibling, 1 reply; 13+ messages in thread
From: Simon Thum @ 2016-02-12  7:42 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

do you refer to master, maint or something else? I'm on 8.3 but am 
considering an upgrade.

Also I think org-contacts should declare the link type if it has support 
for it (in the vcard export). I'd be happy to do that if it can be done 
as a TINYCHANGE.

Cheers,

Simon

On 02/12/2016 12:01 AM, Nicolas Goaziou wrote:
> Hello,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> Unfortunately I now get
>>
>> user-error: Unable to resolve link "tel:xxx"
>>
>> and the icalendar export full stops. Is there a way to declare the
>> link type (I am loading org-contact)
>
> See `org-add-link-type' in particular with the export argument.
>
>> or avoid the exporter messing with it?
>
> This is only possible in development version.
>
> Regards,
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-11 23:01 ` Nicolas Goaziou
  2016-02-12  7:42   ` Simon Thum
@ 2016-02-12  8:29   ` Simon Thum
  2016-02-12 22:43     ` Nicolas Goaziou
  1 sibling, 1 reply; 13+ messages in thread
From: Simon Thum @ 2016-02-12  8:29 UTC (permalink / raw)
  To: emacs-orgmode, Nicolas Goaziou

I noticed one more strange thing:

the new exporter fails to resolve links to radio targets (which are 
slightly pointless but worked before). I'm not sure it needs fixing, 
just thought I'd let you know.

I.e. <<<fails>>>   <<works>>

[[works]]
[[fails]]

Cheers,

Simon

On 02/12/2016 12:01 AM, Nicolas Goaziou wrote:
> Hello,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> Unfortunately I now get
>>
>> user-error: Unable to resolve link "tel:xxx"
>>
>> and the icalendar export full stops. Is there a way to declare the
>> link type (I am loading org-contact)
>
> See `org-add-link-type' in particular with the export argument.
>
>> or avoid the exporter messing with it?
>
> This is only possible in development version.
>
> Regards,
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-12  7:42   ` Simon Thum
@ 2016-02-12 22:41     ` Nicolas Goaziou
  2016-02-13 20:59       ` Simon Thum
  0 siblings, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2016-02-12 22:41 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Hello,

Simon Thum <simon.thum@gmx.de> writes:

> do you refer to master, maint or something else? I'm on 8.3 but am
> considering an upgrade.

Development version = master.

> Also I think org-contacts should declare the link type if it has
> support for it (in the vcard export). I'd be happy to do that if it
> can be done as a TINYCHANGE.

org-contacts is in contrib/ directory. TINYCHANGE tag is not required.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-12  8:29   ` Simon Thum
@ 2016-02-12 22:43     ` Nicolas Goaziou
  2016-02-13 11:09       ` Simon Thum
  0 siblings, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2016-02-12 22:43 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Hello,

Simon Thum <simon.thum@gmx.de> writes:

> I noticed one more strange thing:
>
> the new exporter fails to resolve links to radio targets (which are
> slightly pointless but worked before). I'm not sure it needs fixing,
> just thought I'd let you know.
>
> I.e. <<<fails>>>   <<works>>
>
> [[works]]
> [[fails]]

It doesn't need to be fixed. Radio targets bring their own linking
mechanism.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-12 22:43     ` Nicolas Goaziou
@ 2016-02-13 11:09       ` Simon Thum
  2016-02-14 16:49         ` Nicolas Goaziou
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Thum @ 2016-02-13 11:09 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 02/12/2016 11:43 PM, Nicolas Goaziou wrote:
> Hello,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> I noticed one more strange thing:
>>
>> the new exporter fails to resolve links to radio targets (which are
>> slightly pointless but worked before). I'm not sure it needs fixing,
>> just thought I'd let you know.
>>
>> I.e. <<<fails>>>   <<works>>
>>
>> [[works]]
>> [[fails]]
>
> It doesn't need to be fixed. Radio targets bring their own linking
> mechanism.

Yes, but the exporter stalls on the [[fails]] link although it resolves 
in org. Provided you're right the reasoning seems off.

Cheers,

Simon

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-12 22:41     ` Nicolas Goaziou
@ 2016-02-13 20:59       ` Simon Thum
  2016-02-20 12:55         ` Nicolas Goaziou
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Thum @ 2016-02-13 20:59 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

[-- Attachment #1: Type: text/plain, Size: 553 bytes --]

Hi,

would the attached patch be enough?

Cheers,

Simon

On 02/12/2016 11:41 PM, Nicolas Goaziou wrote:
> Hello,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> do you refer to master, maint or something else? I'm on 8.3 but am
>> considering an upgrade.
>
> Development version = master.
>
>> Also I think org-contacts should declare the link type if it has
>> support for it (in the vcard export). I'd be happy to do that if it
>> can be done as a TINYCHANGE.
>
> org-contacts is in contrib/ directory. TINYCHANGE tag is not required.
>
> Regards,
>

[-- Attachment #2: 0001-Register-tel-link-from-org-contacts.patch --]
[-- Type: text/x-patch, Size: 1081 bytes --]

From fe28fb1eec7b8435f2ce9d30853fc3df707149c4 Mon Sep 17 00:00:00 2001
From: Simon Thum <simon.thum@gmx.de>
Date: Sat, 13 Feb 2016 17:20:05 +0100
Subject: [PATCH] Register tel link from org-contacts

This has the added benefit of not screwing up the exporter.

Signed-off-by: Simon Thum <simon.thum@gmx.de>
---
 contrib/lisp/org-contacts.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/lisp/org-contacts.el b/contrib/lisp/org-contacts.el
index 3236a7c..1aa2cab 100644
--- a/contrib/lisp/org-contacts.el
+++ b/contrib/lisp/org-contacts.el
@@ -1113,6 +1113,11 @@ link string and return the pure link target."
             (setq colonpos (string-match ":" link))
             (if startpos (substring link (1+ colonpos)) link)))))
 
+;; Add the link type supported by org-contacts-strip-link
+;; so everything is in order for its use in Org files
+(org-add-link-type "tel")
+
+
 (defun org-contacts-split-property (string &optional separators omit-nulls)
   "Custom version of `split-string'.
 Split a property STRING into sub-strings bounded by matches
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-13 11:09       ` Simon Thum
@ 2016-02-14 16:49         ` Nicolas Goaziou
  2016-02-14 21:06           ` Simon Thum
  0 siblings, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2016-02-14 16:49 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Hello,

Simon Thum <simon.thum@gmx.de> writes:

> Yes, but the exporter stalls on the [[fails]] link although it
> resolves in org. Provided you're right the reasoning seems off.

I cannot reproduce it.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-14 16:49         ` Nicolas Goaziou
@ 2016-02-14 21:06           ` Simon Thum
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Thum @ 2016-02-14 21:06 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Then let's just hope it got fixed by accident ;)

On 02/14/2016 05:49 PM, Nicolas Goaziou wrote:
> Hello,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> Yes, but the exporter stalls on the [[fails]] link although it
>> resolves in org. Provided you're right the reasoning seems off.
>
> I cannot reproduce it.
>
> Regards,
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-13 20:59       ` Simon Thum
@ 2016-02-20 12:55         ` Nicolas Goaziou
  2016-02-21 16:17           ` Simon Thum
  0 siblings, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2016-02-20 12:55 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Hello,

Simon Thum <simon.thum@gmx.de> writes:

> would the attached patch be enough?

Thank you. I do not maintain org-contact.el, tho.

> +;; Add the link type supported by org-contacts-strip-link
> +;; so everything is in order for its use in Org files
> +(org-add-link-type "tel")

This means that no export function is defined for "tel" links. Is it the
intended behaviour?

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-20 12:55         ` Nicolas Goaziou
@ 2016-02-21 16:17           ` Simon Thum
  2016-02-25  9:15             ` Nicolas Goaziou
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Thum @ 2016-02-21 16:17 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: Nicolas Goaziou

Well, I had intended the link target to become visible but now that you 
ask, my primary concern was "not wrecking the export". I expect that tel 
links are only relevant to the vcard export, which handles them on its 
own terms (and which still works).

So perhaps the patch is a bit premature. Any export function would need 
not to interfere with the vcard handling, which is why I refrained from 
adding one.

Cheers,

Simon

On 02/20/2016 01:55 PM, Nicolas Goaziou wrote:
> Hello,
>
> Simon Thum <simon.thum@gmx.de> writes:
>
>> would the attached patch be enough?
>
> Thank you. I do not maintain org-contact.el, tho.
>
>> +;; Add the link type supported by org-contacts-strip-link
>> +;; so everything is in order for its use in Org files
>> +(org-add-link-type "tel")
>
> This means that no export function is defined for "tel" links. Is it the
> intended behaviour?
>
> Regards,
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Icalendar export and contacts
  2016-02-21 16:17           ` Simon Thum
@ 2016-02-25  9:15             ` Nicolas Goaziou
  0 siblings, 0 replies; 13+ messages in thread
From: Nicolas Goaziou @ 2016-02-25  9:15 UTC (permalink / raw)
  To: Simon Thum; +Cc: emacs-orgmode

Hello,

Simon Thum <simon.thum@gmx.de> writes:

> Well, I had intended the link target to become visible but now that
> you ask, my primary concern was "not wrecking the export". I expect
> that tel links are only relevant to the vcard export, which handles
> them on its own terms (and which still works).
>
> So perhaps the patch is a bit premature. Any export function would
> need not to interfere with the vcard handling, which is why
> I refrained from adding one.

Since no one chimed in, I applied your patch. We'll see if something is
left to be done (e.g., defining a better export function).

Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-02-25  9:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 21:28 Icalendar export and contacts Simon Thum
2016-02-11 23:01 ` Nicolas Goaziou
2016-02-12  7:42   ` Simon Thum
2016-02-12 22:41     ` Nicolas Goaziou
2016-02-13 20:59       ` Simon Thum
2016-02-20 12:55         ` Nicolas Goaziou
2016-02-21 16:17           ` Simon Thum
2016-02-25  9:15             ` Nicolas Goaziou
2016-02-12  8:29   ` Simon Thum
2016-02-12 22:43     ` Nicolas Goaziou
2016-02-13 11:09       ` Simon Thum
2016-02-14 16:49         ` Nicolas Goaziou
2016-02-14 21:06           ` Simon Thum

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).