* how to remove automatically an intermediate odt-File
@ 2020-09-09 14:42 Rainer Thiel
2020-09-13 5:14 ` Kyle Meyer
0 siblings, 1 reply; 3+ messages in thread
From: Rainer Thiel @ 2020-09-09 14:42 UTC (permalink / raw)
To: [Orgmode]
I have set org-odt-preferred-output-format to docx, which works fine.
How can I have the intermediate odt-file removed automatically after
the docx-file is created?
Many thanks in advance for any answer
Rainer
--
Prof. Dr. Rainer Thiel
Institut für Altertumswissenschaften
07737 Jena, Germany (EU)
r.thiel@uni-jena.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: how to remove automatically an intermediate odt-File
2020-09-09 14:42 how to remove automatically an intermediate odt-File Rainer Thiel
@ 2020-09-13 5:14 ` Kyle Meyer
[not found] ` <CADqAsTmRxj_CNbHB0XROBKW_uzPHxqsDwJKFD0SyUvtvnHyrdw@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Kyle Meyer @ 2020-09-13 5:14 UTC (permalink / raw)
To: r.thiel; +Cc: emacs-orgmode
Rainer Thiel writes:
> I have set org-odt-preferred-output-format to docx, which works fine.
> How can I have the intermediate odt-file removed automatically after
> the docx-file is created?
Here's one (lightly tested) option:
(advice-add :after #'org-odt-convert
(lambda (&optional in-file &rest _)
(when in-file
(delete-file in-file)))
'((name . "org-odt-convert--delete-odt")))
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fwd: how to remove automatically an intermediate odt-File
[not found] ` <87imchn26k.fsf@kyleam.com>
@ 2020-09-14 6:07 ` Rainer Thiel
0 siblings, 0 replies; 3+ messages in thread
From: Rainer Thiel @ 2020-09-14 6:07 UTC (permalink / raw)
To: [Orgmode]
---------- Forwarded message ---------
Von: Kyle Meyer <kyle@kyleam.com>
Date: So., 13. Sept. 2020 um 17:09 Uhr
Subject: Re: how to remove automatically an intermediate odt-File
To: <r.thiel@uni-jena.de>
Hi Rainer,
Rainer Thiel writes:
> Thanks for the help, but I cannot get it right. I am always getting
> the message «error: Unknown add-function location ‘org-odt-convert’».
org-odt-convert is defined in ox-odt, so if that library isn't loaded
yet, you'll need to explicitly load it before that snippet:
(require 'ox-odt)
Or you could use eval-after-load, as in the next snippet.
> Where exactly do I have to place this code snippet? I am sorry should
> I be overlooking something obvious.
Anywhere in your Emacs customization should do. If you wanted to avoid
loading ox-odt at startup, you do something like this:
(eval-after-load 'ox-odt
'(advice-add 'org-odt-convert :after
(lambda (&optional in-file &rest _)
(when in-file
(delete-file in-file)))
'((name . "org-odt-convert--delete-in-file"))))
> Thank you very much again,
Happy to help, but in the future please keep your replies on list. That
(1) allows others to help and give feedback and (2) may help other
readers that had the same question as you.
--
Prof. Dr. Rainer Thiel
Institut für Altertumswissenschaften
07737 Jena, Germany (EU)
r.thiel@uni-jena.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-14 6:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-09 14:42 how to remove automatically an intermediate odt-File Rainer Thiel
2020-09-13 5:14 ` Kyle Meyer
[not found] ` <CADqAsTmRxj_CNbHB0XROBKW_uzPHxqsDwJKFD0SyUvtvnHyrdw@mail.gmail.com>
[not found] ` <87imchn26k.fsf@kyleam.com>
2020-09-14 6:07 ` Fwd: " Rainer Thiel
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).