emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Opening a LibreOffice file


From: Karl Voit
Subject: [O] Opening a LibreOffice file
Date: Mon, 2 Jan 2017 21:49:00 +0100
User-agent: slrn/pre1.0.0-18 (Linux)

Hi!

I am unsure why but with my configuration, I can't open a
LibreOffice odp file.

By default, Emacs was showing me the content of the odp file as a
ZIP file, which is technically true but not helpful.

John Kitchin suggested setting org-file-apps manually. Here are the
results:

(setq org-file-apps '(
 ("\\.odp" . "/usr/bin/xdg-open %s")
    ;; Running xdg-open /home/user/path/2008-06-17_Bachelor_II.odp...done -> 
nothing opens
 ;;("\\.odp" . "/usr/lib/libreoffice/program/soffice %s") ;; opens LibreOffice 
with General I/O Error
 ;;("\\.odp\\'" . default) ;; runs odp2txt without any resulting file
 ;;("\\.odp" . "/home/vk/myodp.sh %s") ;; see below
 ("\\.png\\'" . default) ;; works: geeqie
 ("\\.jpg\\'" . default) ;; works: geeqie
 ("\\.jpeg\\'" . default) ;; works: geeqie
 (auto-mode . emacs) ;; whatever ;-)
 ("\\.pdf\\'" . default) ;; works: okular
))

As you can see, graphic files and PDF files works as expected.

The file "/home/user/path/2008-06-17_Bachelor_II.odp" exists and works with
manually invoking "xdg-open" or "libreoffice".

The configuration with "default", "open", or "xdg-open" writes a success
message but nothing happens: no app opens.

As you can see, I also tried a self-written wrapper script to debug the
situation:

,----[ myodp.sh ]
| #!/bin/sh
|
| echo "===========================================" >> ~/myodp.log
| echo "${1}" >> ~/myodp.log
| echo "DISPLAY: $DISPLAY" >> ~/myodp.log
| date >> ~/myodp.log
| /usr/bin/xdg-open "${1}" 2>&1 >>~/myodp.log
| date >> ~/myodp.log
| echo "end" >> ~/myodp.log
`----

Its log output does not look suspicious nor is an error logged. The two date
outputs are always to the same second. No time-out or similar in between.

,----[ content of myodp.log ]
| ===========================================
| /home/user/path/2008-06-17_Bachelor_II.odp
| DISPLAY: :0.0
| Mon Jan  2 20:55:05 CET 2017
| Mon Jan  2 20:55:05 CET 2017
| end
`----

Do you have an idea what I can do to kick-start LibreOffice?

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
       > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




reply via email to

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