emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rick Moynihan <rick@calicojack.co.uk>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: emacs-orgmode@gnu.org, "Steven E. Harris" <seh@panix.com>
Subject: Re: Re: Release 6.17
Date: Mon, 05 Jan 2009 12:26:24 +0000	[thread overview]
Message-ID: <4961FC70.5000103@calicojack.co.uk> (raw)
In-Reply-To: <1AD01E3D-3A98-4811-A7A1-0491189CE5C0@uva.nl>

Carsten Dominik wrote:
> On Jan 4, 2009, at 3:33 PM, Steven E. Harris wrote:
> 
>> Carsten Dominik <carsten.dominik@gmail.com> 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?
> 
>   <<name>>    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 <<def>> 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.

  parent reply	other threads:[~2009-01-05 12:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04  8:13 Release 6.17 Carsten Dominik
2009-01-04  8:22 ` Carsten Dominik
2009-01-04 14:33 ` Steven E. Harris
2009-01-04 16:01   ` Carsten Dominik
2009-01-04 20:24     ` Steven E. Harris
2009-01-05 12:32       ` Carsten Dominik
2009-01-05 13:38       ` Steven E. Harris
2009-01-04 20:58     ` Eddward DeVilla
2009-01-05 11:45     ` David Lord
2009-01-05 12:26     ` Rick Moynihan [this message]
     [not found] <20090104170210.5BBE434805@mail2.panix.com>
2009-01-05  2:45 ` Tom Breton (Tehom)
2009-01-05  3:04   ` Samuel Wales

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=4961FC70.5000103@calicojack.co.uk \
    --to=rick@calicojack.co.uk \
    --cc=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=seh@panix.com \
    /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).