I guess a solution used for browsing html attachments (discussed
here some time ago; see attached perl script) may be adapted for
running libreoffice. The main idea would be to make a copy of the
file, send it to libreoffice and sleep a short time before returning
to mutt,
Regards,
Luis


On Fri, Jun 22, 2012 at 10:52:08AM -0300, Marcelo Laia wrote:
> Hi
> 
> 2012/6/22 steve <[email protected]>:
> > Have you found a solution?
> 
> Unfortunately, no!
> 
> 
> -- 
> Marcelo Luiz de Laia

-- 

                                                                  o
W. Luis Mochán,                      | tel:(52)(777)329-1734     /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388     `>/   /\
Apdo. Postal 48-3, 62251             |                           (*)/\/  \
Cuernavaca, Morelos, México          | [email protected]   /\_/\__/

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org                 


#!/usr/bin/env perl

use warnings;
use strict;

# SYNOPSIS
#       mutt_browse file
#
# DESCRIPTION
#       Runs a browser on a copy of a file, and sleeps for a while
#       before deleting it. It solves the problem that mutt may delete
#       the file too fast.
# EXAMPLE
#       To use a sensible browser to view HTML attachments from mutt, add the
#       following line to the .mailcap file.
#
#       text/html;      /path/to/mutt_browse %s
#
# AUTHOR
#       Luis Mochan <[email protected]>
#       Shamelessly adapted from mutt_netscape by
#       Gary A. Johnson <[email protected]>
# 
# WARNING
#       This program has been tested in a Debian system
#       The temporal file is created in the /tmp directory
#       

############################
# Variables to be customized
#
# template filename for temporal file
my $template="muttXXXXX"; 

# Path to desired browser. Under Debian sensible-browser defaults to
# my prefered browser, but an explicit choice such as chrome,
# iceweasel, etc. may be used here.
my $browser="/usr/bin/sensible-browser"; 

# Delay to give time for browser to read file before it is destroyed
my $delay=3; #in seconds
#
# End of customizations
############################

use File::Temp qw(tempfile);

die <<"EOF" unless @ARGV==1;
Usage $0 file
      to run a sensible-browser over copy of file
EOF
die "Can't read $ARGV[0]" unless -r $ARGV[0];
my ($fh, $fname) = tempfile($template, DIR=>"/tmp", SUFFIX=>".html", 
                            UNLINK=>1);
open IN, "<", $ARGV[0];
while(<IN>){
    print $fh $_;
}
close $fh;
system $browser, $fname;
sleep $delay; 

Reply via email to