* Attach a Word doc in org mode file @ 2016-01-29 2:13 Eliya Voldman 2016-01-29 4:12 ` Richard Lawrence 2016-01-29 16:07 ` John Kitchin 0 siblings, 2 replies; 4+ messages in thread From: Eliya Voldman @ 2016-01-29 2:13 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 371 bytes --] How could I attach a Word document in my .org file? I could do it for plain text file like C-c C-a but not .doc type. Are there other options to point to Word file in my system other the attach? In other words: attach Word doc is not a problem but the problem is to open it. BTW: is it possible to attach and then open in org mode files other that plain text? Thanks -- [-- Attachment #2: Type: text/html, Size: 486 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Attach a Word doc in org mode file 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 16:07 ` John Kitchin 1 sibling, 1 reply; 4+ messages in thread From: Richard Lawrence @ 2016-01-29 4:12 UTC (permalink / raw) To: Eliya Voldman, emacs-orgmode Hi Eliya, Eliya Voldman <evoldman@gmail.com> writes: > How could I attach a Word document in my .org file? I could do it for plain > text file like C-c C-a but not .doc type. > > In other words: attach Word doc is not a problem but the problem is to open > it. What OS are you on? Windows? OS X? I don't know how exactly Org decides how to open files on your system, but if you're having trouble, I guess you should start by looking up the value of the org-file-apps variable. Try: C-h v org-file-apps > Are there other options to point to Word file in my system other the > attach? You can use a link; see this section of the manual: http://orgmode.org/manual/Hyperlinks.html#Hyperlinks > BTW: is it possible to attach and then open in org mode files other that > plain text? It depends what you mean by "open in org mode". The only files it makes sense to open as Emacs buffers with Org as the major mode are plain text files in Org mode format. But you can open other types of files in Emacs in other modes. And from within an Org mode buffer, you should be able to launch programs other than Emacs (such as Word) that can read other kinds of files, for example by following a link with C-c C-o. Hope that helps! Best, Richard ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CAMgONAVn+CrhHPSDx=_19h5oOzDkwsEHoSY=kkBf2rj=OA4KZw@mail.gmail.com>]
* Re: Attach a Word doc in org mode file [not found] ` <CAMgONAVn+CrhHPSDx=_19h5oOzDkwsEHoSY=kkBf2rj=OA4KZw@mail.gmail.com> @ 2016-01-29 15:33 ` Richard Lawrence 0 siblings, 0 replies; 4+ messages in thread From: Richard Lawrence @ 2016-01-29 15:33 UTC (permalink / raw) To: Eliya Voldman; +Cc: emacs-orgmode 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Attach a Word doc in org mode file 2016-01-29 2:13 Attach a Word doc in org mode file Eliya Voldman 2016-01-29 4:12 ` Richard Lawrence @ 2016-01-29 16:07 ` John Kitchin 1 sibling, 0 replies; 4+ messages in thread From: John Kitchin @ 2016-01-29 16:07 UTC (permalink / raw) To: Eliya Voldman; +Cc: emacs-orgmode You can use a regular link like [[file:some-doc.docx]] If you click on this and see stuff like: M Filemode Length Date Time File - ---------- -------- ----------- -------- ---------------------------- -rw-rw-rw- 1524 1-Jan-1980 00:00:00 [Content_Types].xml -rw-rw-rw- 735 1-Jan-1980 00:00:00 _rels/.rels -rw-rw-rw- 1085 1-Jan-1980 00:00:00 word/_rels/document. Then emacs is just opening the docx file and showing you the contents of the zip file. try this on the link: C-u C-u C-c o or C-u C-u Enter Eliya Voldman writes: > How could I attach a Word document in my .org file? I could do it for plain > text file like C-c C-a but not .doc type. Are there other options to point > to Word file in my system other the attach? > In other words: attach Word doc is not a problem but the problem is to open > it. > BTW: is it possible to attach and then open in org mode files other that > plain text? > Thanks -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-29 16:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 2016-01-29 16:07 ` John Kitchin
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).