From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Moynihan Subject: Re: Re: Release 6.17 Date: Mon, 05 Jan 2009 12:26:24 +0000 Message-ID: <4961FC70.5000103@calicojack.co.uk> References: <1AD01E3D-3A98-4811-A7A1-0491189CE5C0@uva.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJoXh-0002I9-3B for emacs-orgmode@gnu.org; Mon, 05 Jan 2009 07:26:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJoXg-0002Hk-5k for emacs-orgmode@gnu.org; Mon, 05 Jan 2009 07:26:48 -0500 Received: from [199.232.76.173] (port=39257 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJoXf-0002Hc-WB for emacs-orgmode@gnu.org; Mon, 05 Jan 2009 07:26:48 -0500 Received: from storm.bpweb.net ([83.223.106.8]:58725) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LJoXf-0007E7-6j for emacs-orgmode@gnu.org; Mon, 05 Jan 2009 07:26:47 -0500 In-Reply-To: <1AD01E3D-3A98-4811-A7A1-0491189CE5C0@uva.nl> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: emacs-orgmode@gnu.org, "Steven E. Harris" Carsten Dominik wrote: > On Jan 4, 2009, at 3:33 PM, Steven E. Harris wrote: > >> Carsten Dominik writes: >> >>> Code references use special labels embedded directly into the source >>> code. Such labels look like "((name))" and must be unique within a >>> document. >> How does the parser know that, say, "((def))" is not a valid >> expression >> in the surrounding Lisp forms? Is it important that it be separated by >> space, or be the last token on the line? >> >> Trying to concoct a motivating example, consider a structure >> represented >> as nested lists: >> >> ,---- >> | '(a >> | ((b c) d) >> | (((e) f)) ((def)) >> | g) >> `---- >> >> Without knowing what the enclosing `quote' form means, how do know >> that >> "((def))" is not part of it? > > Hi Steven, > > good question, and the answer is that is does not know, > cannot know, because this is a feature that is supposed > to work for any kind of example, an the parser cannot > know all possible syntaxes :-) > > This idea is to make this work in a heuristic way, by using something > that is unlikely enough to occur in real code. > > You are right that what I am using might be too > dangerous for emacs lisp or other lisp dialects, and > it could also show up in other languages like C. > > What would be safer? > > <> like the other Org-mode targets? That would make sense. > Does anyone know a language where this would be used > in real life? It would make it harder to write about > Org-mode, though. > > Or do we need another option, so that, if needed, we could switch do > a different syntax? Is a good work around not to simply supply the marker inside an inline comment, e.g. ,---- | '(a | ((b c) d) | (((e) f)) ;; ((def)) | g) `---- The advantage to this approach is that you can keep your code executable, which is really nice if you're writing documentation and want to be able to make sure the code always runs and is never broken. This solution seems to be more sensible than supporting different link markers etc... though the <> does seem more consistent. It might even be possible to link the ((def)) to the comment that describes it, so the links between code and comments are bidirectional. Just some food for thought! :-) R.