emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: David Maus <dmaus@ictsoc.de>
Cc: Org Mode List <emacs-orgmode@gnu.org>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: [dev] Implement "ref" link types
Date: Tue, 21 Feb 2012 10:18:00 +0100	[thread overview]
Message-ID: <87pqd81r5j.fsf@gmail.com> (raw)
In-Reply-To: <87aa4csr86.wl%dmaus@ictsoc.de> (David Maus's message of "Tue, 21 Feb 2012 06:14:17 +0100")

Hello,

David Maus <dmaus@ictsoc.de> 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	other threads:[~2012-02-21  9:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-19 18:08 [dev] Implement "ref" link types Nicolas Goaziou
2012-02-19 19:28 ` Christian Moe
2012-02-19 19:41   ` Nicolas Goaziou
2012-02-19 20:11     ` Toby Cubitt
2012-02-19 20:20     ` Christian Moe
2012-02-19 19:41 ` Samuel Wales
2012-02-19 20:02   ` Nicolas Goaziou
2012-02-19 20:48     ` Samuel Wales
2012-02-19 20:10 ` Carsten Dominik
2012-02-20  0:51   ` Nicolas Goaziou
2012-02-20  7:09     ` Carsten Dominik
2012-02-20 10:59       ` Nicolas Goaziou
2012-02-20 22:06         ` Nicolas Goaziou
2012-02-21  1:26           ` Thomas S. Dye
2012-02-21  5:14           ` David Maus
2012-02-21  9:18             ` Nicolas Goaziou [this message]
2012-02-27 19:38               ` Nicolas Goaziou
2012-02-27 20:38               ` David Maus
2012-03-05  9:37         ` Jambunathan K

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=87pqd81r5j.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=dmaus@ictsoc.de \
    --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).