Bladeren bron

Merge branch 'km/from-emacs-master'

Kyle Meyer 4 jaren geleden
bovenliggende
commit
04e5d08faf
1 gewijzigde bestanden met toevoegingen van 3 en 4 verwijderingen
  1. 3 4
      lisp/ox-texinfo.el

+ 3 - 4
lisp/ox-texinfo.el

@@ -1629,17 +1629,16 @@ Return output file's name."
 
 (defun org-texinfo-export-to-texinfo-batch ()
   "Export Org file INFILE to Texinfo file OUTFILE, in batch mode.
+Overwrites existing output file.
 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))
+	(org-export-coding-system org-texinfo-coding-system)
+        (make-backup-files nil))
     (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))))