diff --git a/doc/org.texi b/doc/org.texi
index b86f67c0d..71f22ec87 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -6731,6 +6731,16 @@ description lists.
Paragraphs are separated by at least one empty line. If you need to enforce
a line break within a paragraph, use @samp{\\} at the end of a line.
+To keep the line breaks in a region, but otherwise use normal formatting, you
+can use this construct, which can also be used to format poetry.
+
+@example
+#+begin_verse
+Everything should be made as simple as possible,
+but not any simpler -- Albert Einstein
+#+end_verse
+@end example
+
When quoting a passage from another document, it is customary to format this
as a paragraph that is indented on both the left and the right margin. You
can include quotations in Org mode documents like this:
@@ -6742,6 +6752,7 @@ but not any simpler -- Albert Einstein
#+end_quote
@end example
+
@node Literal examples, Include files, Paragraphs, Markup rules
@subheading Literal examples
@cindex literal examples, markup rules
@@ -6881,9 +6892,10 @@ exported as a horizontal line (@samp{
} in HTML).
@cindex comment lines
@cindex exporting, not
-Lines starting with @samp{#} in column zero are treated as comments
-and will never be exported. Also entire subtrees starting with the
-word @samp{COMMENT} will never be exported.
+Lines starting with @samp{#} in column zero are treated as comments and will
+never be exported. Also entire subtrees starting with the word
+@samp{COMMENT} will never be exported. Finally, regions surrounded by
+@samp{#+BEGIN_COMMENT} ... @samp{END_COMMENT} will not be exported.
@table @kbd
@kindex C-c ;
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1f637c967..33801736b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,13 @@
+2008-05-13 Carsten Dominik
+
+ * org-exp.el (org-export-as-html, org-export-preprocess-string):
+ Implement VERSE environment.
+ (org-export-preprocess-string): Implement the COMMENT
+ environment.
+
+ * org-export-latex.el (org-export-latex-preprocess): Implement
+ VERSE environment.
+
2008-05-12 Carsten Dominik
* org-jsinfo.el (org-infojs-opts-table): Add entry for FIXED_TOC
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 52bbf9105..8122f0a69 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1366,6 +1366,18 @@ on this string to produce the exported version."
(replace-match (if (equal (downcase (match-string 1)) "end")
"ORG-BLOCKQUOTE-END" "ORG-BLOCKQUOTE-START")
t t))
+ ;; Verse
+ (goto-char (point-min))
+ (while (re-search-forward "^#\\+\\(begin\\|end\\)_verse\\>.*" nil t)
+ (replace-match (if (equal (downcase (match-string 1)) "end")
+ "ORG-VERSE-END" "ORG-VERSE-START")
+ t t))
+
+ ;; Remove comment environment
+ (goto-char (point-min))
+ (while (re-search-forward
+ "^#\\+BEGIN_COMMENT[ \t]*\n[^\000]*?^#\\+END_COMMENT\\>.*" nil t)
+ (replace-match "" t t))
;; Remove subtrees that are commented
(goto-char (point-min))
@@ -2619,13 +2631,19 @@ lang=\"%s\" xml:lang=\"%s\">
(insert "\n
\n")
(throw 'nextline nil))
- ;; Blockquotes
+ ;; Blockquotes and verse
(when (equal "ORG-BLOCKQUOTE-START" line)
(insert "\n\n")
(throw 'nextline nil))
(when (equal "ORG-BLOCKQUOTE-END" line)
(insert "
\n
\n")
(throw 'nextline nil))
+ (when (equal "ORG-VERSE-START" line)
+ (insert "\n\n")
+ (throw 'nextline nil))
+ (when (equal "ORG-VERSE-END" line)
+ (insert "
\n\n")
+ (throw 'nextline nil))
;; make targets to anchors
(while (string-match "<<\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[ \t]*\n?" line)
diff --git a/lisp/org-export-latex.el b/lisp/org-export-latex.el
index 67ab05df4..99f7c20ef 100644
--- a/lisp/org-export-latex.el
+++ b/lisp/org-export-latex.el
@@ -1102,6 +1102,14 @@ Regexps are those from `org-export-latex-special-string-regexps'."
(while (re-search-forward "^#\\+END_QUOTE" nil t)
(replace-match "\\end{quote}" t t))
+ ;; Convert verse
+ (goto-char (point-min))
+ (while (re-search-forward "^#\\+BEGIN_VERSE" nil t)
+ (replace-match "\\begin{verse}" t t))
+ (goto-char (point-min))
+ (while (re-search-forward "^#\\+END_VERSE" nil t)
+ (replace-match "\\end{verse}" t t))
+
;; Convert horizontal rules
(goto-char (point-min))
(while (re-search-forward "^----+.$" nil t)