all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [RFC] Replace some HTML related keywords with OPTIONS items
@ 2013-06-20 19:20 Nicolas Goaziou
  2013-06-20 19:36 ` Nicolas Goaziou
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Nicolas Goaziou @ 2013-06-20 19:20 UTC (permalink / raw)
  To: Org Mode List

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

Hello,

Any objection to applying the following patch to master?

Basically,

  #+HTML_INCLUDE_STYLE: nil

becomes

  #+OPTIONS: html-style:nil

and

  #+HTML_HTML5_FANCY: t

becomes

  #+OPTIONS: html5-fancy:t


Regards,

-- 
Nicolas Goaziou

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-html-Use-OPTIONS-items-instead-of-keywords-for-bo.patch --]
[-- Type: text/x-diff, Size: 4030 bytes --]

From dff24cc4ec2c3466526802042fd89dce0d99f633 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Thu, 20 Jun 2013 21:14:57 +0200
Subject: [PATCH] ox-html: Use OPTIONS items instead of keywords for booleans

* lisp/ox-html.el (html): Replace "HTML_HTML5_FANCY" and
  "HTML_INCLUDE_STYLE" with, respectively, ":html5-fancy" and
  "html-style" options.
(org-html-html5-fancy): Reformat docstring.
* doc/org.texi (HTML doctypes): Reflect keyword removal.
(CSS support): Reflect keyword removal.

The reasoning behind this change is that keywords can only store
strings as value.  Therefore, they are not suited for toggles ("nil"
vs nil) problem.
---
 doc/org.texi    | 8 ++++----
 lisp/ox-html.el | 9 ++++-----
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index bddc518..3f7c9fb 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -11055,7 +11055,7 @@ See the variable @code{org-html-doctype-alist} for details.  The default is
 
 HTML5 introduces several new element types.  By default, Org will not make
 use of these element types, but you can set @code{org-html-html5-fancy} to
-@code{t} (or use the corresponding @code{HTML_HTML5_FANCY} export option), to
+@code{t} (or set @code{html5-fancy} item in an @code{OPTIONS} line), to
 enable a few new block-level elements.  These are created using arbitrary
 #+BEGIN and #+END blocks. For instance:
 
@@ -11352,9 +11352,9 @@ Each exported file contains a compact default style that defines these
 classes in a basic way@footnote{This style is defined in the constant
 @code{org-html-style-default}, which you should not modify.  To turn
 inclusion of these defaults off, customize
-@code{org-html-head-include-default-style} or set @code{#+HTML_INCLUDE_STYLE}
-to @code{nil} on a per-file basis.}.  You may overwrite these settings, or add to
-them by using the variables @code{org-html-head} and
+@code{org-html-head-include-default-style} or set @code{html-style} to
+@code{nil} in an @code{OPTIONS} line.}.  You may overwrite these settings, or
+add to them by using the variables @code{org-html-head} and
 @code{org-html-head-extra}.  You can override the global values of these
 variables for each file by using these keywords:
 
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 90d6a5d..56f478e 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -116,7 +116,7 @@
     (:html-link-org-as-html nil nil org-html-link-org-files-as-html)
     (:html-doctype "HTML_DOCTYPE" nil org-html-doctype)
     (:html-container "HTML_CONTAINER" nil org-html-container-element)
-    (:html-html5-fancy "HTML_HTML5_FANCY" nil org-html-html5-fancy)
+    (:html-html5-fancy nil "html5-fancy" org-html-html5-fancy)
     (:html-link-home "HTML_LINK_HOME" nil org-html-link-home)
     (:html-link-up "HTML_LINK_UP" nil org-html-link-up)
     (:html-mathjax "HTML_MATHJAX" nil "" space)
@@ -124,7 +124,7 @@
     (:html-preamble nil "html-preamble" org-html-preamble)
     (:html-head "HTML_HEAD" nil org-html-head newline)
     (:html-head-extra "HTML_HEAD_EXTRA" nil org-html-head-extra newline)
-    (:html-head-include-default-style "HTML_INCLUDE_STYLE" nil org-html-head-include-default-style newline)
+    (:html-head-include-default-style nil "html-style" org-html-head-include-default-style newline)
     (:html-head-include-scripts "HTML_INCLUDE_SCRIPTS" nil org-html-head-include-scripts newline)
     (:html-table-attributes nil nil org-html-table-default-attributes)
     (:html-table-row-tags nil nil org-html-table-row-tags)
@@ -919,9 +919,8 @@ publishing, with :html-doctype."
   :type 'string)
 
 (defcustom org-html-html5-fancy nil
-  "When exporting to HTML5, set this to t to use new HTML5
-  elements. This variable is ignored for anything other than
-  HTML5.
+  "Non-nil means using new HTML5 elements.
+This variable is ignored for anything other than HTML5 export.
 
 For compatibility with Internet Explorer, it's probably a good
 idea to download some form of the html5shiv (for instance
-- 
1.8.3.1


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

end of thread, other threads:[~2013-06-28  7:14 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20 19:20 [RFC] Replace some HTML related keywords with OPTIONS items Nicolas Goaziou
2013-06-20 19:36 ` Nicolas Goaziou
2013-06-20 21:29 ` Samuel Wales
2013-06-21  4:51   ` Achim Gratz
2013-06-21  7:41 ` Sebastien Vauban
2013-06-21  9:17 ` Eric Abrahamsen
2013-06-21  9:26 ` Carsten Dominik
2013-06-21 17:28   ` Nicolas Goaziou
2013-06-21 17:32     ` Rick Frankel
2013-06-21 17:56     ` Achim Gratz
2013-06-21 18:55       ` Nicolas Goaziou
2013-06-21 19:36         ` Samuel Wales
2013-06-21 20:05         ` Thorsten Jolitz
2013-06-21 20:16         ` Eric Schulte
2013-06-21 20:41         ` Achim Gratz
2013-06-23 21:55           ` Carsten Dominik
2013-06-24 17:19             ` Achim Gratz
2013-06-27 14:26     ` Bastien
2013-06-27 14:33 ` Bastien
2013-06-27 16:00   ` Nicolas Goaziou
2013-06-27 16:19     ` Bastien
2013-06-27 19:18       ` Nicolas Goaziou
2013-06-28  7:14         ` Bastien

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.