org-batch-test-init.el 552 B

123456789101112131415161718192021
  1. ;;
  2. ;; Remove Org remnants built into Emacs
  3. ;;
  4. ;; clean load-path
  5. (setq load-path
  6. (delq nil (mapcar
  7. (function (lambda (p)
  8. (unless (string-match "lisp\\(/packages\\)?/org$" p)
  9. p)))
  10. load-path)))
  11. ;; remove property list to defeat cus-load and remove autoloads
  12. (mapatoms (function (lambda (s)
  13. (let ((sn (symbol-name s)))
  14. (when (string-match "^\\(org\\|ob\\|ox\\)\\(-.*\\)?$" sn)
  15. (setplist s nil)
  16. (when (eq 'autoload (car-safe s))
  17. (unintern s)))))))
  18. ;; we should now start from a clean slate