[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?
From: |
Nick Dokos |
Subject: |
Re: [O] Set org-file-apps to open a *.doc file under linux with Word ? |
Date: |
Wed, 04 Dec 2013 18:26:46 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
AW <address@hidden> writes:
> Hi!
>
> I'm using orgmode as a replacement for folders, you know, real folders, lots
> of paper inside.
>
> In my orgfiles I link to many other files, mostly *.tex and *.pdf, links look
> like
>
> [[./foo.pdf][About foo]]
>
> Sometimes I can't avoid to link to doc or docx files. So I need my linux pc
> to
> start word and load a certain file.
>
> I'd like to link to *.doc files in the same way:
>
> [[./bar.doc][About that draft]]
>
> But how can I set org-file-apps to open a *.doc file with MS Word under
> Linux?
> Word works, more or less.
>
> To start word the command is:
>
> env WINEPREFIX="/home/AW/.wine-office" wine "C:\windows\command\start.exe"
> /Unix
> "/home/AW/.wine-office/dosdevices/c:/users/AW/Start Menu/Programs/Microsoft
> Office/Microsoft Word 2010.lnk"
>
> But how in the world can I put in my .emacs file? I tried:
>
> (add-to-list 'org-file-apps
> '("\\.doc" . "\"env WINEPREFIX="/home/AW/.wine-office" wine
> "C:/windows/command/start.exe"
> /Unix "/home/AW/.wine-office/dosdevices/c:/users/AW/Start
> Menu/Programs/Microsoft Office/Microsoft Word 2010.lnk"\" %s"))
>
Off the top of my head, I would say
(add-to-list 'org-file-apps
'("\\.doc" . "env WINEPREFIX=\"/home/AW/.wine-office\" wine
\"C:\\windows\\command\\start.exe\" /Unix
\"/home/AW/.wine-office/dosdevices/c:/users/AW/Start Menu/Programs/Microsoft
Office/Microsoft Word 2010.lnk\""))
i.e. just the command you provided enclosed in double quotes, except that
certain characters within have to be escaped:
" -> \"
\ -> \\
The long string will probably be broken up into multiple lines by some
mailer but it is supposed to be one long string with no newlines. I
don't know if the spaces in the path will cause problems.
Untested (except that I did evaluate the add-to-list and got no errors):
no Word and no wine here.
BTW, why not LibreOffice? Does it mishandle your .doc files?
Nick
- [O] Set org-file-apps to open a *.doc file under linux with Word ?, AW, 2013/12/04
- Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?,
Nick Dokos <=
- Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, Jambunathan K, 2013/12/04
- Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, AW, 2013/12/05
- Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, Jambunathan K, 2013/12/05
- Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, Jambunathan K, 2013/12/05
- Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, AW, 2013/12/05
- Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, Jambunathan K, 2013/12/05
Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, AW, 2013/12/05
Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, Jambunathan K, 2013/12/05
Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?, Achim Gratz, 2013/12/05