[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] extensible syntax example using link features
From: |
Samuel Wales |
Subject: |
[Orgmode] extensible syntax example using link features |
Date: |
Tue, 10 Aug 2010 16:23:35 -0700 |
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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Orgmode] extensible syntax example using link features,
Samuel Wales <=