Practical Solutions for Handling Docx Files in Emacs
(add-to-list 'auto-mode-alist '("\\.docx\\'" . docx2txt))
(defundocx2txt ()
"Run docx2txt on the entire buffer."
(shell-command-on-region (point-min) (point-max) "docx2txt" t t))
(provide 'docx2txt)
;; ;; CONVERT DOCX TO MARKDOWN
(defundired-pandoc-docx-md ()
(interactive)
(dired-do-async-shell-command
"pandoc -f docx -t markdown --wrap=none" current-prefix-arg
(dired-get-marked-files t current-prefix-arg)))
;; and to do the same with odt files
(defundired-pandoc-odt-md ()
(interactive)
(dired-do-async-shell-command
"pandoc -f odt -t markdown --wrap=none" current-prefix-arg
(dired-get-marked-files t current-prefix-arg)))
(use-packageox-pandoc:ensure t
:config
(require 'ox-pandoc)
)