emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch, ox] suppress title
Date: Thu, 12 Feb 2015 00:09:06 +0100	[thread overview]
Message-ID: <871tlwvyel.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <871tlxcmek.fsf@gmx.us> (rasmus@gmx.us's message of "Wed, 11 Feb 2015 01:38:43 +0100")

Hello,

Rasmus <rasmus@gmx.us> 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	other threads:[~2015-02-11 23:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11  0:38 [patch, ox] suppress title Rasmus
2015-02-11 23:09 ` Nicolas Goaziou [this message]
2015-02-12  0:10   ` Rasmus
2015-02-12  0:37     ` Nicolas Goaziou
2015-02-12  0:47       ` Rasmus
2015-02-12  1:26         ` Vladimir Lomov

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=871tlwvyel.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /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).