Merge branch 'maint'

This commit is contained in:
Nicolas Goaziou 2014-05-17 10:16:33 +02:00
commit 716bc48744
1 changed files with 14 additions and 8 deletions

View File

@ -193,8 +193,10 @@ original Org buffer at the same place."
(defcustom org-ascii-indented-line-width 'auto (defcustom org-ascii-indented-line-width 'auto
"Additional indentation width for the first line in a paragraph. "Additional indentation width for the first line in a paragraph.
If the value is an integer, indent the first line of each If the value is an integer, indent the first line of each
paragraph by this number. If it is the symbol `auto' preserve paragraph by this width, unless it is located at the beginning of
indentation from original document." a section, in which case indentation is removed from that line.
If it is the symbol `auto' preserve indentation from original
document."
:group 'org-export-ascii :group 'org-export-ascii
:version "24.4" :version "24.4"
:package-version '(Org . "8.0") :package-version '(Org . "8.0")
@ -1431,12 +1433,16 @@ information."
"Transcode a PARAGRAPH element from Org to ASCII. "Transcode a PARAGRAPH element from Org to ASCII.
CONTENTS is the contents of the paragraph, as a string. INFO is CONTENTS is the contents of the paragraph, as a string. INFO is
the plist used as a communication channel." the plist used as a communication channel."
(let ((contents (if (not (wholenump org-ascii-indented-line-width)) contents (org-ascii--fill-string
(concat (if (not (wholenump org-ascii-indented-line-width)) contents
(make-string org-ascii-indented-line-width ? ) (concat
(replace-regexp-in-string "\\`[ \t]+" "" contents))))) ;; Do not indent first paragraph in a section.
(org-ascii--fill-string (unless (and (not (org-export-get-previous-element paragraph info))
contents (org-ascii--current-text-width paragraph info) info))) (eq (org-element-type (org-export-get-parent paragraph))
'section))
(make-string org-ascii-indented-line-width ?\s))
(replace-regexp-in-string "\\`[ \t]+" "" contents)))
(org-ascii--current-text-width paragraph info) info))
;;;; Plain List ;;;; Plain List