From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: [RFC] Replace some HTML related keywords with OPTIONS items Date: Thu, 20 Jun 2013 21:20:06 +0200 Message-ID: <87vc58fv2x.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpkOk-0004kX-9w for emacs-orgmode@gnu.org; Thu, 20 Jun 2013 15:20:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpkOj-0003zm-5r for emacs-orgmode@gnu.org; Thu, 20 Jun 2013 15:19:58 -0400 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:37188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpkOi-0003za-Sp for emacs-orgmode@gnu.org; Thu, 20 Jun 2013 15:19:57 -0400 Received: by mail-wg0-f42.google.com with SMTP id z11so618283wgg.1 for ; Thu, 20 Jun 2013 12:19:56 -0700 (PDT) Received: from selenimh ([91.224.148.150]) by mx.google.com with ESMTPSA id fu14sm2596836wic.0.2013.06.20.12.19.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Jun 2013 12:19:55 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode List --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-ox-html-Use-OPTIONS-items-instead-of-keywords-for-bo.patch >From dff24cc4ec2c3466526802042fd89dce0d99f633 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou 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 --=-=-=--