diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-05-27 16:53:54 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2011-05-27 16:53:54 +0200 |
commit | 8f0ea16167efbd29b13f165a9d04665160ede6c4 (patch) | |
tree | cc35de97c5de76bf098654f7f9ab7e354dd85421 | |
parent | f194eb1719de2a530b09734ab5cafc9248ada92f (diff) | |
download | org-mode-8f0ea16167efbd29b13f165a9d04665160ede6c4.tar.gz |
Ignore lists within exporters specific blocks
* lisp/org-exp.el (org-export-mark-list-properties): even if context
is invalid, mark list item with `list-context' property.
* lisp/org-list.el (org-list-forbidden-blocks): add exporters specific
blocks to the list of forbidden blocks.
Thanks to Jai Bharat Patel for reporting this.
-rw-r--r-- | lisp/org-exp.el | 6 | ||||
-rw-r--r-- | lisp/org-list.el | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 5812c34..d6ed193 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1818,7 +1818,11 @@ These special properties will later be interpreted by the backend." (lambda (e) (goto-char (point-min)) (while (re-search-forward (org-item-beginning-re) nil t) - (when (eq (nth 2 (org-list-context)) e) (funcall mark-list e)))) + (let ((context (nth 2 (org-list-context)))) + (if (eq context e) + (funcall mark-list e) + (put-text-property (point-at-bol) (point-at-eol) + 'list-context context))))) (cons nil org-list-export-context)))))) (defun org-export-attach-captions-and-attributes (target-alist) diff --git a/lisp/org-list.el b/lisp/org-list.el index a088f58..e7079d0 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -345,7 +345,7 @@ list, obtained by prompting the user." (list (symbol :tag "Major mode") (string :tag "Format")))) -(defvar org-list-forbidden-blocks '("example" "verse" "src") +(defvar org-list-forbidden-blocks '("example" "verse" "src" "latex" "html" "docbook") "Names of blocks where lists are not allowed. Names must be in lower case.") |