From mboxrd@z Thu Jan 1 00:00:00 1970 From: AW Subject: Re: Set org-file-apps to open a *.doc file under linux with Word ? Date: Thu, 05 Dec 2013 14:34:37 +0100 Message-ID: <3075365.i2Pe7OrQSu@linux-j9m3.site> References: <1981916.uUsSrgBaOc@linux-j9m3.site> <87wqjk2o5l.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoZ2r-0001a5-TR for emacs-orgmode@gnu.org; Thu, 05 Dec 2013 08:32:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoZ2l-0007t7-AU for emacs-orgmode@gnu.org; Thu, 05 Dec 2013 08:32:45 -0500 Received: from mailout05.t-online.de ([194.25.134.82]:49633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoZ2l-0007t2-0X for emacs-orgmode@gnu.org; Thu, 05 Dec 2013 08:32:39 -0500 In-Reply-To: <87wqjk2o5l.fsf@alphaville.bos.redhat.com> 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: emacs-orgmode@gnu.org Cc: Nick Dokos Am Mittwoch, 4. Dezember 2013, 18:26:46 schrieb Nick Nick Dokos: > AW writes: > > Hi! ... > 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. > I get no error message, but nothing happens, except Emacs telling me it has run the command. > BTW, why not LibreOffice? Does it mishandle your .doc files? LibreOffice changes the content of word files slightly and for folks who panic if not everything is like expected, that's too much already. You know, if you are the guy who works with LaTeX, word users tend to be somehow narrow minded. However, thank you. I tried something different now: I wrote a bash script, just two lines: #!/bin/bash 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" On the command line "word.sh" works. But in .emacs the lines (add-to-list 'org-file-apps '("\\.docx" . "exec /home/AW/bin/word.sh %s")) don't. What am I doing in the wrong way? Regards, Alexander