[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,
- [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Sergei Nosov, 2015/08/19
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Bastien, 2015/08/19
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Nicolas Goaziou, 2015/08/19
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Sergei Nosov, 2015/08/19
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Bastien, 2015/08/19
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3,
Nicolas Goaziou <=
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Sergei Nosov, 2015/08/20
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Nicolas Goaziou, 2015/08/21
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Sergei Nosov, 2015/08/21
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Nicolas Goaziou, 2015/08/21
- Re: [O] Regression: org-translate-link doesn't work correctly in Org 8.3, Achim Gratz, 2015/08/21