emacs-unoffice

Emacs library to reclaim text from office documents (abw, odt, docx).
Log | Files | Refs

commit fe424f55bacbb9e33a99945b7155c14f93c22bc3
parent 86ed6bb7133d23b4a4787fdbe389d603d389a7c7
Author: Tomas Hlavaty <tom@logand.com>
Date:   Mon, 25 Jan 2021 23:40:09 +0100

use view-mode

The file should not be modified anyway and view-mode offers more
convenient keys.

Diffstat:
Memacs-unoffice.el | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/emacs-unoffice.el b/emacs-unoffice.el @@ -19,6 +19,7 @@ (require 'arc-mode) (require 'cl) +(require 'view) (require 'xml) (defun unabw () @@ -33,7 +34,8 @@ (t (mapc #'rec (cddr x))))))) (rec (car (xml-parse-file buffer-file-name))))) (setq buffer-read-only t) - (goto-char (point-min))) + (goto-char (point-min)) + (view-mode)) (defun unodt () (interactive) @@ -53,7 +55,8 @@ (when (zerop (archive-zip-extract f "content.xml")) (car (xml-parse-region)))))))) (setq buffer-read-only t) - (goto-char (point-min))) + (goto-char (point-min)) + (view-mode)) (defun undocx () (interactive) @@ -80,6 +83,7 @@ (zerop (archive-zip-extract f "document.xml"))) (car (xml-parse-region))))))))) (setq buffer-read-only t) - (goto-char (point-min))) + (goto-char (point-min)) + (view-mode)) (provide 'unoffice)