From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: Eliya Voldman <evoldman@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Attach a Word doc in org mode file
Date: Fri, 29 Jan 2016 07:33:03 -0800 [thread overview]
Message-ID: <87k2ms8kpc.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <CAMgONAVn+CrhHPSDx=_19h5oOzDkwsEHoSY=kkBf2rj=OA4KZw@mail.gmail.com>
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 <evoldman@gmail.com> 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.
Best,
Richard
next prev parent reply other threads:[~2016-01-29 15:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-29 2:13 Attach a Word doc in org mode file Eliya Voldman
2016-01-29 4:12 ` Richard Lawrence
[not found] ` <CAMgONAVn+CrhHPSDx=_19h5oOzDkwsEHoSY=kkBf2rj=OA4KZw@mail.gmail.com>
2016-01-29 15:33 ` Richard Lawrence [this message]
2016-01-29 16:07 ` John Kitchin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k2ms8kpc.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me \
--to=richard.lawrence@berkeley.edu \
--cc=emacs-orgmode@gnu.org \
--cc=evoldman@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.