* [bug] ox-koma-letter.el: Double translation of the signature to LaTeX
@ 2018-06-23 20:41 Tobias Zawada
2018-06-23 21:25 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Zawada @ 2018-06-23 20:41 UTC (permalink / raw)
To: emacs-orgmode
Hello,
org-export-data for the signature causes double LaTeX translation at https://emacs.stackexchange.com/questions/42200/prevent-org-export-from-expanding-as-backslash/42207?noredirect=1#comment66334_42207.
The translator for the headlines org-koma-letter-headline is used to extract the :closing: headline and to put its stuff into org-koma-letter-special-contents. org-koma-letter--get-tagged-contents retrieves the closing from there. I have the impression that org-koma-letter-headline already gets the translated headline contents and translating it again with org-export-data is a bad idea.
Regards,
Tobias
The following changes since commit 96b9166cf47e33a0e0292eee0eb8f42190c9c9fd:
Add header argument :save-windows. (2018-06-20 00:21:09 +0200)
are available in the Git repository at:
https://code.orgmode.org/TobiasZawada/org-mode.git HEAD
for you to fetch changes up to 69ee47c34bb0c857b2db2433b38c2ba980ea3905:
Avoid double data export on :closing: header content (2018-06-23 22:13:00 +0200)
----------------------------------------------------------------
Tobias Zawada (1):
Avoid double data export on :closing: header content
contrib/lisp/ox-koma-letter.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index fc6599fe7..8d9b5ef6b 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -820,9 +820,8 @@ a communication channel."
(and (plist-get info :with-headline-opening)
(org-string-nw-p
(org-trim
- (org-export-data
- (org-koma-letter--get-tagged-contents 'closing)
- info)))))
+ (org-koma-letter--get-tagged-contents 'closing)
+ info))))
(signature (org-string-nw-p (plist-get info :signature)))
(signature-scope (funcall check-scope 'signature)))
(and (or (and signature signature-scope)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [bug] ox-koma-letter.el: Double translation of the signature to LaTeX
2018-06-23 20:41 [bug] ox-koma-letter.el: Double translation of the signature to LaTeX Tobias Zawada
@ 2018-06-23 21:25 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-06-23 21:25 UTC (permalink / raw)
To: Tobias Zawada; +Cc: emacs-orgmode
Hello,
Tobias Zawada <i_inbox@tn-home.de> writes:
> org-export-data for the signature causes double LaTeX translation at
> https://emacs.stackexchange.com/questions/42200/prevent-org-export-from-expanding-as-backslash/42207?noredirect=1#comment66334_42207.
>
> The translator for the headlines org-koma-letter-headline is used to
> extract the :closing: headline and to put its stuff into
> org-koma-letter-special-contents. org-koma-letter--get-tagged-contents
> retrieves the closing from there. I have the impression that
> org-koma-letter-headline already gets the translated headline contents
> and translating it again with org-export-data is a bad idea.
Correct.
> (org-trim
> - (org-export-data
> - (org-koma-letter--get-tagged-contents 'closing)
> - info)))))
> + (org-koma-letter--get-tagged-contents 'closing)
> + info))))
This will fail if `org-koma-letter--get-tagged-contents' returns a nil
value. I applied a slightly different patch.
Thank you for the analysis and the patch.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-23 21:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-23 20:41 [bug] ox-koma-letter.el: Double translation of the signature to LaTeX Tobias Zawada
2018-06-23 21:25 ` Nicolas Goaziou
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).