From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Set org-file-apps to open a *.doc file under linux with Word ? Date: Thu, 05 Dec 2013 08:48:11 +0530 Message-ID: <87vbz4htos.fsf@gmail.com> References: <1981916.uUsSrgBaOc@linux-j9m3.site> <87wqjk2o5l.fsf@alphaville.bos.redhat.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56651) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoPSb-0001rH-Qk for emacs-orgmode@gnu.org; Wed, 04 Dec 2013 22:18:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoPST-0000LJ-Dm for emacs-orgmode@gnu.org; Wed, 04 Dec 2013 22:18:40 -0500 Received: from plane.gmane.org ([80.91.229.3]:43828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoPST-0000LE-6E for emacs-orgmode@gnu.org; Wed, 04 Dec 2013 22:18:33 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VoPSR-0003hE-Pl for emacs-orgmode@gnu.org; Thu, 05 Dec 2013 04:18:31 +0100 Received: from 115.242.206.45 ([115.242.206.45]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Dec 2013 04:18:31 +0100 Received: from kjambunathan by 115.242.206.45 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 05 Dec 2013 04:18:31 +0100 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 Cc: emacs-orgmode@gnu.org Nick Dokos writes: > 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 The easiest way to get the same effect is to use M-x customize-variable RET org-file-apps RET and specify a command. Once it is saved, the .emacs will have the resulting "nightmarish string" :-) ---------------------------------------------------------------- Another way to "quote" a string would be to use M-x pp-eval-expression RET (read-string "Enter string: ") RET and copy-paste the output from *Pp Eval Output* to .emacs or .el file.