* [BUG] [contrib/org-koma-letter.el] #+DATE and #+TO_ADDRESS picked up from outside the current subtree
@ 2012-12-28 22:38 Viktor Rosenfeld
2012-12-29 15:12 ` Alan Schmitt
0 siblings, 1 reply; 4+ messages in thread
From: Viktor Rosenfeld @ 2012-12-28 22:38 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Alan Schmitt, Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
Hi,
I've configured the scrlttr2 exporter found in
contrib/lisp/org-koma-letter.el to write letters directly in org-mode.
I'm very happy with the results, but I've noticed the following bug: If
there are multiple letters defined in an org-file, the contents of every
#+DATE and #+TO_ADDRESS field will be picked up, even if the export is
restricted to the current subtree.
In the attached file, if you export the first letter with 3 k k from the
export dispatch menu, the address will read
Max Mustermann
Musterstraße 1
12345 Musterstadt Moritz Mustermann
Musterallee 10
54321 Musterstadt
and the date will be set to December 28 from the second letter.
Regards,
Viktor
[-- Attachment #2: test.org --]
[-- Type: text/plain, Size: 983 bytes --]
* Letter 1
#+AUTHOR: Viktor Rosenfeld
#+DATE: 1. Dezember 2012
#+LATEX_CLASS: my-letter
#+TO_ADDRESS: Max Mustermann\\
#+TO_ADDRESS: Musterstraße 1\\
#+TO_ADDRESS: 12345 Musterstadt
ich möchte mich auf diesem Wege bei ihrem Kollegen mit der
Dienstnummer 12055 bedanken. Ich hatte am 2. September 2012 meine
Brieftasche im Treptower Park verloren. Sie wurde später bei der
Polizei abgegeben und der Polizist brachte sie mir nach Hause. Ich
fand das überaus freundlich und hilfsbereit.
* Letter 2
#+AUTHOR: Viktor Rosenfeld
#+DATE: 28. Dezember 2012
#+LATEX_CLASS: my-letter
#+TO_ADDRESS: Moritz Mustermann\\
#+TO_ADDRESS: Musterallee 10\\
#+TO_ADDRESS: 54321 Musterstadt
ich möchte mich auf diesem Wege bei ihrem Kollegen mit der
Dienstnummer 12055 bedanken. Ich hatte am 2. September 2012 meine
Brieftasche im Treptower Park verloren. Sie wurde später bei der
Polizei abgegeben und der Polizist brachte sie mir nach Hause. Ich
fand das überaus freundlich und hilfsbereit.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] [contrib/org-koma-letter.el] #+DATE and #+TO_ADDRESS picked up from outside the current subtree
2012-12-28 22:38 [BUG] [contrib/org-koma-letter.el] #+DATE and #+TO_ADDRESS picked up from outside the current subtree Viktor Rosenfeld
@ 2012-12-29 15:12 ` Alan Schmitt
2012-12-29 19:18 ` Viktor Rosenfeld
0 siblings, 1 reply; 4+ messages in thread
From: Alan Schmitt @ 2012-12-29 15:12 UTC (permalink / raw)
To: Viktor Rosenfeld; +Cc: Nicolas Goaziou, emacs-orgmode
Viktor Rosenfeld writes:
> Hi,
>
> I've configured the scrlttr2 exporter found in
> contrib/lisp/org-koma-letter.el to write letters directly in org-mode.
> I'm very happy with the results, but I've noticed the following bug: If
> there are multiple letters defined in an org-file, the contents of every
> #+DATE and #+TO_ADDRESS field will be picked up, even if the export is
> restricted to the current subtree.
>
> In the attached file, if you export the first letter with 3 k k from the
> export dispatch menu, the address will read
>
> Max Mustermann
> Musterstraße 1
> 12345 Musterstadt Moritz Mustermann
> Musterallee 10
> 54321 Musterstadt
>
> and the date will be set to December 28 from the second letter.
If you want subtree exporting, the information should be in a
:PROPERTIES: drawer at the beginning of the thing to export. Here is
what I did for a recent letter:
#+BEGIN_SRC org
****** Lettre d'Accueil pour ...
:PROPERTIES:
:EXPORT_LATEX_CLASS: my-inria-fr-letter
:EXPORT_LCO: InriaRennesFR
:EXPORT_OPENING: ~
:EXPORT_CLOSING: ~
:END:
text text ...
#+END_SRC
Note that in such drawers, the name of the option has "EXPORT_" before it.
Hope this helps,
Alan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] [contrib/org-koma-letter.el] #+DATE and #+TO_ADDRESS picked up from outside the current subtree
2012-12-29 15:12 ` Alan Schmitt
@ 2012-12-29 19:18 ` Viktor Rosenfeld
2012-12-30 9:37 ` Alan Schmitt
0 siblings, 1 reply; 4+ messages in thread
From: Viktor Rosenfeld @ 2012-12-29 19:18 UTC (permalink / raw)
To: Alan Schmitt; +Cc: emacs-orgmode
Hi Alan,
Alan Schmitt wrote:
> If you want subtree exporting, the information should be in a
> :PROPERTIES: drawer at the beginning of the thing to export. Here is
> what I did for a recent letter:
>
> #+BEGIN_SRC org
> ****** Lettre d'Accueil pour ...
> :PROPERTIES:
> :EXPORT_LATEX_CLASS: my-inria-fr-letter
> :EXPORT_LCO: InriaRennesFR
> :EXPORT_OPENING: ~
> :EXPORT_CLOSING: ~
> :END:
>
> text text ...
> #+END_SRC
>
> Note that in such drawers, the name of the option has "EXPORT_" before it.
Of course! I know that, but I got confused while trying out the new
exporter. Thanks, anyway.
As an aside, what's the purpose of wrapping the letter in an org-mode
source block? Or did you just do that to wrap the example in the e-mail?
Cheers,
Viktor
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-30 9:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 22:38 [BUG] [contrib/org-koma-letter.el] #+DATE and #+TO_ADDRESS picked up from outside the current subtree Viktor Rosenfeld
2012-12-29 15:12 ` Alan Schmitt
2012-12-29 19:18 ` Viktor Rosenfeld
2012-12-30 9:37 ` Alan Schmitt
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).