[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Attach a Word doc in org mode file

From: Richard Lawrence
Subject: Re: [O] Attach a Word doc in org mode file
Date: Fri, 29 Jan 2016 07:33:03 -0800
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)

Hi Eliya,

(I'm sending my reply to the list; please use reply-all or similar so
your responses go to the list, too.)

Eliya Voldman <address@hidden> writes:

> I'm using Windows OS.
> I'm using Emacs package from Cygwin hence I open any file types e.g. .doc
> using %cygstart.exe file.docx

I don't know anything about Cygwin (or Windows, really), but this looks
strange to me.  What does cygstart.exe do?  I would think you would want
a command like

word.exe file.docx

Maybe Cygwin has another way of starting Word?

> I never used to open file from Emacs buffer and I don't know how to open it
> from Emacs itself.
> It looks that text file Org opens with no problem but other type of file
> should be opened differently ( I think so )

Yes, presumably.

> I checked C-h v org-file-apps but it does not look straightforward for me
> how to set it up to open Word type file.

If it's not working automatically, then you probably need to add a
clause like

("\\.docx\\'" . "word.exe %s")

But I don't know what the second part (the command) should be; I'm not
even sure that it's possible to tell Word to open a file from the
command line.  I don't use Word, but maybe someone else will know.

By the way, I'm not sure what your reasons for running Emacs from Cygwin
are, but you *might* have better luck if you just run Emacs for Windows.
If Emacs is not running inside Cygwin, the system "open" command might
automatically work on Word files.  This is just a guess.

> When I tried to use 'link' ... it worked and followed the link but opened
> not the Word file but rather directory with a bunch of .xml files hence I
> was not able to open that file.

That's because, if I understand correctly, a .docx file is really just a
.zip archive with a bunch of .xml files inside.  Emacs knows how to open
a .zip archive, so it's showing you the internal .xml files in the
.docx.  (Which you *could* theoretically edit by hand, using Emacs...)

But that's not what you want.  You want to launch Word, right?  Or do
you have another program that you want to use to read Word files?

> Well I understood from your reply that *only* plain text file could be
> opened in Org major mode ( and it worked for me)
> I tried to use Emacs to open Word file by using C-c C-o but it again opened
> me a list of .xml file and not the Word file.

Yes, same explanation: Emacs sees the .docx as a .zip archive containing
those .xml files.

> Hence the question is: how to open Word file from emacs or Org mode?

The next thing you need to figure out is how to launch Word from the
command line in your environment, I think.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]