emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3


From: Nicolas Goaziou
Subject: Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3
Date: Wed, 19 Aug 2015 15:28:18 +0200

Bastien <address@hidden> writes:

> Nicolas Goaziou <address@hidden> writes:
>
>> I think `org-translate-link' should be updated to provide correct type,
>> including internal ones, to `org-link-translation-function'. E.g.,
>>
>>   http://orgmode.org => "http"
>>   #something         => "custom-id"
>>   (ref:line)         => "coderef"
>>   whatever           => "fuzzy"
>>
>> At least, this would be consistent with the parser.
>
> Agreed.

Done. There is one foreseeable incompatible change however. When link
type is unknown to Org, it is reported as fuzzy, e.g.:

  [[foobar:something]]

is seen as ("fuzzy" "foobar:something") by
`org-link-translation-function', not ("foobar" "something"), unless
"foobar" belong to `org-link-types'.

In practice I don't think it matters because
`org-link-translation-function' isn't meant to create new link types but
handle conflicting link types. In any case, in the example above, one
can always use

  (when (and (string= type "fuzzy")
             (string-match "\\(.*?\\):\\(.*\\)" path))
   (cons (match-string 1) (match-string 2)))

in `org-link-translation-function'.

Regards,



reply via email to

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