You could use a custom file handler to automatically convert the doc file whenever Emacs tries to load it. To do this you need a function like:
(defun antiword-file-handler (name &rest args)
(assert (eq name 'insert-file-contents))
(let ((file-name (expand-file-name (car args))))
(call-process "antiword" nil t nil file-name)
(setq buffer-file-name file-name)
;; This prevents a "File exists, but cannot be read" error:
(set-visited-file-modtime)
;; insert-file-contents should return the filename and size in characters
(list file-name (point))))
and you need to set the following property on it:
(put 'antiword-file-handler 'operations '(insert-file-contents))
finally, add the following to file-name-handler-alist:
("\\.doc" . antiword-file-handler)
Whenever Emacs tries to load a file with a .doc extension it should then decode it by running it through antiword and inserting the contents into the buffer. The above should work (it worked for me) but it may well need extending as there are various other arguments to insert-file-contents that probably ought to be handled correctly...
dired-do-shell-command
with point on file in dired (key!
) proposes to run antiword. The result is displayed in buffer*Shell Command Output*
.