emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [RFC] Make QUOTE an export keyword instead of an element type
@ 2014-01-26 13:57 Nicolas Goaziou
  2014-01-26 15:41 ` Thomas S. Dye
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Nicolas Goaziou @ 2014-01-26 13:57 UTC (permalink / raw)
  To: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

Hello,

Quote sections are special sections triggered when their headline
container has the "QUOTE" keyword in it:

  * QUOTE Headline

    This is a quote section.

They are inherited (as many other things) from the previous export
framework. The behaviour of this keyword in undocumented in Org manual,
but, judging by old sources, it means that contents of such an headline
should be exported verbatim (i.e. as an /example/ block, not a /quote/
block).

At the moment, they are parsed specially by Org Elements, but I think it
is a mistake. Like "COMMENT" keyword in headlines, "QUOTE" is more an
instruction for the export framework. Therefore, they should be parsed
as regular sections, and treated specially during export. The following
patches permit it, in 3 steps:

  1. Remove special parsing from "org-element.el",
  2. Turn section contents into a big example block.
  3. Remove quote section translators from export back-ends (contrib
     directory handled separately)

This change implies that any quote-section translator and filter is
ignored (but it will not generate an error if present). It also means
that an export back-end cannot tell the difference between an example
block and a quote section.

Since quote sections were treated as example blocks (except in
ox-ascii.el), the export behaviour will remain unchanged (except in
ox-ascii.el).

Alternatives:

 - Treat their contents as `quote-blocks' instead of `example-block'
 - Remove them altogether, since they don't bring anything new.

As a side note, if they are here to stay, it would be good to document
them.

WDYT?


Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-element-Do-not-parse-quote-sections-specially.patch --]
[-- Type: text/x-diff, Size: 7962 bytes --]

From 0b156539b8a0b050b6848be89926a10ce983bc83 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sun, 26 Jan 2014 14:09:45 +0100
Subject: [PATCH 1/4] org-element: Do not parse quote sections specially
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/org-element.el (org-element-quote-section-parser,
  org-element-quote-section-interpreter): Remove functions.
  (org-element--current-element, org-element--parse-elements): Do not
  handle quote sections at all.
* testing/lisp/test-org-element.el (test-org-element/quote-section-parser):
  Remove test.

Like COMMENT keyword, QUOTE is only an export instruction, which has
to be handled at the export framework level, not at the parser's.
---
 lisp/org-element.el              | 67 +++++++++-------------------------------
 testing/lisp/test-org-element.el | 14 ---------
 2 files changed, 15 insertions(+), 66 deletions(-)


--------------1.8.5.3
Content-Type: text/x-patch; name="0001-org-element-Do-not-parse-quote-sections-specially.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="0001-org-element-Do-not-parse-quote-sections-specially.patch"

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 0027f1f..92eff3a 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -31,13 +31,12 @@
 ;;
 ;; An element always starts and ends at the beginning of a line.  With
 ;; a few exceptions (`clock', `headline', `inlinetask', `item',
-;; `planning', `node-property', `quote-section' `section' and
-;; `table-row' types), it can also accept a fixed set of keywords as
-;; attributes.  Those are called "affiliated keywords" to distinguish
-;; them from other keywords, which are full-fledged elements.  Almost
-;; all affiliated keywords are referenced in
-;; `org-element-affiliated-keywords'; the others are export attributes
-;; and start with "ATTR_" prefix.
+;; `planning', `node-property', `section' and `table-row' types), it
+;; can also accept a fixed set of keywords as attributes.  Those are
+;; called "affiliated keywords" to distinguish them from other
+;; keywords, which are full-fledged elements.  Almost all affiliated
+;; keywords are referenced in `org-element-affiliated-keywords'; the
+;; others are export attributes and start with "ATTR_" prefix.
 ;;
 ;; Element containing other elements (and only elements) are called
 ;; greater elements.  Concerned types are: `center-block', `drawer',
@@ -48,10 +47,9 @@
 ;; Other element types are: `babel-call', `clock', `comment',
 ;; `comment-block', `diary-sexp', `example-block', `export-block',
 ;; `fixed-width', `horizontal-rule', `keyword', `latex-environment',
-;; `node-property', `paragraph', `planning', `quote-section',
-;; `src-block', `table', `table-row' and `verse-block'.  Among them,
-;; `paragraph' and `verse-block' types can contain Org objects and
-;; plain text.
+;; `node-property', `paragraph', `planning', `src-block', `table',
+;; `table-row' and `verse-block'.  Among them, `paragraph' and
+;; `verse-block' types can contain Org objects and plain text.
 ;;
 ;; Objects are related to document's contents.  Some of them are
 ;; recursive.  Associated types are of the following: `bold', `code',
@@ -178,7 +176,7 @@ is not sufficient to know if point is at a paragraph ending.  See
 	       dynamic-block example-block export-block fixed-width
 	       footnote-definition headline horizontal-rule inlinetask item
 	       keyword latex-environment node-property paragraph plain-list
-	       planning property-drawer quote-block quote-section section
+	       planning property-drawer quote-block section
 	       special-block src-block table table-row verse-block)
   "Complete list of element types.")
 
