From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Attach a Word doc in org mode file Date: Fri, 29 Jan 2016 07:33:03 -0800 Message-ID: <87k2ms8kpc.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> References: <87a8nprpkx.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPB2G-0007lk-Bt for emacs-orgmode@gnu.org; Fri, 29 Jan 2016 10:32:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPB2C-0005b2-6o for emacs-orgmode@gnu.org; Fri, 29 Jan 2016 10:32:32 -0500 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:35500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPB2B-0005ad-RN for emacs-orgmode@gnu.org; Fri, 29 Jan 2016 10:32:28 -0500 Received: by mail-pa0-x232.google.com with SMTP id ho8so43012316pac.2 for ; Fri, 29 Jan 2016 07:32:27 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eliya Voldman Cc: emacs-orgmode@gnu.org 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 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