From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [dev] Implement "ref" link types Date: Tue, 21 Feb 2012 10:18:00 +0100 Message-ID: <87pqd81r5j.fsf@gmail.com> References: <87vcn2vgq7.fsf@gmail.com> <8739a62upy.fsf@gmail.com> <763A8736-3DB8-492D-95CB-2E2D90982BAE@gmail.com> <87y5rx22km.fsf@gmail.com> <87ty2l17o7.fsf@gmail.com> <87aa4csr86.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzls4-0002w1-Rw for emacs-orgmode@gnu.org; Tue, 21 Feb 2012 04:19:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rzlry-0006r4-Ty for emacs-orgmode@gnu.org; Tue, 21 Feb 2012 04:18:52 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:63215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rzlry-0006qz-My for emacs-orgmode@gnu.org; Tue, 21 Feb 2012 04:18:46 -0500 Received: by wibhj13 with SMTP id hj13so4498024wib.0 for ; Tue, 21 Feb 2012 01:18:45 -0800 (PST) In-Reply-To: <87aa4csr86.wl%dmaus@ictsoc.de> (David Maus's message of "Tue, 21 Feb 2012 06:14:17 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: Org Mode List , Carsten Dominik Hello, David Maus 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 <> 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 <>, <> or even <>. 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. <> 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 (<>) 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, <> 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