emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: James Harkins <jamshark70@gmail.com>
To: orgmode <emacs-orgmode@gnu.org>
Subject: Koma-letter bug: backaddress option not included in latex export
Date: Sun, 24 Nov 2013 17:44:52 +0800	[thread overview]
Message-ID: <93383175-89d6-41e1-a51c-24733922d046@dewdrop-world.net> (raw)

I believe I've found a bug in ox-koma-letter.el. Org-mode version 8.2 
(release_8.2-2-g18c7c4 @ /home/dlm/share/org-mode.git/lisp/)

Accepted values for the "backaddress" option are "t" or "nil."

If the option is "t," then the export contains a line 
"\KOMAoption{backaddress}{true}."

If the option is nil, I would expect a line 
"\KOMAoption{backaddress}{false}" but *the line is omitted*. So, LaTeX 
prints the back address anyway, even though the option is explicitly set to 
disable the back address.

I think the problem is here:

   (let ((with-backaddress (plist-get info :with-backaddress))
	 (with-backaddress-set (plist-get info 
:with-backaddress-changed-in-buffer-p))
..
      (when with-backaddress-set
	(format "\\KOMAoption{backaddress}{%s}\n" (if with-backaddress "true" 
"false")))

Somehow, when backaddress is nil, with-backaddress-set must be false, 
causing the line not to be generated.

**Update**: Same problem with #+OPTIONS: foldmarks. Possibly all the 
options are broken.

ECM (the simple example at [1], with one #+OPTIONS line added):

[1] http://orgmode.org/worg/exporters/koma-letter-export.html

#+LATEX_CLASS: my-letter
#+TITLE: A simple letter
#+DATE: April 22, 2013
#+AUTHOR: Jane Doe
#+OPTIONS: backaddress:nil
#+FROM_ADDRESS: Some Street 1\\
#+FROM_ADDRESS: 12345 Some City
#+TO_ADDRESS: John Doe\\
#+TO_ADDRESS: Other Street 1\\
#+TO_ADDRESS: 54321 Other City
#+OPENING: Dear John,
#+CLOSING: Yours truly,
#+SIGNATURE: Jane
#+LANGUAGE: en

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

-->

% Created 2013-11-24 Sun 17:27
\documentclass{scrlttr2}
\usepackage[english]{babel}
\setkomavar{fromemail}{dlm@dlm-A6200}
\LoadLetterOption{NF}
\setkomavar{fromname}{Jane Doe}
\setkomavar{fromaddress}{Some Street 1\\\\
12345 Some City}
\setkomavar{signature}{Jane}
\date{April 22, 2013}
\begin{document}

\setkomavar{subject}{A simple letter}

\begin{letter}{%
John Doe\\\\
Other Street 1\\\\
54321 Other City}

\opening{Dear John,}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

\closing{Yours truly,}

\end{letter}

\end{document}

~~~

Change it to backaddress:t and you'll see the difference.

hjh

             reply	other threads:[~2013-11-24  9:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-24  9:44 James Harkins [this message]
2013-11-24 10:43 ` Koma-letter bug: backaddress option not included in latex export Rasmus

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=93383175-89d6-41e1-a51c-24733922d046@dewdrop-world.net \
    --to=jamshark70@gmail.com \
    --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).