I like using org-mode in my packages' Readme files, but I also like
writing instructions under the
;;; Commentary: header that goes in
the source file.
Whenever I change some part of the documentation, the best way I've found to keep those in sync is to:
- Edit the org file first.
- Export to a plain text utf-8 buffer, with the body-only option (
C-c e C-b t U).
;;at the start of each line.
- Copy that over to the package file.
Q: How can I best automate this?
I can write the necessary elisp for adding
;; and copying to the
kill-ring, but I'm not familiar enough with the org-export machinery
to know what's The Right Way to do an automated export using a
Bonus points if there's a command I can invoke from a
.el file which
automatically finds a
Readme.org, does the whole export, and uses it
to replace the file's