@@ -2295,37 +2293,6 @@ CONTENTS is nil."
    " "))
 
 
-;;;; Quote Section
-
-(defun org-element-quote-section-parser (limit)
-  "Parse a quote section.
-
-LIMIT bounds the search.
-
-Return a list whose CAR is `quote-section' and CDR is a plist
-containing `:begin', `:end', `:value' and `:post-blank' keywords.
-
-Assume point is at beginning of the section."
-  (save-excursion
-    (let* ((begin (point))
-	   (end (progn (org-with-limited-levels (outline-next-heading))
-		       (point)))
-	   (pos-before-blank (progn (skip-chars-backward " \r\t\n")
-				    (forward-line)
-				    (point)))
-	   (value (buffer-substring-no-properties begin pos-before-blank)))
-      (list 'quote-section
-	    (list :begin begin
-		  :end end
-		  :value value
-		  :post-blank (count-lines pos-before-blank end))))))
-
-(defun org-element-quote-section-interpreter (quote-section contents)
-  "Interpret QUOTE-SECTION element as Org syntax.
-CONTENTS is nil."
-  (org-element-property :value quote-section))
-
-
 ;;;; Src Block
 
 (defun org-element-src-block-parser (limit affiliated)
@@ -3812,7 +3779,7 @@ CONTENTS is nil."
 ;; are activated for fixed element chaining (i.e. `plain-list' >
 ;; `item') or fixed conditional element chaining (i.e. `headline' >
 ;; `section').  Special modes are: `first-section', `item',
-;; `node-property', `quote-section', `section' and `table-row'.
+;; `node-property', `section' and `table-row'.
 
 (defun org-element--current-element
   (limit &optional granularity special structure)
@@ -3833,8 +3800,8 @@ nil), secondary values will not be parsed, since they only
 contain objects.
 
 Optional argument SPECIAL, when non-nil, can be either
-`first-section', `item', `node-property', `quote-section',
-`section', and `table-row'.
+`first-section', `item', `node-property', `section', and
+`table-row'.
 
 If STRUCTURE isn't provided but SPECIAL is set to `item', it will
 be computed.
@@ -3860,7 +3827,6 @@ element it has to parse."
         (org-element-headline-parser limit raw-secondary-p))
        ;; Sections (must be checked after headline).
        ((eq special 'section) (org-element-section-parser limit))
-       ((eq special 'quote-section) (org-element-quote-section-parser limit))
        ((eq special 'first-section)
 	(org-element-section-parser
 	 (or (save-excursion (org-with-limited-levels (outline-next-heading)))
@@ -4296,8 +4262,7 @@ looking into captions:
   "Parse elements between BEG and END positions.
 
 SPECIAL prioritize some elements over the others.  It can be set
-to `first-section', `quote-section', `section' `item' or
-`table-row'.
+to `first-section', `section' `item' or `table-row'.
 
 When value is `item', STRUCTURE will be used as the current list
 structure.
@@ -4347,9 +4312,7 @@ Elements are accumulated into ACC."
 	   cbeg (org-element-property :contents-end element)
 	   ;; Possibly switch to a special mode.
 	   (case type
-	     (headline
-	      (if (org-element-property :quotedp element) 'quote-section
-		'section))
+	     (headline 'section)
 	     (plain-list 'item)
 	     (property-drawer 'node-property)
 	     (table 'table-row))
diff --git a/testing/lisp/test-org-element.el b/testing/lisp/test-org-element.el
index 7bf0c43..39bb1e5 100644
--- a/testing/lisp/test-org-element.el
+++ b/testing/lisp/test-org-element.el
@@ -1712,20 +1712,6 @@ Outside list"
      (= (org-element-property :end (org-element-at-point)) (point-max)))))
 
 
-;;;; Quote Section
-
-(ert-deftest test-org-element/quote-section-parser ()
-  "Test `quote-section' parser."
-  (should
-   (let ((org-quote-string "QUOTE"))
-     (org-test-with-temp-text "* QUOTE Headline\nBody"
-       (org-element-map (org-element-parse-buffer) 'quote-section 'identity))))
-  (should-not
-   (let ((org-quote-string "TEST"))
-     (org-test-with-temp-text "* QUOTE Headline\nBody"
-       (org-element-map (org-element-parse-buffer) 'quote-section 'identity)))))
-
-
 ;;;; Radio Target
 
 (ert-deftest test-org-element/radio-target-parser ()

--------------1.8.5.3--



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-ox-Handle-quote-sections-internally.patch --]
[-- Type: text/x-diff, Size: 5018 bytes --]

From 1e53a35cadcdd209fc779da0c26563938bc8a1ad Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sun, 26 Jan 2014 14:19:22 +0100
Subject: [PATCH 2/4] ox: Handle quote sections internally
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.el (org-export--remove-uninterpreted-data-1): Handle quote
  sections.
  (org-export-filter-quote-section-functions): Remove variable.
* testing/lisp/test-ox.el (test-org-export/uninterpreted): Add test.
---
 lisp/ox.el              | 30 +++++++++++++++++++-----------
 testing/lisp/test-ox.el | 11 +++++++++++
 2 files changed, 30 insertions(+), 11 deletions(-)


--------------1.8.5.3
Content-Type: text/x-patch; name="0002-ox-Handle-quote-sections-internally.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="0002-ox-Handle-quote-sections-internally.patch"

diff --git a/lisp/ox.el b/lisp/ox.el
index 28aed70..ad2780b 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -221,7 +221,6 @@ way they are handled must be hard-coded into
     (:filter-planning . org-export-filter-planning-functions)
     (:filter-property-drawer . org-export-filter-property-drawer-functions)
     (:filter-quote-block . org-export-filter-quote-block-functions)
-    (:filter-quote-section . org-export-filter-quote-section-functions)
     (:filter-radio-target . org-export-filter-radio-target-functions)
     (:filter-section . org-export-filter-section-functions)
     (:filter-special-block . org-export-filter-special-block-functions)
@@ -2314,8 +2313,8 @@ DATA is a parse tree or a secondary string.  INFO is a plist
 containing export options.  It is modified by side effect and
 returned by the function."
   (org-element-map data
-      '(entity bold italic latex-environment latex-fragment strike-through
-	       subscript superscript underline)
+      '(entity bold italic latex-environment latex-fragment section
+	       strike-through subscript superscript underline)
     #'(lambda (blob)
 	(let ((new
 	       (case (org-element-type blob)
@@ -2348,6 +2347,11 @@ returned by the function."
 		 ((latex-environment latex-fragment)
 		  (and (eq (plist-get info :with-latex) 'verbatim)
 		       (list (org-export-expand blob nil))))
+		 ;; ... quote sections...
+		 (section
+		  (and (org-element-property :quotedp
+					     (org-export-get-parent blob))
+		       'section))
 		 ;; ... sub/superscripts...
 		 ((subscript superscript)
 		  (let ((sub/super-p (plist-get info :with-sub-superscript))
@@ -2367,10 +2371,20 @@ returned by the function."
 				      (make-string
 				       (org-element-property :post-blank blob)
 				       ?\s)))))))))))
-	  (when new
+	  (cond
+	   ((eq new 'section)
+	    ;; Treat quote sections specially: replace their contents
+	    ;; with a single example block.
+	    (let ((example (list 'example-block nil)))
+	      (org-element-put-property example :parent blob)
+	      (org-element-put-property
+	       example :value
+	       (org-element-interpret-data (org-element-contents blob)))
+	      (org-element-set-contents blob example)))
+	   (new
 	    ;; Splice NEW at BLOB location in parse tree.
 	    (dolist (e new) (org-element-insert-before e blob))
-	    (org-element-extract-element blob))))
+	    (org-element-extract-element blob)))))
     info)
   ;; Return modified parse tree.
   data)
@@ -2654,12 +2668,6 @@ data, as a string, the back-end, as a symbol, and the
 communication channel, as a plist.  It must return a string or
 nil.")
 
-(defvar org-export-filter-quote-section-functions nil
-  "List of functions applied to a transcoded quote-section.
-Each filter is called with three arguments: the transcoded data,
-as a string, the back-end, as a symbol, and the communication
-channel, as a plist.  It must return a string or nil.")
-
 (defvar org-export-filter-section-functions nil
   "List of functions applied to a transcoded section.
 Each filter is called with three arguments: the transcoded data,
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index 78347af..168dc24 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -642,6 +642,17 @@ Paragraph <2012-03-29 Thu>[2012-03-29 Thu]"
 			     (paragraph . (lambda (p c i) c))
 			     (section . (lambda (s c i) c))))
 	     nil nil nil '(:with-latex verbatim)))))
+  ;; Quote sections.
+  (should
+   (equal "Success!\n"
+	  (org-test-with-temp-text "* QUOTE Headline\na *b* c"
+	    (org-export-as
+	     (org-export-create-backend
+	      :transcoders '((bold . (lambda (b c i) "Failure."))
+			     (headline . (lambda (h c i) c))
+			     (paragraph . (lambda (p c i) c))
+			     (section . (lambda (s c i) c))
+			     (example-block . (lambda (e c i) "Success!"))))))))
   ;; Sub/superscript.
   (should
    (equal "adummy\n"

--------------1.8.5.3--



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-Export-back-ends-Remove-quote-section-translators.patch --]
[-- Type: text/x-diff, Size: 9534 bytes --]

From 4d50d999b6bda3d904d41cc03b941bf0ba87cc17 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
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 "<blockquote>\n%s</blockquote>" 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 "<pre>\n%s</pre>" 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--



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-ox-groff-Remove-quote-section-translator.patch --]
[-- Type: text/x-diff, Size: 1944 bytes --]

From 2c7179c43596d02130f49de9ca367be6568967ec Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Sun, 26 Jan 2014 14:29:25 +0100
Subject: [PATCH 4/4] ox-groff: Remove quote section translator
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


* contrib/lisp/ox-groff.el (org-groff-quote-section): Remove function.
---
 contrib/lisp/ox-groff.el | 10 ----------
 1 file changed, 10 deletions(-)


--------------1.8.5.3
Content-Type: text/x-patch; name="0004-ox-groff-Remove-quote-section-translator.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline; filename="0004-ox-groff-Remove-quote-section-translator.patch"

diff --git a/contrib/lisp/ox-groff.el b/contrib/lisp/ox-groff.el
index 249e254..f74bb14 100644
--- a/contrib/lisp/ox-groff.el
+++ b/contrib/lisp/ox-groff.el
@@ -77,7 +77,6 @@
     (planning . org-groff-planning)
     (property-drawer . org-groff-property-drawer)
     (quote-block . org-groff-quote-block)
-    (quote-section . org-groff-quote-section)
     (radio-target . org-groff-radio-target)
     (section . org-groff-section)
     (special-block . org-groff-special-block)
@@ -1457,15 +1456,6 @@ holding contextual information."
    quote-block
    (format ".DS I\n.I\n%s\n.R\n.DE" contents)))
 
-;;; Quote Section
-
-(defun org-groff-quote-section (quote-section contents info)
-  "Transcode a QUOTE-SECTION element from Org to Groff.
-CONTENTS is nil.  INFO is a plist holding contextual information."
-  (let ((value (org-remove-indentation
-                (org-element-property :value quote-section))))
-    (when value (format ".DS L\n\\fI%s\\fP\n.DE\n" value))))
-
 ;;; Radio Target
 
 (defun org-groff-radio-target (radio-target text info)

--------------1.8.5.3--



^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2014-02-07  9:10 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-26 13:57 [RFC] Make QUOTE an export keyword instead of an element type Nicolas Goaziou
2014-01-26 15:41 ` Thomas S. Dye
2014-01-26 16:58 ` Rasmus
2014-01-26 21:07   ` Nick Dokos
2014-01-26 21:42     ` Samuel Wales
2014-01-26 22:03 ` Bastien
2014-01-26 23:42   ` Nick Dokos
2014-01-27  1:29     ` Rasmus
2014-01-27 10:06     ` Sebastien Vauban
2014-01-27 10:20       ` Thorsten Jolitz
2014-01-27  5:46   ` Carsten Dominik
2014-01-27 11:12     ` Nicolas Goaziou
2014-01-27 11:21       ` Bastien
2014-01-27 20:45         ` Nicolas Goaziou
2014-01-28  8:52           ` Bastien
2014-01-31 15:44           ` Bastien
2014-02-01 13:24             ` Nicolas Goaziou
2014-02-01 22:43               ` Bastien
2014-02-02 21:40                 ` Nicolas Goaziou
2014-02-02 22:20                   ` Bastien
2014-02-03 11:20                     ` Nicolas Goaziou
2014-02-03 14:59                       ` Bastien
2014-02-03 15:08                         ` Nicolas Goaziou
2014-02-03 15:36                           ` Bastien
2014-02-03 15:45                             ` Nicolas Goaziou
2014-02-03 22:41                               ` Nicolas Goaziou
2014-02-05 10:12                                 ` Bastien
2014-02-06 17:56                                   ` Nicolas Goaziou
2014-02-06 22:00                                     ` Bastien
2014-02-07  8:51                                       ` Nicolas Goaziou
2014-02-07  9:10                                         ` Bastien

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).