The signature of org-export-filter functions is (data backend info). I want to write a function that will know if I'm exporting to ascii or latin1 or utf-8. The backend appears to be 'ascii no matter which of the text options I'm using, so I'm wondering what is in the info data.

I'm very new to lisp of any sort so I don't even know how to think about info here. Is that an object, a struct, or something else? How do I dig into it?

I haven't been able to find reference documentation that describes that data structure, I'd be interested if anyone can point me to that.

  • The info parameter in export functions is a kitchen sink of a property list (see "Property lists" in the Elisp manual with C-h i g(elisp)property lists). That gives you the generic structure, but the keys that you can use to query the property list are partly documented here, at least the common ones. Specific export engines may define more and for those I'm afraid you'll have to read the code (ox-ascii.el in the Org mode tree's lisp subdirectory).
    – NickD
    Nov 4 at 14:07
  • If you want all your buffers to be in UTF-8, then just set your LANG variable outside of Emacs to .e.g en_US.utf8 or some variant thereof. That is much simpler than worrying about it for every different buffer.
    – NickD
    Nov 4 at 14:56
  • Try customizing org-ascii-charset to utf-8.
    – NickD
    Nov 4 at 17:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.