Make inline image definition more configurable
commit7d3f7f60e0ac13b142c90a9917f9671dbd43e2a4
authorNicolas Goaziou <n.goaziou@gmail.com>
Wed, 15 Feb 2012 10:08:10 +0000 (15 11:08 +0100)
committerNicolas Goaziou <n.goaziou@gmail.com>
Thu, 16 Feb 2012 19:14:31 +0000 (16 20:14 +0100)
treedb9e30e2f5a360a81694b9a91bf411ee06e8c408
parentc7f3e4abf152d29e9f8dec352c17aca707f64c30
Make inline image definition more configurable

* contrib/lisp/org-element.el (org-element-object-restrictions): Allow
  plain links in link description.
* contrib/lisp/org-export.el (org-export-default-inline-image-rule):
  New variable.
(org-export-inline-image-p): Use rules instead of extensions. A rule
is a regexp applied to path for a given type of link.  It allows to
extend inline images to non-local files.
* EXPERIMENTAL/org-e-latex.el (org-e-latex-inline-image-rules): New
  variable.
(org-e-latex-inline-image-extensions): Removed variable

There are two motivations behind this change.  The first one is to
allow, for example, an HTML exporter to define a rule like the
following:

 ("http" . "\\.\\(png\\|jpg\\|jpeg\\|gif\\)\\(\\?\\(\\w+=\\w+&?\\)*\\)?")

The other one is to properly define thumbnails (clickable images),
like the following:

  [[http://orgmode.org][file:~/my-logo.png]]
EXPERIMENTAL/org-e-latex.el
contrib/lisp/org-element.el
contrib/lisp/org-export.el