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

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

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

How would I make this test proper?  I can't use org-test-default-backend
since it only loads the transcoder functions, not the template which is
where I disable the title.  I can think of the following or writing a mini
template that just check :with-title, but that feels like cheating...

  ;; Test title.
  (should
   (equal ""
	  (org-test-with-temp-text "#+TITLE: foo"
	    (org-export-as
	     (org-export-create-backend
	      :transcoders
	      '((title    .  org-org-identity)
		(template . org-org-template)))
	     nil nil nil
	     '(:with-title nil :with-creator nil
			   :with-author nil :with-date nil
			   :time-stamp-file nil)))))
  (should
   (equal "#+TITLE: foo"
	  (org-trim
	   (org-test-with-temp-text
	       "#+TITLE: foo"
	     (org-export-as
	      (org-export-create-backend
	       :transcoders
	       '((title    .  org-org-identity)
		 (template . org-org-template)))
	      nil nil nil
	      '(:with-title t :with-creator nil
			    :with-author nil :with-date nil
			    :time-stamp-file nil))))))

-- 
With monopolies the cake is a lie!

  reply	other threads:[~2015-02-12  0:10 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
2015-02-12  0:10   ` Rasmus [this message]
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=87iof8yoph.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --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).