* [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
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
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
` (4 subsequent siblings)
5 siblings, 0 replies; 23+ messages in thread
From: Nicolas Goaziou @ 2013-06-20 19:36 UTC (permalink / raw)
To: Org Mode List
[-- 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
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
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
` (3 subsequent siblings)
5 siblings, 1 reply; 23+ messages in thread
From: Samuel Wales @ 2013-06-20 21:29 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode List
It seems reasonable to me.
I also think it is good that you are using hyphen-separated
human-readable identifiers like html-style instead of single-character
identifiers.
I wonder if it would be worth the backward incompatibility to make a:b
syntax become :a b syntax to be consistent with Babel and backends,
but presume we've already decided not to do so.
</ bikeshed>
Samuel
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-20 21:29 ` Samuel Wales
@ 2013-06-21 4:51 ` Achim Gratz
0 siblings, 0 replies; 23+ messages in thread
From: Achim Gratz @ 2013-06-21 4:51 UTC (permalink / raw)
To: emacs-orgmode
Samuel Wales writes:
> I wonder if it would be worth the backward incompatibility to make a:b
> syntax become :a b syntax to be consistent with Babel and backends,
> but presume we've already decided not to do so.
Yes, I do think that this sort of consistency would be welcome.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
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 7:41 ` Sebastien Vauban
2013-06-21 9:17 ` Eric Abrahamsen
` (2 subsequent siblings)
5 siblings, 0 replies; 23+ messages in thread
From: Sebastien Vauban @ 2013-06-21 7:41 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello Nicolas,
Nicolas Goaziou wrote:
> Any objection to applying the following patch to master?
Not at all.
> Basically,
>
> #+HTML_INCLUDE_STYLE: nil
>
> becomes
>
> #+OPTIONS: html-style:nil
>
> and
>
> #+HTML_HTML5_FANCY: t
>
> becomes
>
> #+OPTIONS: html5-fancy:t
Though, I'd also even prefer the form
#+OPTIONS: :html-style nil
which would clone the way we pass options in the publishing project.
Whatever you decide, you proposed solution is better than the current one.
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-20 19:20 [RFC] Replace some HTML related keywords with OPTIONS items Nicolas Goaziou
` (2 preceding siblings ...)
2013-06-21 7:41 ` Sebastien Vauban
@ 2013-06-21 9:17 ` Eric Abrahamsen
2013-06-21 9:26 ` Carsten Dominik
2013-06-27 14:33 ` Bastien
5 siblings, 0 replies; 23+ messages in thread
From: Eric Abrahamsen @ 2013-06-21 9:17 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> 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,
Looks good! +1 for merging :foo nil syntax from babel...
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-20 19:20 [RFC] Replace some HTML related keywords with OPTIONS items Nicolas Goaziou
` (3 preceding siblings ...)
2013-06-21 9:17 ` Eric Abrahamsen
@ 2013-06-21 9:26 ` Carsten Dominik
2013-06-21 17:28 ` Nicolas Goaziou
2013-06-27 14:33 ` Bastien
5 siblings, 1 reply; 23+ messages in thread
From: Carsten Dominik @ 2013-06-21 9:26 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode List
Hi Nicolas,
This is a good change - I am also for merging it.
- Carsten
On Jun 20, 2013, at 9:20 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> 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
> <0001-ox-html-Use-OPTIONS-items-instead-of-keywords-for-bo.patch>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-21 9:26 ` Carsten Dominik
@ 2013-06-21 17:28 ` Nicolas Goaziou
2013-06-21 17:32 ` Rick Frankel
` (2 more replies)
0 siblings, 3 replies; 23+ messages in thread
From: Nicolas Goaziou @ 2013-06-21 17:28 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Org Mode List
Hello,
Carsten Dominik <carsten.dominik@gmail.com> writes:
> This is a good change - I am also for merging it.
Applied on master, since it introduces a syntax change. Tell me if you
want it on maint anyway (or just cherry-pick it yourself).
As for the move from #+OPTIONS: key:value to #+OPTIONS: :key value,
I can provide a patch, but it will break export in many documents.
A workaround would be to support both versions and document only the
newest one.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-21 17:28 ` Nicolas Goaziou
@ 2013-06-21 17:32 ` Rick Frankel
2013-06-21 17:56 ` Achim Gratz
2013-06-27 14:26 ` Bastien
2 siblings, 0 replies; 23+ messages in thread
From: Rick Frankel @ 2013-06-21 17:32 UTC (permalink / raw)
To: emacs-orgmode
On 2013-06-21 13:28, Nicolas Goaziou wrote:
> Hello,
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
> This is a good change - I am also for merging it.
>
> Applied on master, since it introduces a syntax change. Tell me if you
> want it on maint anyway (or just cherry-pick it yourself).
>
> As for the move from #+OPTIONS: key:value to #+OPTIONS: :key value,
> I can provide a patch, but it will break export in many documents.
> A workaround would be to support both versions and document only the
> newest one.
>
+1 for supporting both versions (with a deprecation on the old syntax)
until
the next major release.
rick
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
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-27 14:26 ` Bastien
2 siblings, 1 reply; 23+ messages in thread
From: Achim Gratz @ 2013-06-21 17:56 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou writes:
> As for the move from #+OPTIONS: key:value to #+OPTIONS: :key value,
> I can provide a patch, but it will break export in many documents.
> A workaround would be to support both versions and document only the
> newest one.
I didn't know supporting both styles was in the cards. If it isn't
overly complicated, that would be welcome of course.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-21 17:56 ` Achim Gratz
@ 2013-06-21 18:55 ` Nicolas Goaziou
2013-06-21 19:36 ` Samuel Wales
` (3 more replies)
0 siblings, 4 replies; 23+ messages in thread
From: Nicolas Goaziou @ 2013-06-21 18:55 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 691 bytes --]
Hello,
Achim Gratz <Stromeko@nexgo.de> writes:
> Nicolas Goaziou writes:
>> As for the move from #+OPTIONS: key:value to #+OPTIONS: :key value,
>> I can provide a patch, but it will break export in many documents.
>> A workaround would be to support both versions and document only the
>> newest one.
>
> I didn't know supporting both styles was in the cards. If it isn't
> overly complicated, that would be welcome of course.
Here is a preliminary patch. It doesn't update org.texi yet.
I find the new syntax weird for one character keys:
#+OPTIONS: :* t :e t :: t :f t :- t :^ t :| t
Maybe we should expand them in order to make them less cryptic.
Regards,
--
Nicolas Goaziou
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-Change-OPTIONS-syntax-from-key-value-to-key-value.patch --]
[-- Type: text/x-diff, Size: 4291 bytes --]
From df3934522fc922d4c1b1a88c4cfa9a6d06370720 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <n.goaziou@gmail.com>
Date: Fri, 21 Jun 2013 20:49:05 +0200
Subject: [PATCH] ox: Change OPTIONS syntax from key:value to :key value
* lisp/ox.el (org-export--parse-option-keyword): Change OPTIONS syntax
from key:value to :key value. Still recognize old syntax for
compatibility.
(org-export-insert-default-template): Use new syntax.
* testing/lisp/test-ox.el: Update tests.
---
lisp/ox.el | 26 +++++++++++++++++---------
testing/lisp/test-ox.el | 24 ++++++++++++------------
2 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/lisp/ox.el b/lisp/ox.el
index e49de22..8a29908 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1524,20 +1524,29 @@ specific items to read, if any."
(append (and backend (org-export-backend-options backend))
org-export-options-alist))
plist)
- (dolist (option all)
+ (dolist (option all plist)
(let ((property (car option))
(item (nth 2 option)))
(when (and item
(not (plist-member plist property))
- (string-match (concat "\\(\\`\\|[ \t]\\)"
- (regexp-quote item)
- ":\\(([^)\n]+)\\|[^ \t\n\r;,.]*\\)")
- options))
+ (let ((item (regexp-quote item)))
+ (or (string-match
+ (concat "\\(?:\\`\\|[ \t]\\):"
+ item
+ "[ \t]+\\(([^)\n]+)\\|[^ \t\n\r;,.]*\\)")
+ options)
+ ;; Compatibility code for deprecated
+ ;; item:value syntax. It can be removed in
+ ;; Org 9.0+.
+ (string-match
+ (concat "\\(?:\\`\\|[ \t]\\)"
+ item
+ ":\\(([^)\n]+)\\|[^ \t\n\r;,.]*\\)")
+ options))))
(setq plist (plist-put plist
property
(car (read-from-string
- (match-string 2 options))))))))
- plist))
+ (match-string 1 options))))))))))
(defun org-export--get-subtree-options (&optional backend)
"Get export options in subtree at point.
@@ -3171,8 +3180,7 @@ locally for the subtree through node properties."
(when options
(let ((items
(mapcar
- (lambda (opt)
- (format "%s:%s" (car opt) (format "%s" (cdr opt))))
+ (lambda (opt) (format ":%s %s" (car opt) (cdr opt)))
(sort options (lambda (k1 k2) (string< (car k1) (car k2)))))))
(if subtreep
(org-entry-put
diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
index cbae08a..1a9c241 100644
--- a/testing/lisp/test-ox.el
+++ b/testing/lisp/test-ox.el
@@ -120,9 +120,9 @@ already filled in `info'."
(should
(equal
(org-export--parse-option-keyword
- "H:1 num:t \\n:t timestamp:t arch:t author:t creator:t d:t email:t
- *:t e:t ::t f:t pri:t -:t ^:t toc:t |:t tags:t tasks:t <:t todo:t inline:nil
- stat:t")
+ ":H 1 :num t :\\n t :timestamp t :arch t :author t :creator t :d t :email t
+ :* t :e t :: t :f t :pri t :- t :^ t :toc t :| t :tags t :tasks t :< t :todo t
+ :inline nil :stat t")
'(:headline-levels
1 :preserve-breaks t :section-numbers t :time-stamp-file t
:with-archived-trees t :with-author t :with-creator t :with-drawers t
@@ -135,13 +135,13 @@ already filled in `info'."
(should
(equal
(org-export--parse-option-keyword
- "arch:headline creator:comment d:(\"TEST\")
- ^:{} toc:1 tags:not-in-toc tasks:todo num:2 <:active")
- '( :section-numbers
- 2
- :with-archived-trees headline :with-creator comment
- :with-drawers ("TEST") :with-sub-superscript {} :with-toc 1
- :with-tags not-in-toc :with-tasks todo :with-timestamps active))))
+ ":arch headline :creator comment :d (\"TEST\") :^ {} :toc 1
+ :tags not-in-toc :tasks todo :num 2 :< active")
+ '(:section-numbers
+ 2
+ :with-archived-trees headline :with-creator comment
+ :with-drawers ("TEST") :with-sub-superscript {} :with-toc 1
+ :with-tags not-in-toc :with-tasks todo :with-timestamps active))))
(ert-deftest test-org-export/get-inbuffer-options ()
"Test reading all standard export keywords."
@@ -208,10 +208,10 @@ Paragraph"
:title
'("subtree-title")
;; EXPORT_OPTIONS.
- (org-test-with-temp-text "#+OPTIONS: H:1
+ (org-test-with-temp-text "#+OPTIONS: :H 1
* Headline
:PROPERTIES:
- :EXPORT_OPTIONS: H:2
+ :EXPORT_OPTIONS: :H 2
:END:
Paragraph"
(forward-line)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-21 18:55 ` Nicolas Goaziou
@ 2013-06-21 19:36 ` Samuel Wales
2013-06-21 20:05 ` Thorsten Jolitz
` (2 subsequent siblings)
3 siblings, 0 replies; 23+ messages in thread
From: Samuel Wales @ 2013-06-21 19:36 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Achim Gratz, emacs-orgmode
On 6/21/13, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> #+OPTIONS: :* t :e t :: t :f t :- t :^ t :| t
>
> Maybe we should expand them in order to make them less cryptic.
To me, that would be ideal.
Samuel
--
The Kafka Pandemic: http://thekafkapandemic.blogspot.com
The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Denmark: free Karina Hansen NOW.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
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
3 siblings, 0 replies; 23+ messages in thread
From: Thorsten Jolitz @ 2013-06-21 20:05 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> I find the new syntax weird for one character keys:
>
> #+OPTIONS: :* t :e t :: t :f t :- t :^ t :| t
>
> Maybe we should expand them in order to make them less cryptic.
+1 for making this #+OPTIONS lines human readable ...
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
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
3 siblings, 0 replies; 23+ messages in thread
From: Eric Schulte @ 2013-06-21 20:16 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Achim Gratz, emacs-orgmode
>>> As for the move from #+OPTIONS: key:value to #+OPTIONS: :key value,
>>> I can provide a patch, but it will break export in many documents.
>>> A workaround would be to support both versions and document only the
>>> newest one.
>>
>> I didn't know supporting both styles was in the cards. If it isn't
>> overly complicated, that would be welcome of course.
>
> Here is a preliminary patch. It doesn't update org.texi yet.
>
> I find the new syntax weird for one character keys:
>
> #+OPTIONS: :* t :e t :: t :f t :- t :^ t :| t
>
I'm not sure how to weight aesthetics against consistency, but
personally I much prefer the previous
#+OPTIONS: *:t e:t ::t f:t -:t ^:t |:t
to the new possibility posted above. In my opinion it is not as
important to be consistent with code block header arguments here as it
is to be legible. All header arguments are full words and typically
have longer values, so they don't run into the same readability issues.
Just my 2¢
--
Eric Schulte
http://cs.unm.edu/~eschulte
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-21 18:55 ` Nicolas Goaziou
` (2 preceding siblings ...)
2013-06-21 20:16 ` Eric Schulte
@ 2013-06-21 20:41 ` Achim Gratz
2013-06-23 21:55 ` Carsten Dominik
3 siblings, 1 reply; 23+ messages in thread
From: Achim Gratz @ 2013-06-21 20:41 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou writes:
> Here is a preliminary patch. It doesn't update org.texi yet.
>
> I find the new syntax weird for one character keys:
>
> #+OPTIONS: :* t :e t :: t :f t :- t :^ t :| t
>
> Maybe we should expand them in order to make them less cryptic.
Indeed, too much punctuation. How about something along these lines?
#+OPTIONS: :enable *e: :disable ^|
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-21 20:41 ` Achim Gratz
@ 2013-06-23 21:55 ` Carsten Dominik
2013-06-24 17:19 ` Achim Gratz
0 siblings, 1 reply; 23+ messages in thread
From: Carsten Dominik @ 2013-06-23 21:55 UTC (permalink / raw)
To: Achim Gratz; +Cc: emacs-orgmode
On 21.6.2013, at 22:41, Achim Gratz <Stromeko@nexgo.de> wrote:
> Nicolas Goaziou writes:
>> Here is a preliminary patch. It doesn't update org.texi yet.
>>
>> I find the new syntax weird for one character keys:
>>
>> #+OPTIONS: :* t :e t :: t :f t :- t :^ t :| t
>>
>> Maybe we should expand them in order to make them less cryptic.
>
> Indeed, too much punctuation. How about something along these lines?
>
> #+OPTIONS: :enable *e: :disable ^|
Hi,
I agree with this proposal. The property-lit like style should
use longer names and avoid the short ones. And we should also
keep supporting the old compact style, and document it with a foot note
in the manual.
- Carsten
>
>
> Regards,
> Achim.
> --
> +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
>
> SD adaptation for Waldorf rackAttack V1.04R1:
> http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
>
>
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-23 21:55 ` Carsten Dominik
@ 2013-06-24 17:19 ` Achim Gratz
0 siblings, 0 replies; 23+ messages in thread
From: Achim Gratz @ 2013-06-24 17:19 UTC (permalink / raw)
To: emacs-orgmode
Carsten Dominik writes:
>> Indeed, too much punctuation. How about something along these lines?
>>
>> #+OPTIONS: :enable *e: :disable ^|
>
> I agree with this proposal. The property-lit like style should
> use longer names and avoid the short ones. And we should also
> keep supporting the old compact style, and document it with a foot note
> in the manual.
Like this?
:enable / :disable
| option | abbrev |
|------------------+--------|
| smart-quotes | ' |
| emphasis | * |
| special-strings | - |
| fixed-width | : |
| timestamps | < |
| sub-super-script | ^ |
| tables | | |
:toggle / :with / :without
| toggles | abbrev |
|-----------------+--------|
| author | |
| clocks | c |
| creator | |
| drawers | d |
| entities | e |
| email | |
| footnotes | f |
| inlinetasks | inline |
| section-numbers | num |
| planning | p |
| priority | ori |
| statistics | stat |
| tags | |
| tasks | |
| latex | tex |
| timestamp | |
| toc | |
| todo | |
:with
| settings | abbrev |
|-------------------------+--------|
| arch=<val> | |
| headline-levels=<limit> | H |
| toc=<limit> | |
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-21 17:28 ` Nicolas Goaziou
2013-06-21 17:32 ` Rick Frankel
2013-06-21 17:56 ` Achim Gratz
@ 2013-06-27 14:26 ` Bastien
2 siblings, 0 replies; 23+ messages in thread
From: Bastien @ 2013-06-27 14:26 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode List, Carsten Dominik
Hi Nicolas,
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Applied on master, since it introduces a syntax change. Tell me if you
> want it on maint anyway (or just cherry-pick it yourself).
2 cents: it's better on maint, since people are more likely to read
change logs for 8.1 rather than for 8.0.4.
--
Bastien
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-20 19:20 [RFC] Replace some HTML related keywords with OPTIONS items Nicolas Goaziou
` (4 preceding siblings ...)
2013-06-21 9:26 ` Carsten Dominik
@ 2013-06-27 14:33 ` Bastien
2013-06-27 16:00 ` Nicolas Goaziou
5 siblings, 1 reply; 23+ messages in thread
From: Bastien @ 2013-06-27 14:33 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode List
Hi Nicolas,
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Basically,
>
> #+HTML_INCLUDE_STYLE: nil
>
> becomes
>
> #+OPTIONS: html-style:nil
Is this the rule for all #+... options ?
What about #+LaTeX: options ?
See for example ox-rss.el: should I keep using #+RSS_EXTENSION or use
a new item for #+OPTIONS: ?
Thanks for the directions!
--
Bastien
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-27 14:33 ` Bastien
@ 2013-06-27 16:00 ` Nicolas Goaziou
2013-06-27 16:19 ` Bastien
0 siblings, 1 reply; 23+ messages in thread
From: Nicolas Goaziou @ 2013-06-27 16:00 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode List
Hello,
Bastien <bzg@gnu.org> writes:
> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Basically,
>>
>> #+HTML_INCLUDE_STYLE: nil
>>
>> becomes
>>
>> #+OPTIONS: html-style:nil
>
> Is this the rule for all #+... options ?
>
> What about #+LaTeX: options ?
>
> See for example ox-rss.el: should I keep using #+RSS_EXTENSION or use
> a new item for #+OPTIONS: ?
>
> Thanks for the directions!
Basically, #+keyword: is for strings, #+OPTIONS: use `read' on the
values, so it should be used for every other type.
AFAIU, #+rss_extension: expects a string as its value, so there's
nothing to change.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-27 16:00 ` Nicolas Goaziou
@ 2013-06-27 16:19 ` Bastien
2013-06-27 19:18 ` Nicolas Goaziou
0 siblings, 1 reply; 23+ messages in thread
From: Bastien @ 2013-06-27 16:19 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode List
Hi Nicolas,
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Basically, #+keyword: is for strings, #+OPTIONS: use `read' on the
> values, so it should be used for every other type.
Thanks for the explanation, it makes sense.
Let's make it explicit somewhere in the manual, so that users
have a clear rule in mind when wondering what syntax they need
to look for.
Best,
--
Bastien
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-27 16:19 ` Bastien
@ 2013-06-27 19:18 ` Nicolas Goaziou
2013-06-28 7:14 ` Bastien
0 siblings, 1 reply; 23+ messages in thread
From: Nicolas Goaziou @ 2013-06-27 19:18 UTC (permalink / raw)
To: Bastien; +Cc: Org Mode List
Bastien <bzg@gnu.org> writes:
> Nicolas Goaziou <n.goaziou@gmail.com> writes:
>
>> Basically, #+keyword: is for strings, #+OPTIONS: use `read' on the
>> values, so it should be used for every other type.
>
> Thanks for the explanation, it makes sense.
>
> Let's make it explicit somewhere in the manual, so that users
> have a clear rule in mind when wondering what syntax they need
> to look for.
I tend to think it's more a developer information. By looking at the
manual, there's no confusion possible for a user.
Maybe it should go in `org-export-options-alist' docstring instead.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [RFC] Replace some HTML related keywords with OPTIONS items
2013-06-27 19:18 ` Nicolas Goaziou
@ 2013-06-28 7:14 ` Bastien
0 siblings, 0 replies; 23+ messages in thread
From: Bastien @ 2013-06-28 7:14 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: Org Mode List
Hi Nicolas,
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> I tend to think it's more a developer information. By looking at the
> manual, there's no confusion possible for a user.
A footnote would not hurt, if only as a way to answer future
questions?
> Maybe it should go in `org-export-options-alist' docstring instead.
Indeed.
--
Bastien
^ permalink raw reply [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.