emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: AW <alexander.willand@t-online.de>
To: emacs-orgmode@gnu.org
Cc: Nick Dokos <ndokos@gmail.com>
Subject: Re: Set org-file-apps to open a *.doc file under linux with Word ?
Date: Thu, 05 Dec 2013 14:34:37 +0100	[thread overview]
Message-ID: <3075365.i2Pe7OrQSu@linux-j9m3.site> (raw)
In-Reply-To: <87wqjk2o5l.fsf@alphaville.bos.redhat.com>

Am Mittwoch, 4. Dezember 2013, 18:26:46 schrieb Nick Nick Dokos:
> AW <alexander.willand@t-online.de> 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

  parent reply	other threads:[~2013-12-05 13:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04 21:56 Set org-file-apps to open a *.doc file under linux with Word ? AW
2013-12-04 23:26 ` Nick Dokos
2013-12-05  3:12   ` Jambunathan K
2013-12-05  3:18   ` Jambunathan K
2013-12-05 13:36     ` AW
2013-12-05 15:17       ` Jambunathan K
2013-12-05 15:21       ` Jambunathan K
2013-12-05 16:35         ` AW
2013-12-05 16:40           ` Jambunathan K
2013-12-05 13:34   ` AW [this message]
2013-12-05 19:48     ` Achim Gratz
2013-12-05  9:01 ` Achim Gratz
2013-12-05 13:38   ` AW

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3075365.i2Pe7OrQSu@linux-j9m3.site \
    --to=alexander.willand@t-online.de \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).