summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2014-07-26 16:15:15 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2014-07-27 14:29:17 +0200
commit173ade7078804b2b7df23d85cc9c164a3b2da18a (patch)
tree6641c5a4e40d2b31722161d477e82d54871a7f06
parentb77a026a24edc0fdb15d2064eeba2d674c7eccd3 (diff)
downloadorg-mode-173ade7078804b2b7df23d85cc9c164a3b2da18a.tar.gz
org-element: Add `:raw-value' property to special blocks
* lisp/org-element.el (org-element-special-block-parser): Add `:raw-value' property.
-rw-r--r--lisp/org-element.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 31f042c..93ae6f0 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -1518,8 +1518,9 @@ keyword and CDR is a plist of affiliated keywords along with
their value.
Return a list whose CAR is `special-block' and CDR is a plist
-containing `:type', `:begin', `:end', `:contents-begin',
-`:contents-end', `:post-blank' and `:post-affiliated' keywords.
+containing `:type', `:raw-value', `:begin', `:end',
+`:contents-begin', `:contents-end', `:post-blank' and
+`:post-affiliated' keywords.
Assume point is at the beginning of the block."
(let* ((case-fold-search t)
@@ -1548,6 +1549,10 @@ Assume point is at the beginning of the block."
(list 'special-block
(nconc
(list :type type
+ :raw-value
+ (and contents-begin
+ (buffer-substring-no-properties
+ contents-begin contents-end))
:begin begin
:end end
:contents-begin contents-begin