emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* external link to openoffice.org file
@ 2009-09-20 15:28 Christoph Herzog
  2009-09-20 18:11 ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Herzog @ 2009-09-20 15:28 UTC (permalink / raw)
  To: emacs-orgmode

Having a poor understanding of emacs because I started to use it with 
org-mode recently, I wonder whether there is a better way to make 
external links to openoffice.org files than
[[shell: ooffice -writer /path/to/document.odt]]

I also wonder whether it is possible to attach other than 
emacs-compatible files?

Christoph

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: external link to openoffice.org file
  2009-09-20 15:28 external link to openoffice.org file Christoph Herzog
@ 2009-09-20 18:11 ` Darlan Cavalcante Moreira
  0 siblings, 0 replies; 2+ messages in thread
From: Darlan Cavalcante Moreira @ 2009-09-20 18:11 UTC (permalink / raw)
  To: Christoph Herzog; +Cc: emacs-orgmode

At Sun, 20 Sep 2009 17:28:54 +0200,
Christoph Herzog wrote:
> 
> Having a poor understanding of emacs because I started to use it with 
> org-mode recently, I wonder whether there is a better way to make 
> external links to openoffice.org files than
> [[shell: ooffice -writer /path/to/document.odt]]
> 
> I also wonder whether it is possible to attach other than 
> emacs-compatible files?
> 
> Christoph
> 
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

I often put some links to .odt and .doc files in my org files.
At first i created a link type for open office with

#+LINK: OO elisp:(abrir-no-openoffice "%s")

where the function "abrir-no-openoffice" is defined as

(defun abrir-no-openoffice (documento)
  (start-process-shell-command 
   "openoffice" 
   "*scratch*" 
   (concat "openoffice.org -o " documento)))

With this i can simple use
[[OO:path_to_some_file_openoffice_understands][Description]], but I still have
to answer "yes" to open the file, since org-mode will execute a shell function.

Only later I realized that this is not necessary. I can simple use
[[some_file][Description]] and org-mode will use the information in the mailcap
file to open the file with the correct program, in this case openoffice.

-- 
Darlan Cavalcante Moreira
darcamo@gmail.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-20 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-20 15:28 external link to openoffice.org file Christoph Herzog
2009-09-20 18:11 ` Darlan Cavalcante Moreira

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).