From 4d50d999b6bda3d904d41cc03b941bf0ba87cc17 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 26 Jan 2014 14:23:32 +0100 Subject: [PATCH 3/4] Export back-ends: Remove quote section translators To: n.goaziou@gmail.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1.8.5.3" This is a multi-part message in MIME format. --------------1.8.5.3 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit * lisp/ox-ascii.el (org-ascii--current-text-width): Remove `quote-section' reference. (org-ascii-quote-section): Remove function. * lisp/ox-html.el (org-html-quote-section): Remove function. * lisp/ox-man.el (org-man-quote-section): Remove function. * lisp/ox-md.el (org-md-quote-section): Remove function. * lisp/ox-odt.el (org-odt-quote-section): Remove function. * lisp/ox-org.el (org-org-quote-section): Remove function. * lisp/ox-texinfo.el (org-texinfo-quote-section): Remove function. --- lisp/ox-ascii.el | 26 +++----------------------- lisp/ox-html.el | 10 ---------- lisp/ox-latex.el | 11 ----------- lisp/ox-man.el | 10 ---------- lisp/ox-md.el | 1 - lisp/ox-odt.el | 11 ----------- lisp/ox-org.el | 1 - lisp/ox-texinfo.el | 10 ---------- 8 files changed, 3 insertions(+), 77 deletions(-) --------------1.8.5.3 Content-Type: text/x-patch; name="0003-Export-back-ends-Remove-quote-section-translators.patch" Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="0003-Export-back-ends-Remove-quote-section-translators.patch" diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 5247156..2c62bb8 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -78,7 +78,6 @@ (planning . org-ascii-planning) (property-drawer . org-ascii-property-drawer) (quote-block . org-ascii-quote-block) - (quote-section . org-ascii-quote-section) (radio-target . org-ascii-radio-target) (section . org-ascii-section) (special-block . org-ascii-special-block) @@ -504,11 +503,11 @@ INFO is a plist used as a communication channel." (if low-level-rank (* low-level-rank 2) org-ascii-inner-margin)))))))) (- total-width - ;; Each `quote-block', `quote-section' and `verse-block' above - ;; narrows text width by twice the standard margin size. + ;; Each `quote-block' and `verse-block' above narrows text + ;; width by twice the standard margin size. (+ (* (loop for parent in genealogy when (memq (org-element-type parent) - '(quote-block quote-section verse-block)) + '(quote-block verse-block)) count parent) 2 org-ascii-quote-margin) ;; Text width within a plain-list is restricted by @@ -1511,25 +1510,6 @@ holding contextual information." (org-ascii--indent-string contents org-ascii-quote-margin)) -;;;; Quote Section - -(defun org-ascii-quote-section (quote-section contents info) - "Transcode a QUOTE-SECTION element from Org to ASCII. -CONTENTS is nil. INFO is a plist holding contextual information." - (let ((width (org-ascii--current-text-width quote-section info)) - (value - (org-export-data - (org-remove-indentation (org-element-property :value quote-section)) - info))) - (org-ascii--indent-string - value - (+ org-ascii-quote-margin - ;; Don't apply inner margin if parent headline is low level. - (let ((headline (org-export-get-parent-headline quote-section))) - (if (org-export-low-level-p headline info) 0 - org-ascii-inner-margin)))))) - - ;;;; Radio Target (defun org-ascii-radio-target (radio-target contents info) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 2aad8cb..5ceea71 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -79,7 +79,6 @@ (planning . org-html-planning) (property-drawer . org-html-property-drawer) (quote-block . org-html-quote-block) - (quote-section . org-html-quote-section) (radio-target . org-html-radio-target) (section . org-html-section) (special-block . org-html-special-block) @@ -3050,15 +3049,6 @@ CONTENTS holds the contents of the block. INFO is a plist holding contextual information." (format "
\n%s
" contents)) -;;;; Quote Section - -(defun org-html-quote-section (quote-section contents info) - "Transcode a QUOTE-SECTION element from Org to HTML. -CONTENTS is nil. INFO is a plist holding contextual information." - (let ((value (org-remove-indentation - (org-element-property :value quote-section)))) - (when value (format "
\n%s
" value)))) - ;;;; Section (defun org-html-section (section contents info) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index cad80c9..5815874 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -72,7 +72,6 @@ (planning . org-latex-planning) (property-drawer . org-latex-property-drawer) (quote-block . org-latex-quote-block) - (quote-section . org-latex-quote-section) (radio-target . org-latex-radio-target) (section . org-latex-section) (special-block . org-latex-special-block) @@ -2097,16 +2096,6 @@ holding contextual information." (format "\\begin{quote}\n%s\\end{quote}" contents))) -;;;; Quote Section - -(defun org-latex-quote-section (quote-section contents info) - "Transcode a QUOTE-SECTION element from Org to LaTeX. -CONTENTS is nil. INFO is a plist holding contextual information." - (let ((value (org-remove-indentation - (org-element-property :value quote-section)))) - (when value (format "\\begin{verbatim}\n%s\\end{verbatim}" value)))) - - ;;;; Radio Target (defun org-latex-radio-target (radio-target text info) diff --git a/lisp/ox-man.el b/lisp/ox-man.el index e4e37e5..a3f6490 100644 --- a/lisp/ox-man.el +++ b/lisp/ox-man.el @@ -83,7 +83,6 @@ (planning . org-man-planning) (property-drawer . org-man-property-drawer) (quote-block . org-man-quote-block) - (quote-section . org-man-quote-section) (radio-target . org-man-radio-target) (section . org-man-section) (special-block . org-man-special-block) @@ -750,15 +749,6 @@ holding contextual information." quote-block (format ".RS\n%s\n.RE" contents))) -;;; Quote Section - -(defun org-man-quote-section (quote-section contents info) - "Transcode a QUOTE-SECTION element from Org to Man. -CONTENTS is nil. INFO is a plist holding contextual information." - (let ((value (org-remove-indentation - (org-element-property :value quote-section)))) - (when value (format ".RS\\fI%s\\fP\n.RE\n" value)))) - ;;; Radio Target diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 53f883d..e725ef9 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -90,7 +90,6 @@ This variable can be set to either `atx' or `setext'." (plain-text . org-md-plain-text) (property-drawer . org-md-property-drawer) (quote-block . org-md-quote-block) - (quote-section . org-md-example-block) (section . org-md-section) (src-block . org-md-example-block) (template . org-md-template) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index f920fc8..9b28168 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -66,7 +66,6 @@ (planning . org-odt-planning) (property-drawer . org-odt-property-drawer) (quote-block . org-odt-quote-block) - (quote-section . org-odt-quote-section) (radio-target . org-odt-radio-target) (section . org-odt-section) (special-block . org-odt-special-block) @@ -2998,16 +2997,6 @@ holding contextual information." contents) -;;;; Quote Section - -(defun org-odt-quote-section (quote-section contents info) - "Transcode a QUOTE-SECTION element from Org to ODT. -CONTENTS is nil. INFO is a plist holding contextual information." - (let ((value (org-remove-indentation - (org-element-property :value quote-section)))) - (when value (org-odt-do-format-code value)))) - - ;;;; Section (defun org-odt-format-section (text style &optional name) diff --git a/lisp/ox-org.el b/lisp/ox-org.el index c976eb3..cd5bf20 100644 --- a/lisp/ox-org.el +++ b/lisp/ox-org.el @@ -86,7 +86,6 @@ setting of `org-html-htmlize-output-type' is 'css." (planning . org-org-identity) (property-drawer . org-org-identity) (quote-block . org-org-identity) - (quote-section . org-org-identity) (radio-target . org-org-identity) (section . org-org-identity) (special-block . org-org-identity) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index ca7e891..2075bea 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -96,7 +96,6 @@ (planning . org-texinfo-planning) (property-drawer . org-texinfo-property-drawer) (quote-block . org-texinfo-quote-block) - (quote-section . org-texinfo-quote-section) (radio-target . org-texinfo-radio-target) (section . org-texinfo-section) (special-block . org-texinfo-special-block) @@ -1437,15 +1436,6 @@ holding contextual information." (format " %s" title))))) (format "%s\n%s@end quotation" start-quote contents))) -;;; Quote Section - -(defun org-texinfo-quote-section (quote-section contents info) - "Transcode a QUOTE-SECTION element from Org to Texinfo. -CONTENTS is nil. INFO is a plist holding contextual information." - (let ((value (org-remove-indentation - (org-element-property :value quote-section)))) - (when value (format "@verbatim\n%s@end verbatim" value)))) - ;;; Radio Target (defun org-texinfo-radio-target (radio-target text info) --------------1.8.5.3--