From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: extensible syntax example using link features Date: Tue, 10 Aug 2010 16:23:35 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from [140.186.70.92] (port=51450 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OiyAU-0003FH-9v for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 19:23:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OiyAS-000092-QP for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 19:23:38 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:61541) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OiyAS-00008x-MT for emacs-orgmode@gnu.org; Tue, 10 Aug 2010 19:23:36 -0400 Received: by wyg36 with SMTP id 36so13031268wyg.0 for ; Tue, 10 Aug 2010 16:23:36 -0700 (PDT) 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: emacs-orgmode@gnu.org I wrote this a very long time ago but did not send it to the list. (There is more where this came from.) Samuel === Here is an arbitrary example of extensible link syntax. This one allows two features we don't currently have: link coloring and a different label for when the link is exported. This is merely an example. $[link http://google.com :last-followed [2009-02-25 Wed 02:00] :label "click here for evil search engine" :export-label "click here for nice search engine"] "link" means that it is a link. This part of the syntax says what kind of thing you are dealing with. It could also be "id" for an ID marker, or "timestamp" for a fancy timestamp, or whatever you want to use the syntax for. But here we are only specifying a link. "click here for evil search engine" replaces all of the text just as in existing link syntax. Thus that is all you see in org-mode unless M-x visible-mode or start editing. This is just as with existing link syntax. The timestamp allows the coloring feature. The link can be red if the link was followed in the last 30 days, and blue otherwise. I am not proposing either the label feature or the coloring feature. They are just examples of what you can do. Note that you can also add features any time you want without breaking syntax. If you want to add :export-color or :followed-face and :not-followed-face and :followed-expiry-days, you CAN. In the case of a proposed annotation mechanism, we can have :start and :end for a region, or :search for something to search for, or :emacs-tag to use a tag. We are not hamstrung by whatever design we choose. Later, we can retire a feature and add another, if we want. We modify the mode line in the target to indicate that there is an annotation. Bidirectional, of course. === 1) http://thread.gmane.org/gmane.emacs.orgmode/11896 extensible syntax with an application in id markers (which themselves have an application in many things, including graph theoretic constructs such as planning tours) 2) http://thread.gmane.org/gmane.emacs.orgmode/10204/focus=10240 extensible syntax and parsing risk === -- Q: How many CDC "scientists" does it take to change a lightbulb? A: "You only think it's dark." [CDC has denied a deadly disease for 25 years] ========== Retrovirus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE === PNAS must publish the original Lo and Alter NIH/FDA XMRV paper verbatim along with the new paper.