0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-29 18:00:49 +00:00

ox-ascii: Add missing ASCII and UTF-8 conversion functions

* lisp/ox-ascii.el (org-ascii-convert-region-to-ascii):
(org-ascii-convert-region-to-utf8): New functions.
* doc/org-manual.org (Export in Foreign Buffers): Document new
  functions.

Reported-by: Alexander Adolf <alexander.adolf@condition-alpha.com>
<http://lists.gnu.org/r/emacs-orgmode/2018-10/msg00294.html>
This commit is contained in:
Nicolas Goaziou 2018-10-25 16:53:30 +02:00
parent b886ebbc89
commit 4832a432f0
2 changed files with 24 additions and 0 deletions

View file

@ -15238,6 +15238,16 @@ regions. A convenient feature of this in-place conversion is that the
exported output replaces the original source. Here are such
functions:
- ~org-ascii-convert-region-to-ascii~ ::
#+findex: org-ascii-convert-region-to-ascii
Convert the selected region into ASCII.
- ~org-ascii-convert-region-to-utf8~ ::
#+findex: org-ascii-convert-region-to-utf8
Convert the selected region into UTF-8.
- ~org-html-convert-region-to-html~ ::
#+findex: org-html-convert-region-to-html

View file

@ -2064,6 +2064,20 @@ a communication channel."
;;; End-user functions
;;;###autoload
(defun org-ascii-convert-region-to-ascii ()
"Assume region has Org syntax, and convert it to plain ASCII."
(interactive)
(let ((org-ascii-charset 'ascii))
(org-export-replace-region-by 'ascii)))
;;;###autoload
(defun org-ascii-convert-region-to-utf8 ()
"Assume region has Org syntax, and convert it to UTF-8."
(interactive)
(let ((org-ascii-charset 'utf-8))
(org-export-replace-region-by 'ascii)))
;;;###autoload
(defun org-ascii-export-as-ascii
(&optional async subtreep visible-only body-only ext-plist)