emacs-orgmode
[Top][All Lists]
Advanced

[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: Jambunathan K
Subject: Re: [O] Set org-file-apps to open a *.doc file under linux with Word ?
Date: Thu, 05 Dec 2013 08:48:11 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Nick Dokos <address@hidden> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]