From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Removing the date in a subtree export using the new exporter Date: Fri, 09 Nov 2012 17:30:02 +0100 Message-ID: References: <87fw4jli5t.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWrT7-0000fP-4E for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 11:30:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TWrT3-0001IS-EF for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 11:30:09 -0500 Received: from mail4-relais-sop.national.inria.fr ([192.134.164.105]:15922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TWrT3-0001Dx-7b for emacs-orgmode@gnu.org; Fri, 09 Nov 2012 11:30:05 -0500 In-Reply-To: <87fw4jli5t.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 09 Nov 2012 01:43:58 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: emacs-orgmode Nicolas Goaziou writes: > Hello, > > Alan Schmitt writes: > >> I'm using the new exporter to create a pdf (through latex) of a subtree >> of a huge file, and I want to remove some default information. I found >> out a way to do it, but I'm not sure it's the right way. Here it is. >> >> #+BEGIN_SRC org >> :PROPERTIES: >> :EXPORT_TITLE: Foo bar >> :EXPORT_OPTIONS: toc:nil author:nil >> :EXPORT_DATE: ~ >> :END: >> #+END_SRC >> >> The part about which I'm not sure is how to remove the date. I tried >> putting nothing instead of the '~' but it does not work. Maybe there >> could be an option for it? > > Indeed, there could be a "date:nil" option. I'll add it later. Thanks > for suggesting it. I wanted to fix this and saw that you already did. However it seems that LaTeX still adds a date when a "\maketitle" happens with no date specified. This small patch should fix this. diff --git a/contrib/lisp/org-e-latex.el b/contrib/lisp/org-e-latex.el index 64908b9..9534a79 100644 --- a/contrib/lisp/org-e-latex.el +++ b/contrib/lisp/org-e-latex.el @@ -1026,9 +1026,10 @@ holding export options." (format "\\author{%s\\thanks{%s}}\n" author email)) ((or author email) (format "\\author{%s}\n" (or author email))))) ;; Date. - (when (plist-get info :with-date) + (if (plist-get info :with-date) (let ((date (org-export-data (plist-get info :date) info))) - (and date (format "\\date{%s}\n" date)))) + (and date (format "\\date{%s}\n" date))) + "\\date{}\n") ;; Title (format "\\title{%s}\n" title) ;; Hyperref options. (Please let me know if it's not the good format to send the patch.) Alan