emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [dev] Implement "ref" link types


From: Nicolas Goaziou
Subject: Re: [O] [dev] Implement "ref" link types
Date: Tue, 21 Feb 2012 10:18:00 +0100

Hello,

David Maus <address@hidden> writes:

> I don't see why we should drop the link type in fuzzy links. After all
> they /are/ are special type of link.

There is no link type in fuzzy links : [[something]] matches
<<something>> in master.

> Without the link type we will run into trouble, won't we?.
>
> In the example file:
>
> ,----
> | We end the list at item [[itm:last]].
> `----
>
> So, itm:last is a fuzzy link but it could as well be a "regular" link
> of type "itm" with a path component of "last" and no description.

I realize my examples are confusing. I shouldn't have used colons. In
fact, the output will be the same if the target is <<itm-last>>,
<<table-last>> or even <<foo>>.

In other words, the "itm:" part wasn't meant as a link type, but as
a cosmetic part of the name. So the list example could as well be:

#+begin_src org
  1. A first item in a list.
  2. Another item
     1. With three subparts. This one.
     2. Another one.
     3. <<last>> And the last subpart.
        
  We end the list at item [[last]].
#+end_src

> If we say that we use itm:last as a fuzzy link iff there is no
> registered link type "itm" we might put people into trouble if in some
> point in the future Org mode introduces a link of type "itm" and the
> fuzzy links stop working.

Certainly. I should have used another name for my examples.

The point is that a fuzzy link [[foo]] will detect the context of its
matching target (<<foo>>) or element (#+name: foo) and return an
appropriate sequence number.

The main difference with the current behaviour is that the target part
is ignored. At the moment, in LaTeX, <<path>> becomes
\label{path}path. It will be only \label{path} with the patch. This
allows for more flexibility (note that other types of targets, like
radio targets are unchanged).

> Or is there any technical reason to use [[itm:last]] instead of
> [[ref:itm:last]]?

I won't answer this question, since it came out from a mistake of
mine. Though, I'd answer another one: "Why do I prefer [[something]]
over [[ref:something]]?".

Thank you for asking this... Well, that's because Org also recognizes
plain links, i.e. http//orgmode.org. And, for an internal link, I'd
rather enforce the use of square brackets, as it is done actually.

Also, we don't require extra syntax, unless we don't want to change
behaviour of targets.


Regards,

-- 
Nicolas Goaziou



reply via email to

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