emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: emacs-orgmode@gnu.org
Subject: extensible syntax example using link features
Date: Tue, 10 Aug 2010 16:23:35 -0700	[thread overview]
Message-ID: <AANLkTikOmH0FaevZY0Mr-dp1AKOYNVUuPVUVF+b+z_tw@mail.gmail.com> (raw)

I wrote this a very long time ago but did not send it to the list.
(There is more where this came from.)



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

                 reply	other threads:[~2010-08-10 23:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

  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=AANLkTikOmH0FaevZY0Mr-dp1AKOYNVUuPVUVF+b+z_tw@mail.gmail.com \
    --to=samologist@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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