emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Removing the date in a subtree export using the new exporter
@ 2012-11-08 10:06 Alan Schmitt
  2012-11-09  0:43 ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Schmitt @ 2012-11-08 10:06 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

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?

Alan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-08 10:06 Removing the date in a subtree export using the new exporter Alan Schmitt
@ 2012-11-09  0:43 ` Nicolas Goaziou
  2012-11-09 16:30   ` Alan Schmitt
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-09  0:43 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Hello,

Alan Schmitt <alan.schmitt@polytechnique.org> 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.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-09  0:43 ` Nicolas Goaziou
@ 2012-11-09 16:30   ` Alan Schmitt
  2012-11-09 17:01     ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Schmitt @ 2012-11-09 16:30 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Alan Schmitt <alan.schmitt@polytechnique.org> 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-09 16:30   ` Alan Schmitt
@ 2012-11-09 17:01     ` Nicolas Goaziou
  2012-11-09 17:17       ` Alan Schmitt
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-09 17:01 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> 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.)

It's better if you can provide a changelog entry and send it with "git
format-patch". Also, if you did not sign FSF papers, you will have to
add "TINYCHANGE" at the end of the change log.

Thank you.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-09 17:01     ` Nicolas Goaziou
@ 2012-11-09 17:17       ` Alan Schmitt
  2012-11-09 17:21         ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Schmitt @ 2012-11-09 17:17 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

On 9 nov. 2012, at 18:01, Nicolas Goaziou <n.goaziou@gmail.com> wrote:

> It's better if you can provide a changelog entry and send it with "git
> format-patch". Also, if you did not sign FSF papers, you will have to
> add "TINYCHANGE" at the end of the change log.

I'll do this when I get back near a computer.

Also, about the FSF papers, is there a link for this procedure?

Thanks,

Alan

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-09 17:17       ` Alan Schmitt
@ 2012-11-09 17:21         ` Nicolas Goaziou
  2012-11-09 18:16           ` Alan Schmitt
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-09 17:21 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> I'll do this when I get back near a computer.

Great.

> Also, about the FSF papers, is there a link for this procedure?

Certainly: http://orgmode.org/worg/org-contribute.html (in particular
the second section, but the whole page in interesting).

It basically boils down to sending a text form to assign@gnu.org.


Regards,

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-09 17:21         ` Nicolas Goaziou
@ 2012-11-09 18:16           ` Alan Schmitt
  2012-11-09 19:29             ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Schmitt @ 2012-11-09 18:16 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>> I'll do this when I get back near a computer.
>
> Great.

Attached. With another question: should the patch be sent to the list,
or just to you (or any other process)?

>> Also, about the FSF papers, is there a link for this procedure?
>
> Certainly: http://orgmode.org/worg/org-contribute.html (in particular
> the second section, but the whole page in interesting).
>
> It basically boils down to sending a text form to assign@gnu.org.

I'll look into it.

Alan


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-export-Output-date-in-LaTeX-export-when-with-dat.patch --]
[-- Type: text/x-patch, Size: 1201 bytes --]

From f11683e9de7b1073c6f474fd2236f584c44299e1 Mon Sep 17 00:00:00 2001
From: Alan Schmitt <alan.schmitt@polytechnique.org>
Date: Fri, 9 Nov 2012 19:12:37 +0100
Subject: [PATCH] org-export: Output "\date{}" in LaTeX export when :with-date
 is nil

* contrib/lisp/org-e-latex.el (org-e-latex-template):
  output "\date{}" instead of nothing when :with-date is nil

TINYCHANGE
---
 contrib/lisp/org-e-latex.el |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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.
-- 
1.7.9.6 (Apple Git-31.1)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-09 18:16           ` Alan Schmitt
@ 2012-11-09 19:29             ` Nicolas Goaziou
  2012-11-13 22:14               ` Bastien
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2012-11-09 19:29 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: emacs-orgmode

Alan Schmitt <alan.schmitt@polytechnique.org> writes:

> Attached. 

Applied (with a slight twist). Thank you.

I've added you to the list of contributors without FSF assignment. Tell
me once you have signed them.

> With another question: should the patch be sent to the list,
> or just to you (or any other process)?

Please send any patch to the list.


Regards,

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Removing the date in a subtree export using the new exporter
  2012-11-09 19:29             ` Nicolas Goaziou
@ 2012-11-13 22:14               ` Bastien
  0 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2012-11-13 22:14 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Alan Schmitt, emacs-orgmode

Hi Alan,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> With another question: should the patch be sent to the list,
>> or just to you (or any other process)?
>
> Please send any patch to the list.

Yes -- please do so.  Not only this is useful so that anyone
can review/test/comment the patch, but patches sent on the list
are stored on the patchwork:

  http://patchwork.newartisans.com/project/org-mode/list/

This helps not forgetting those we cannot process immediately.

Thanks for your contribution!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-11-13 22:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-08 10:06 Removing the date in a subtree export using the new exporter Alan Schmitt
2012-11-09  0:43 ` Nicolas Goaziou
2012-11-09 16:30   ` Alan Schmitt
2012-11-09 17:01     ` Nicolas Goaziou
2012-11-09 17:17       ` Alan Schmitt
2012-11-09 17:21         ` Nicolas Goaziou
2012-11-09 18:16           ` Alan Schmitt
2012-11-09 19:29             ` Nicolas Goaziou
2012-11-13 22:14               ` Bastien

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).