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
darc...@gmail.com


_______________________________________________
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

Reply via email to