emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: [RFC] Replace some HTML related keywords with OPTIONS items
Date: Thu, 20 Jun 2013 21:36:04 +0200	[thread overview]
Message-ID: <87r4fwfucb.fsf@gmail.com> (raw)
In-Reply-To: <87vc58fv2x.fsf@gmail.com> (Nicolas Goaziou's message of "Thu, 20 Jun 2013 21:20:06 +0200")

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

Update.

I forgot to change

  #+HTML_INCLUDE_SCRIPTS: t

into

  #+OPTIONS: html-scripts:t

for the same reason.

-- 
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: 4212 bytes --]

From f99c5a071e185301bbef576c042afa07f4c76488 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",
  "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


  reply	other threads:[~2013-06-20 19:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 19:20 [RFC] Replace some HTML related keywords with OPTIONS items Nicolas Goaziou
2013-06-20 19:36 ` Nicolas Goaziou [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r4fwfucb.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).