Merge branch 'bugfix'

This commit is contained in:
Ihor Radchenko 2023-10-15 11:12:34 +03:00
commit 7d90507420
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 10 additions and 0 deletions

View File

@ -6776,6 +6776,11 @@ or FILE."
',ext-plist)))
(with-temp-buffer
(insert output)
;; Ensure final newline. This is what was done
;; historically, when we used `write-file'.
;; Note that adding a newline is only safe for
;; non-binary data.
(unless (bolp) (insert "\n"))
(let ((coding-system-for-write ',encoding))
(write-region nil nil ,file)))
(or (ignore-errors (funcall ',post-process ,file)) ,file)))
@ -6783,6 +6788,11 @@ or FILE."
backend subtreep visible-only body-only ext-plist)))
(with-temp-buffer
(insert output)
;; Ensure final newline. This is what was done
;; historically, when we used `write-file'.
;; Note that adding a newline is only safe for
;; non-binary data.
(unless (bolp) (insert "\n"))
(let ((coding-system-for-write encoding))
(write-region nil nil file)))
(when (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output))