all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs rmail. How to convert .doc to plain text
@ 2002-11-22  4:32 Don Saklad
  2002-11-22 22:06 ` Zap Branigan
  2002-11-23 18:25 ` Benjamin Riefenstahl
  0 siblings, 2 replies; 8+ messages in thread
From: Don Saklad @ 2002-11-22  4:32 UTC (permalink / raw)


How do you convert .doc to plain text in emacs rmail?...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: emacs rmail. How to convert .doc to plain text
  2002-11-22  4:32 emacs rmail. How to convert .doc to plain text Don Saklad
@ 2002-11-22 22:06 ` Zap Branigan
  2002-11-23  6:57   ` Don Saklad
  2002-11-23 18:25 ` Benjamin Riefenstahl
  1 sibling, 1 reply; 8+ messages in thread
From: Zap Branigan @ 2002-11-22 22:06 UTC (permalink / raw)


>>>>> "Don" == Don Saklad <dsaklad@nestle.ai.mit.edu> writes:

    Don> How do you convert .doc to plain text in emacs rmail?... 

When people send me .doc attachments, I usually reply to them asking
them not to send me things in such proprietary formats as I am unable
to read.  I understand that such a course is not always open to other
people, though.  This little filter works acceptably for text documents
but not so well if there are graphics in the .doc:

     http://sal.kachinatech.com/G/2/WORD2X.html


 
--
Consider yon black dog, ranging thru stubble and shoot,
Meseems he coileth magic meshes 
To be a sometime fetter 'round out feet.
The circle narrows.  He draws near!                        _Faust_  

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: emacs rmail. How to convert .doc to plain text
  2002-11-22 22:06 ` Zap Branigan
@ 2002-11-23  6:57   ` Don Saklad
  0 siblings, 0 replies; 8+ messages in thread
From: Don Saklad @ 2002-11-23  6:57 UTC (permalink / raw)


Thank you Zap Branigan!

. How exactly do you use this?...
  http://sal.kachinatech.com/G/2/WORD2X.html


. Boston City Council sends out regular notices about their
  proceedings and notices about upcoming Council Committees
  hearings. People who prepare the notices appear not to know what
  you're talking about when asked to send plain text
  http://cityofboston.gov/citycouncil

  The training there is limited that they don't know all the features
  of their software, just how to do a few operations in some formats.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: emacs rmail. How to convert .doc to plain text
  2002-11-22  4:32 emacs rmail. How to convert .doc to plain text Don Saklad
  2002-11-22 22:06 ` Zap Branigan
@ 2002-11-23 18:25 ` Benjamin Riefenstahl
  2002-11-24 10:01   ` Puff Addison
  2002-11-24 11:41   ` Don Saklad
  1 sibling, 2 replies; 8+ messages in thread
From: Benjamin Riefenstahl @ 2002-11-23 18:25 UTC (permalink / raw)


Hi Don,


Don Saklad <dsaklad@nestle.ai.mit.edu> writes:
> How do you convert .doc to plain text in emacs rmail?...

I am fond of antiword (http://www.winfield.demon.nl/) for displaying
Word files in emacs.  If you like that I can post what I have to
integrate it into my Emacs setup. 


so long, benny

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: emacs rmail. How to convert .doc to plain text
  2002-11-23 18:25 ` Benjamin Riefenstahl
