Hello once more, On Wed, Feb 27, 2013 at 08:28:43PM +0100, Thomas Wallrafen wrote: > Hej, > > On Wed, Feb 27, 2013 at 08:14:13PM +0100, Salve Håkedal wrote: > > My main machine don't have openoffice or similar installed, but > > sometimes I need to use openoffice on an attachment. I now do that by > > scp-ing files to that machine and then ssh -X into that machine. > > > > To scp an attachment to the other machine, I first save it from the > > attachment menu. I'd like to skip this step. > > > > Is it possible to scp an attachment directly from mutt? > > Well, you could try at least something like below: > > macro attach ,p '<pipe-entry>ssh -X user@remotehost "cat - > ~/out.odt; > oowriter ~/out.odt"<enter> > > So you can type ,p upon the attachment and get it opened on the remote > host. > > Obvious drawback is the hard coded program on the remote host - but > that should be easily replacable by sth acting dependent upon the file > extension.
ok, the latter was rubbish because afaik you will not be able to set the file name on the remote host dynamically. However, you could still (a) define one macro per file extension or (b) try to use file(1) to invoke the right program. bye, thomas