emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* extensible syntax example using link features
@ 2010-08-10 23:23 Samuel Wales
  0 siblings, 0 replies; only message in thread
From: Samuel Wales @ 2010-08-10 23:23 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-10 23:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-10 23:23 extensible syntax example using link features Samuel Wales

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).