@ 2002-11-24 10:01   ` Puff Addison
  2002-11-24 17:08     ` Benjamin Riefenstahl
  2002-11-24 11:41   ` Don Saklad
  1 sibling, 1 reply; 8+ messages in thread
From: Puff Addison @ 2002-11-24 10:01 UTC (permalink / raw)


Benjamin Riefenstahl wrote:

>Hi Don,
>
>
>Don Saklad <dsaklad@nestle.ai.mit.edu> writes:
>  
>
>>How do you convert .doc to plain text in emacs rmail?...
>>    
>>
>
>I am fond of antiword (http://www.winfield.demon.nl/) for displaying
>Word files in emacs.  If you like that I can post what I have to
>integrate it into my Emacs setup. 
>
>
>so long, benny
>  
>
Yes, please post your Emacs integration code.

-- 
J. D. Addison
email puff@theaddisons.demon.co.uk 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: emacs rmail. How to convert .doc to plain text
  2002-11-23 18:25 ` Benjamin Riefenstahl
  2002-11-24 10:01   ` Puff Addison
@ 2002-11-24 11:41   ` Don Saklad
  2002-11-24 17:01     ` Benjamin Riefenstahl
  1 sibling, 1 reply; 8+ messages in thread
From: Don Saklad @ 2002-11-24 11:41 UTC (permalink / raw)
  Cc: Benjamin.Riefenstahl, dsaklad

Thank you Benjamin Riefenstahl !   Are you related to the filmmaker?...

Either from a message in emacs rmail or from a message in yahoo mail
where are there web or email based ways to convert .doc to plain text
or to html ?...

It would be in the manner of other online conversion tools, for example
http://preprints.cern.ch/Convert?emailGuide

or like
http://www.adobe.com/products/acrobat/access_onlinetools.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: emacs rmail. How to convert .doc to plain text
  2002-11-24 11:41   ` Don Saklad
@ 2002-11-24 17:01     ` Benjamin Riefenstahl
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Riefenstahl @ 2002-11-24 17:01 UTC (permalink / raw)


Hi Don,


Don Saklad <dsaklad@nestle.ai.mit.edu> writes:
> Are you related to the filmmaker?...

Not that I am aware of. 

> Either from a message in emacs rmail or from a message in yahoo mail
> where are there web or email based ways to convert .doc to plain
> text or to html ?...

I don't know about yahoo mail, but rmail might be able to use the
Emacs binding I am just about to post.  I do know that it basically
works for Gnus. 


so long, benny

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: emacs rmail. How to convert .doc to plain text
  2002-11-24 10:01   ` Puff Addison
@ 2002-11-24 17:08     ` Benjamin Riefenstahl
  0 siblings, 0 replies; 8+ messages in thread
From: Benjamin Riefenstahl @ 2002-11-24 17:08 UTC (permalink / raw)


Hi,

Puff Addison <puff@theaddisons.demon.co.uk> writes:
> Yes, please post your Emacs integration code.

Ok, see below.  I should note that it is probably also possible to
(ab-)use jka-compr for this, which would make my two functions
obsolete.

so long, benny

>>>>>>>

(defun benny-antiword-file-handler (operation &rest args)
  ;; First check for the specific operations
  ;; that we have special handling for.
  (cond ((eq operation 'insert-file-contents)
	 (apply 'benny-antiword-insert-file args))
	((eq operation 'file-writable-p)
	 nil)
	((eq operation 'write-region)
	 (error "Word documents can't be written"))
	;; Handle any operation we don't know about.
	(t (let ((inhibit-file-name-handlers
		  (cons 'benny-antiword-file-handler
			(and (eq inhibit-file-name-operation operation)
			     inhibit-file-name-handlers)))
		 (inhibit-file-name-operation operation))
	     (apply operation args)))))

(defun benny-antiword-insert-file (filename &optional visit beg end replace)
  (set-buffer-modified-p nil)
  (setq buffer-file-name (file-truename filename))
  (setq buffer-read-only t)
  (let ((start (point))
	(inhibit-read-only t))
    (if replace (delete-region (point-min) (point-max)))
    (save-excursion
      (let ((coding-system-for-read 'utf-8)
	    (filename (encode-coding-string
		       buffer-file-name
		       (or file-name-coding-system
			   default-file-name-coding-system))))
	(call-process "antiword" nil t nil "-m" "UTF-8.txt"
		      filename))
      (list buffer-file-name (- (point) start)))))

(setq file-name-handler-alist
      (cons '("\\.doc\\'" . benny-antiword-file-handler)
	    file-name-handler-alist))

<<<<<<<

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-11-24 17:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-22  4:32 emacs rmail. How to convert .doc to plain text Don Saklad
2002-11-22 22:06 ` Zap Branigan
2002-11-23  6:57   ` Don Saklad
2002-11-23 18:25 ` Benjamin Riefenstahl
2002-11-24 10:01   ` Puff Addison
2002-11-24 17:08     ` Benjamin Riefenstahl
2002-11-24 11:41   ` Don Saklad
2002-11-24 17:01     ` Benjamin Riefenstahl

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.