Function: org-ascii-plain-text

org-ascii-plain-text is a byte-compiled function defined in ox-ascii.el.gz.

Signature

(org-ascii-plain-text TEXT INFO)

Documentation

Transcode a TEXT string from Org to ASCII.

INFO is a plist used as a communication channel.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-ascii.el.gz
;;;; Plain Text

(defun org-ascii-plain-text (text info)
  "Transcode a TEXT string from Org to ASCII.
INFO is a plist used as a communication channel."
  (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
    (when (and utf8p (plist-get info :with-smart-quotes))
      (setq text (org-export-activate-smart-quotes text :utf-8 info)))
    (if (not (plist-get info :with-special-strings)) text
      (setq text (replace-regexp-in-string "\\\\-" "" text))
      (if (not utf8p) text
	;; Usual replacements in utf-8 with proper option set.
	(replace-regexp-in-string
	 "\\.\\.\\." "…"
	 (replace-regexp-in-string
	  "--" "–"
	  (replace-regexp-in-string "---" "—" text)))))))