forked from mirrors/org-mode
Backport commit fddd63f8b from Emacs
* lisp/ox-texinfo.el (org-texinfo-export-to-texinfo-batch): New function. Distribute the real source for some doc/misc manuals (bug#45143) fddd63f8b854f6bfa91403f69ba694ccb54197bc Glenn Morris Fri Feb 26 19:36:09 2021 -0800
This commit is contained in:
parent
63da3ccfb4
commit
6382dbc950
|
@ -1627,6 +1627,23 @@ Return output file's name."
|
|||
(org-export-to-file 'texinfo outfile
|
||||
async subtreep visible-only body-only ext-plist)))
|
||||
|
||||
(defun org-texinfo-export-to-texinfo-batch ()
|
||||
"Export Org file INFILE to Texinfo file OUTFILE, in batch mode.
|
||||
Usage: emacs -batch -f org-texinfo-export-to-texinfo-batch INFILE OUTFILE"
|
||||
(or noninteractive (user-error "Batch mode use only"))
|
||||
(let ((infile (pop command-line-args-left))
|
||||
(outfile (pop command-line-args-left))
|
||||
(org-export-coding-system org-texinfo-coding-system))
|
||||
(unless (file-readable-p infile)
|
||||
(message "File `%s' not readable" infile)
|
||||
(kill-emacs 1))
|
||||
(when (file-exists-p outfile)
|
||||
(message "File `%s' already exists" outfile)
|
||||
(kill-emacs 1))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents infile)
|
||||
(org-export-to-file 'texinfo outfile))))
|
||||
|
||||
;;;###autoload
|
||||
(defun org-texinfo-export-to-info
|
||||
(&optional async subtreep visible-only body-only ext-plist)
|
||||
|
|
Loading…
Reference in New Issue