Nick Dokos <ndo...@gmail.com> 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.