diff options
author | Glenn Morris <rgm@gnu.org> | 2021-02-26 19:28:43 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2021-02-26 19:36:09 -0800 |
commit | fddd63f8b854f6bfa91403f69ba694ccb54197bc (patch) | |
tree | 93352dd94e714f4f84c57cd9e6ecc9f53d7b6922 /lisp/org | |
parent | 3984044ad3f481b0c67e906a405176ae276dd44d (diff) | |
download | emacs-fddd63f8b854f6bfa91403f69ba694ccb54197bc.tar.gz |
Distribute the real source for some doc/misc manuals (bug#45143)
* doc/misc/modus-themes.texi, doc/misc/org.texi:
Remove generated files from repository.
* doc/misc/Makefile.in: Add rules for building .texi from .org.
(ORG_SRC, abs_top_builddir, EMACS, emacs):
New variables.
(org_template): New template.
(orgclean): New phony target.
* Makefile.in (info): Depend on lisp.
* lisp/org/ox-texinfo.el (org-texinfo-export-to-texinfo-batch):
New function.
* doc/misc/org.org, doc/misc/org-setup.org: New files.
Import from https://code.orgmode.org d8e8a97a14.
Diffstat (limited to 'lisp/org')
-rw-r--r-- | lisp/org/ox-texinfo.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index cf080549a6a..78d58beadd6 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el @@ -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) |