From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: extensible syntax Date: Tue, 6 Jan 2009 11:08:15 +0100 Message-ID: <31B18B71-ECD7-43DF-B2BF-A92E79D1E908@uva.nl> References: <20524da70901041233g105f372fv175a47dc9884fa43@mail.gmail.com> <20524da70901050819k7a5a89c6g745e9e1459293438@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LK8rH-0004aN-TT for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 05:08:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LK8rE-0004Zz-To for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 05:08:23 -0500 Received: from [199.232.76.173] (port=52281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LK8rE-0004Zw-N3 for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 05:08:20 -0500 Received: from ug-out-1314.google.com ([66.249.92.175]:29379) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LK8rE-0006it-5N for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 05:08:20 -0500 Received: by ug-out-1314.google.com with SMTP id 36so2140674uga.17 for ; Tue, 06 Jan 2009 02:08:17 -0800 (PST) In-Reply-To: <20524da70901050819k7a5a89c6g745e9e1459293438@mail.gmail.com> 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: Samuel Wales Cc: emacs-orgmode@gnu.org On Jan 5, 2009, at 5:19 PM, Samuel Wales wrote: > Hello again :), > > Let me provide examples -- using footnotes. > > All footnote references and definitions would be inside > $[...]. (As mentioned in my previous post.) > > There was a concern about keeping code executable. You can > use a parameter to specify whether you want the footnote to: > > - disappear in the code (thus keeping the code executable > without having to use comments, so that the reference is > at the correct position in the line, yet keeping the > link pointing to the correct position) > - or show up as a numbered or labeled reference > > The reference can look like: > > (defun my-example-defun $[fn "defun name" :invisible t] () > (interactive "P") ;$[fn "interactive"] > ... > > The second reference is visible, but the first is not. Note > that this allows references with spaces (or anything else). > No need to worry about syntax conflicts within org. > > There was also a concern about conflicting with code syntax. > Your decision as a user is whether you want $[...] to be > interpreted as code or footnote. You could want either one. > > To make it be interpreted as code, you simply prefix the $ > with a \. That takes away org's special handling of the > syntax. org's footnote code merely checks for a \ in front > of the $ and then it knows not to do anything except remove > the \. > > In fact, the footnote code doesn't even have to do that. > The org extensible syntax code (the code for $[...]) is what > does it. The footnote code simply calls the extensible > syntax code. > > To make it be a footnote, you don't do anything. > > This will work for all code examples you can dream up. > There is no need to worry about which languages have $[...] > in them. > > The advantage is that for future features, the same > solutions will work. And since the syntax is extensible, it > will work for completely new features. > > Finally, the escaping scheme should be familiar to users, as > it is a common method in programming languages. > > Is this idea possibly of interest? Hi Samuel, this is interesting and I will keep it in mind for the next syntax change we will need. Thanks. - Carsten > > > -- > For personal gain, myalgic encephalomyelitis denialists are knowingly > causing further suffering and death by grossly corrupting science. Do > you care about the world? > http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode