Merge branch 'master' of orgmode.org:org-mode

This commit is contained in:
Bastien Guerry 2012-05-26 00:15:23 +02:00
commit c49a0f9e40
1 changed files with 13 additions and 22 deletions

View File

@ -1056,6 +1056,7 @@ ATTR is a string of other attributes of the a element."
(setq hfy-user-sheet-assoc nil) (setq hfy-user-sheet-assoc nil)
;; init conten.xml ;; init conten.xml
(require 'nxml-mode)
(with-current-buffer (with-current-buffer
(let ((nxml-auto-insert-xml-declaration-flag nil)) (let ((nxml-auto-insert-xml-declaration-flag nil))
(find-file-noselect content-file t)) (find-file-noselect content-file t))
@ -2975,10 +2976,8 @@ contextual information."
(defun org-e-odt-example-block (example-block contents info) (defun org-e-odt-example-block (example-block contents info)
"Transcode a EXAMPLE-BLOCK element from Org to ODT. "Transcode a EXAMPLE-BLOCK element from Org to ODT.
CONTENTS is nil. INFO is a plist holding contextual information." CONTENTS is nil. INFO is a plist holding contextual information."
(let* ((options (or (org-element-property :options example-block) ""))
(value (org-export-handle-code example-block info nil nil t)))
(org-e-odt--wrap-label (org-e-odt--wrap-label
example-block (org-e-odt-format-source-code-or-example value nil)))) example-block (org-e-odt-format-code example-block info)))
;;;; Export Snippet ;;;; Export Snippet
@ -3005,9 +3004,8 @@ CONTENTS is nil. INFO is a plist holding contextual information."
"Transcode a FIXED-WIDTH element from Org to ODT. "Transcode a FIXED-WIDTH element from Org to ODT.
CONTENTS is nil. INFO is a plist holding contextual information." CONTENTS is nil. INFO is a plist holding contextual information."
(org-e-odt--wrap-label (org-e-odt--wrap-label
fixed-width fixed-width (org-e-odt-do-format-code
(org-e-odt-format-source-code-or-example (org-element-property :value fixed-width))))
(org-element-property :value fixed-width) nil)))
;;;; Footnote Definition ;;;; Footnote Definition
@ -3754,7 +3752,7 @@ holding contextual information."
CONTENTS is nil. INFO is a plist holding contextual information." CONTENTS is nil. INFO is a plist holding contextual information."
(let ((value (org-remove-indentation (let ((value (org-remove-indentation
(org-element-property :value quote-section)))) (org-element-property :value quote-section))))
(when value (org-e-odt-format-source-code-or-example value nil)))) (when value (org-e-odt-do-format-code value))))
;;;; Section ;;;; Section
@ -4109,22 +4107,15 @@ channel."
"Transcode a VERSE-BLOCK element from Org to ODT. "Transcode a VERSE-BLOCK element from Org to ODT.
CONTENTS is verse block contents. INFO is a plist holding CONTENTS is verse block contents. INFO is a plist holding
contextual information." contextual information."
;; Replace each newline character with line break. Also replace ;; Add line breaks to each line of verse.
;; each blank line with a line break.
(setq contents (replace-regexp-in-string (setq contents (replace-regexp-in-string
"^ *\\\\\\\\$" "<br/>\n" "\\(<text:line-break/>\\)?[ \t]*\n"
(replace-regexp-in-string "<text:line-break/>" contents))
"\\(\\\\\\\\\\)?[ \t]*\n" " <br/>\n" contents))) ;; Replace tabs and spaces.
(setq contents (org-e-odt-fill-tabs-and-spaces contents))
;; Replace each white space at beginning of a line with a ;; Surround it in a verse environment.
;; non-breaking space.
(while (string-match "^[ \t]+" contents)
(let ((new-str (org-e-odt-format-spaces
(length (match-string 0 contents)))))
(setq contents (replace-match new-str nil t contents))))
(org-e-odt--wrap-label (org-e-odt--wrap-label
verse-block (format "<p class=\"verse\">\n%s</p>" contents))) verse-block (org-e-odt-format-stylized-paragraph 'verse contents)))