emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [patch, ox] suppress title


From: Nicolas Goaziou
Subject: Re: [O] [patch, ox] suppress title
Date: Thu, 12 Feb 2015 00:09:06 +0100

Hello,

Rasmus <address@hidden> writes:


> Sometime when requiring custom formatting of the header for a document, it
> would be nice to be able to use #+TITLE without triggering the insertion
> of the tile (e.g. \maketitle in latex and <h1>title</h1> in ox-html).  For
> instance, one might have special org-html-preamble code.  This patch adds
> an "#+OPTIONS: title:{nil,t}" option.

Nice, thanks. The usual nitpicking follows.

> -   (let ((subtitle1 (plist-get attr :subtitle1))
> +   (let ((title (if (plist-get info :with-title)
> +                 title ""))

Nitpick: 

  (title (if (plist-get info :with-title) title ""))

or

  (title (if (plist-get info :with-title) title 
          ""))

or

  (title (if (plist-get info :with-title) 
             title 
          ""))


> +(make-obsolete-variable 'org-koma-letter-use-title
> +                     'Org-export-with-title

Typo.

> +      (cond ((null (plist-get info :with-title)) nil)

Nitpick:

  (not (plist-get info :with-title))

This is considered as a boolean, not as a list.

> -     (cond ((string= "" title) nil)
> +     (cond ((null (plist-get info :with-title)) nil)

See above.

>  (defcustom org-export-time-stamp-file t
>    "Non-nil means insert a time stamp into the exported file.
>  The time stamp shows when the file was created.  This option can
> diff --git a/testing/lisp/test-ox.el b/testing/lisp/test-ox.el
> index 79b5c69..4a74ab3 100644
> --- a/testing/lisp/test-ox.el
> +++ b/testing/lisp/test-ox.el
> @@ -111,7 +111,7 @@ variable, and communication channel under `info'."
>      (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")
> + stat:t title: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
> @@ -119,7 +119,7 @@ variable, and communication channel under `info'."
>        :with-footnotes t :with-inlinetasks nil :with-priority t
>        :with-special-strings t :with-statistics-cookies t 
> :with-sub-superscript t
>        :with-toc t :with-tables t :with-tags t :with-tasks t :with-timestamps 
> t
> -      :with-todo-keywords t)))
> +      :with-title t :with-todo-keywords t)))
>    ;; Test some special values.
>    (should
>     (equal

Could you also add a test in `test-org-export/handle-options'?

This also requires a proper ORG-NEWS entry.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]