summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-10 14:21:49 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2015-09-10 14:21:49 +0200
commitbde1ebc20ae5c3633d2f405117f7ee67566b5a5f (patch)
treeacdfb876106d4506fbe38fc04b76d769bdd654c6
parent0b71022c8cc51f3887cff5a1ec241ac258e9779c (diff)
downloadorg-mode-bde1ebc20ae5c3633d2f405117f7ee67566b5a5f.tar.gz
ox-koma-letter: Allow to disable place locally
* contrib/lisp/ox-koma-letter.el (koma-letter): (org-koma-letter--build-settings): Allow to disable place locally. Whenever OPTION keyword contains a "place" item or PLACE keyword is used in the buffer, set KOMA option place after LCO inclusion. Reported-by: Alan Schmitt <alan.schmitt@polytechnique.org> <http://permalink.gmane.org/gmane.emacs.orgmode/101010>
-rw-r--r--contrib/lisp/ox-koma-letter.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 8ba380c..e6fed3b 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -435,7 +435,8 @@ e.g. \"title-subject:t\"."
(:inbuffer-with-backaddress nil "backaddress" 'koma-letter:empty)
(:inbuffer-with-email nil "email" 'koma-letter:empty)
(:inbuffer-with-foldmarks nil "foldmarks" 'koma-letter:empty)
- (:inbuffer-with-phone nil "phone" 'koma-letter:empty))
+ (:inbuffer-with-phone nil "phone" 'koma-letter:empty)
+ (:inbuffer-with-place nil "place" 'koma-letter:empty))
:translate-alist '((export-block . org-koma-letter-export-block)
(export-snippet . org-koma-letter-export-snippet)
(headline . org-koma-letter-headline)
@@ -734,9 +735,13 @@ a communication channel."
(format "\\KOMAoption{backaddress}{%s}\n"
(if (plist-get info :with-backaddress) "true" "false")))
;; Place.
- (and (funcall check-scope 'place)
- (format "\\setkomavar{place}{%s}\n"
- (if (plist-get info :with-place) (plist-get info :place) "")))
+ (let ((with-place-set (funcall check-scope 'with-place))
+ (place-set (funcall check-scope 'place)))
+ (and (or (and with-place-set place-set)
+ (and (eq scope 'buffer) (or with-place-set place-set)))
+ (format "\\setkomavar{place}{%s}\n"
+ (if (plist-get info :with-place) (plist-get info :place)
+ ""))))
;; Folding marks.
(and (funcall check-scope 'with-foldmarks)
(let ((foldmarks (plist-get info :with-foldmarks)))