On Wed, 18 Mar 2015, hy...@lactose.homelinux.net wrote:

"Charles C. Berry" writes:
  (defun org-export-ascii-filter-code (text back-end info)
  "Replace `\\n' with `\\' in ascii code."
    (if (eq back-end 'ascii)
        (replace-regexp-in-string
         "\n" "\\\n"
         (org-babel-chomp
          (org-export-string-as text 'ascii t))
         nil t)
      text))
  (add-to-list 'org-export-filter-code-functions
               'org-export-ascii-filter-code)

Just for the record.....

I had an open running emacs.  I changed my .emacs file, applied the change
with M-x load-file .emacs , and it worked perfectly.

But today, I opened emacs fresh, and was greeted with an error

Symbol's value as variable is void: org-export-filter-code-functions

I got the same error when I tried to M-x load-file .emacs

But

After I did an ascii export (in which the backslashes do not appear), I could
then M-x load-file .emacs, no error, and the backslashes worked.

I added
(require 'ox)
to my .emacs file, and that resolved the problem.


Use

#+BEGIN_SRC emacs-lisp
  (eval-after-load 'ox
    '(add-to-list
      'org-export-filter-code-functions
      'org-export-ascii-filter-code))
#+END_SRC


Chuck

Reply via email to