0

Does anyone know if ox-koma-export.el can be invoked from command line:

emacs --batch -e '(org-koma-letter-export-to-pdf)' letter.org

Should emacs in general be universally reproducible from command line? Or am I trying to do something strange? I expected this to produce a PDF file.

I've tried this as well, but it yields the same error:

emacs --batch -e '(progn (find-file "letter.org") (org-koma-letter-export-to-pdf))'

1 Answer 1

0

My bad, there is no -e option, no -b option and the file needs to be the second argument. This works:

emacs letter.org --batch --eval '(org-koma-letter-export-to-pdf)'

Found out by RTFM (I mixed up emacs and emacsclient).

4
  • there is no -e option, no -b option” - Emm... Did you try -h?
    – shynur
    Commented Dec 4, 2023 at 7:26
  • @shynur: emacs -h gives me an error and the single letter options that the OP mentions don't work for me either. They are also not mentioned on the man page or in Info (at least for current upstream). Are you talking about emacsclient perhaps?
    – NickD
    Commented Dec 4, 2023 at 17:02
  • @NickD yes, sorry. I mixed them up. Commented Dec 4, 2023 at 21:20
  • 1
    @DanielKrajnik: I don't think you mixed them up (or else I'm all mixed up). AFAICT, emacs requires --eval and it will not accept -e in its place. emacsclient will accept either.
    – NickD
    Commented Dec 5, 2023 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.