From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [RFC] Replace some HTML related keywords with OPTIONS items Date: Thu, 20 Jun 2013 21:36:04 +0200 Message-ID: <87r4fwfucb.fsf@gmail.com> References: <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]:40145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpkeE-00054m-Bz for emacs-orgmode@gnu.org; Thu, 20 Jun 2013 15:36:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UpkeC-0000e1-5u for emacs-orgmode@gnu.org; Thu, 20 Jun 2013 15:35:58 -0400 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:46256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpkeB-0000dq-So for emacs-orgmode@gnu.org; Thu, 20 Jun 2013 15:35:56 -0400 Received: by mail-we0-f175.google.com with SMTP id t59so5740046wes.20 for ; Thu, 20 Jun 2013 12:35:55 -0700 (PDT) Received: from selenimh ([91.224.148.150]) by mx.google.com with ESMTPSA id x13sm2648331wib.3.2013.06.20.12.35.53 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Jun 2013 12:35:54 -0700 (PDT) In-Reply-To: <87vc58fv2x.fsf@gmail.com> (Nicolas Goaziou's message of "Thu, 20 Jun 2013 21:20:06 +0200") 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 Update. I forgot to change #+HTML_INCLUDE_SCRIPTS: t into #+OPTIONS: html-scripts:t for the same reason. -- Nicolas Goaziou --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-ox-html-Use-OPTIONS-items-instead-of-keywords-for-bo.patch >From f99c5a071e185301bbef576c042afa07f4c76488 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", "HTML_INCLUDE_STYLE" and "HTML_INCLUDE_SCRIPTS" with, respectively, ":html5-fancy", "html-style" and "html-scripts" 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 | 11 +++++------ 2 files changed, 9 insertions(+), 10 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..a996b40 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,8 +124,8 @@ (: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-scripts "HTML_INCLUDE_SCRIPTS" nil org-html-head-include-scripts newline) + (:html-head-include-default-style nil "html-style" org-html-head-include-default-style) + (:html-head-include-scripts nil "html-scripts" org-html-head-include-scripts) (:html-table-attributes nil nil org-html-table-default-attributes) (:html-table-row-tags nil nil org-html-table-row-tags) (:html-xml-declaration nil nil org-html-xml-declaration) @@ -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 --=-=-=--