emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sergei Nosov <sergei.nosov@gmail.com>
To: Bastien <bzg@gnu.org>, Sergei Nosov <sergei.nosov@gmail.com>,
	emacs-orgmode@gnu.org
Subject: Re: Regression: org-translate-link doesn't work correctly in Org 8.3
Date: Wed, 19 Aug 2015 16:55:04 +0300	[thread overview]
Message-ID: <CADi+Rs86dcy=RSng_8+8wQiQA1tykj3Y88_=qKvF_V4BQ0UbQQ@mail.gmail.com> (raw)
In-Reply-To: <87r3mz8l1p.fsf@nicolasgoaziou.fr>

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

Great! Thanks!

2 questions, though.

1. Previously, the type of the link was "thisfile", now it's "custom-id"
and also, the leading hash is removed from the link. Let's consider
the [[#about][About]]
example once again. Previously, I was given ("thisfile" . "#about") and I
changed this to ("thisfile" . "About"), which then worked like a charm.
Now, I'm given ("custom-id" . "about"), which I don't know how I should
translate. Neither of ("custom-id" . "About") or ("id" . "About") work.
What should it be?

BTW, there's a line (require 'ord-id) in org-open-at-point function in
master. Probably, it's a typo (should be (require 'org-id))

2. When those fixes will be available in MELPA?


--
Best regards,
       Sergei Nosov

On Wed, Aug 19, 2015 at 4:28 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Bastien <bzg@gnu.org> writes:
>
> > Nicolas Goaziou <mail@nicolasgoaziou.fr> 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,
>

[-- Attachment #2: Type: text/html, Size: 4134 bytes --]

  reply	other threads:[~2015-08-19 13:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19  9:58 Regression: org-translate-link doesn't work correctly in Org 8.3 Sergei Nosov
2015-08-19 10:25 ` Bastien
2015-08-19 10:39   ` Nicolas Goaziou
2015-08-19 10:53     ` Sergei Nosov
2015-08-19 10:55     ` Bastien
2015-08-19 13:28       ` Nicolas Goaziou
2015-08-19 13:55         ` Sergei Nosov [this message]
2015-08-21 12:11           ` Nicolas Goaziou
2015-08-21 12:48             ` Sergei Nosov
2015-08-21 13:04               ` Nicolas Goaziou
2015-08-21 18:44                 ` Achim Gratz

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='CADi+Rs86dcy=RSng_8+8wQiQA1tykj3Y88_=qKvF_V4BQ0UbQQ@mail.gmail.com' \
    --to=sergei.nosov@gmail.com \
    --cc=bzg@gnu.org \
    --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).