Re: can't read attached file docx
On 25.04.12,17:53, Gerard ROBIN wrote: ... > ensure that it matches what you have in your mailcap. > > Chris > = > I did this experiment: > > 1 I saved the attached file Cher.docx (that I see correctly with libreoffice.) > > 2 I sent to myself a message with the file Cher.docx as an attachment. > > 3 I downloaded this message, the I opened the attached file (in mutt) > and this time it is libreoffice that opens the file Cher.docx. (as expected) > > Conclusion: > it is the one who sends me the message that causes the problem. > > Is my reasoning correct ? > > Macelo > == > > I encounter the same problem as you: > > If a file is already open with libreoffice I can not open the > attachment Cher.docx (with mutt) I get the message of libreoffice: > /home/user/.tmp/Cher.docx doesn't exist. > > But when I close libreoffice I can read the file Cher.docx with > libreoffice (with mutt as an attachment) > I have these entries for docx files in my ~/.mailcap: application/vnd.msword; mutt_bgrun libreoffice3.5 %s; #test=RunningX application/vnd.openxmlformats-officedocument.wordprocessingml.document; mutt_bgrun libreoffice3.5 %s; #test=RunningX You might check out the mutt_bgrun script as well to make it work. Jostein
mutt deletes attachement before libreoffice tries to open it
On Wed, 25 Apr 2012, David Haguenauer wrote: > > Sometime I got the same problem here. However, I see that I only get > > this issue when libreoffice is already running! > > I believe this is a different issue. What probably happens in your > in your case ... > ... if LibreOffice is already running, Mutt's call does > not start a new instance; rather, the second invocation returns very > quickly after forwarding the filename to the existing LibreOffice > instance: there is a race condition between Mutt (that deletes the > attachment file) and LibreOffice (that tries to open it). Yes! You are right! This is a different issue and mutt deletes the attachment before libreoffice tries to open it. So, I have oppened a new thread. -- O___ - Marcelo Luiz de Laia c/ /'_ - Diamantina (*) \(*)- Minas Gerais ~- Brazil ^- Linux user number 487797
Re: can't read attached file docx
On Wed, Apr 25, 2012 at 04:46:01PM -0400, Nathan Stratton Treadway wrote: > On Wed, Apr 25, 2012 at 07:18:17 +0100, Chris Burdess wrote: > > mutt won't care about the contents of the file, it only looks at the > > mime type and encoding. In your example above the content-type is > > truncated. You need to look at the complete content-type string and > > ensure that it matches what you have in your mailcap. > > In case it's not obvious, here are two possible ways to see the complete > Content-Type string: You can also, from the index, hit 'e' to edit the message, and see the full text of the e-mail. -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience. pgpOX4JoyRspg.pgp Description: PGP signature
Re: can't read attached file docx
* Marcelo Laia , 2012-04-25 08:25:06 Wed: > 2012/4/24 Gerard ROBIN : > > When I receive a message with a attached .docx file, sometime I can read > > it with libreoffice and sometime I get: [Sometimes, Gérard gets "No matching mailcap entry found."] > Sometime I got the same problem here. However, I see that I only get > this issue when libreoffice is already running! I believe this is a different issue. What probably happens in your case is that, when Mutt starts LibreOffice, it blocks until LibreOffice returns (probably when you close it), after which Mutt destroys the temporary file it created for the e-mail attachment. On the other hand, if LibreOffice is already running, Mutt's call does not start a new instance; rather, the second invocation returns very quickly after forwarding the filename to the existing LibreOffice instance: there is a race condition between Mutt (that deletes the attachment file) and LibreOffice (that tries to open it). -- David Haguenauer pgpo34TnfF9jc.pgp Description: Digital signature
Re: can't read attached file docx
On Wed, Apr 25, 2012 at 07:18:17 +0100, Chris Burdess wrote: > mutt won't care about the contents of the file, it only looks at the > mime type and encoding. In your example above the content-type is > truncated. You need to look at the complete content-type string and > ensure that it matches what you have in your mailcap. In case it's not obvious, here are two possible ways to see the complete Content-Type string: 1) enter the Attachment menu (eg press the "v" key), select the attachment in question, then press Ctrl-E to invoke the "edit-type" function. You will be presented a line of text to edit, which will include the full Content-Type string for that attachment. (You can then press Ctrl-G to abort the edit.) 2) when you are viewing the message in the index or the pager, you can use the "|" command to pipe the message to the command grep Content-Type: ; that will show you the Content-Type lines for the message as a whole as well as each of the attachments. Nathan
Re: can't read attached file docx
> that's what is there in my mailcap file: > > application/vnd.openxmlformats- > officedocument.wordprocessingml.document; soffice -no-oosplash --writer > '%s'; edit=soffice -no-oosplash --writer '%s'; test=test -n "$DISPLAY"; > description="Office Open XML Document"; nametemplate=%s.docx > > but in fact the spaces in the name of my file does not matter because I > have the same problem with the file attached: > A Cher.docx [applica/vnd.openxm, > base64, 16K] > > > Gerard, it would be helpful if you posted the error that mutt > displays > > when it fails. > > mutt doesn't fail, it simply can't use libreoffice to display the file > Cher.docx : > > No matching mailcap entry found. Viewing as text. > > Perhaps this is due to the bad quality of some files .docx ? If' it's complaining that there's no matching mailcap entry, your most likely problem is that there's no matching mailcap entry. The two examples you provided display a truncated MIME type. They may appear to match based on those truncated MIME types, but most likely they are different. smime.p7s Description: S/MIME cryptographic signature
Re: can't read attached file docx
On Wed, Apr 25, 2012 at 07:18:17AM +0100, Chris Burdess wrote: > Date: Wed, 25 Apr 2012 07:18:17 +0100 > From: Chris Burdess > To: Gerard ROBIN > Cc: mutt-users@mutt.org > Subject: Re: can't read attached file docx > X-Mailer: Evolution 3.2.2-1 > > Gerard ROBIN wrote: > > > > >When I receive a message with a attached .docx file, sometime I can > > > > >read it with libreoffice and sometime I get: No matching mailcap > > > > >entry found. Viewing as text. > > > > > > > > > >For exemple this file is viewed with libreoffice: > > > > > > > > > >A Rapport.docx [applica/vnd.openxm, base64, > > > > >1,3M] > > > > > > > > > >but this one is viewed as text: > > > > > > > > > >A Sortie 1er mai 2012.docx [applica/vnd.openxm, > > > > >base64, > > > > >17K] > > > > > > > > > > I think you're on the right track though; I'm betting that there is an > > > entry but there are no quotes around the %s in that entry, causing the > > > system command to fail. > > > > that's what is there in my mailcap file: > > > > application/vnd.openxmlformats-officedocument.wordprocessingml.document; > > soffice -no-oosplash --writer '%s'; > > edit=soffice -no-oosplash --writer '%s'; test=test -n "$DISPLAY"; > > description="Office Open XML Document"; nametemplate=%s.docx > > > > but in fact the spaces in the name of my file does not matter because I > > have > > the same problem with the file attached: > > A Cher.docx [applica/vnd.openxm, base64, 16K] > > > > > Gerard, it would be helpful if you posted the error that mutt displays > > > when it fails. > > > > mutt doesn't fail, it simply can't use libreoffice to display the file > > Cher.docx : > > > > No matching mailcap entry found. Viewing as text. > > > > Perhaps this is due to the bad quality of some files .docx ? > > mutt won't care about the contents of the file, it only looks at the > mime type and encoding. In your example above the content-type is > truncated. You need to look at the complete content-type string and > ensure that it matches what you have in your mailcap. Chris = I did this experiment: 1 I saved the attached file Cher.docx (that I see correctly with libreoffice.) 2 I sent to myself a message with the file Cher.docx as an attachment. 3 I downloaded this message, the I opened the attached file (in mutt) and this time it is libreoffice that opens the file Cher.docx. (as expected) Conclusion: it is the one who sends me the message that causes the problem. Is my reasoning correct ? Macelo == I encounter the same problem as you: If a file is already open with libreoffice I can not open the attachment Cher.docx (with mutt) I get the message of libreoffice: /home/user/.tmp/Cher.docx doesn't exist. But when I close libreoffice I can read the file Cher.docx with libreoffice (with mutt as an attachment) -- Gérard
Re: mutt-kz
Derek Martin wrote, on Tue, Apr 24, 2012 at 12:04:16PM -0500: > Has anyone tried mutt-kz? > > https://github.com/karelzak/mutt-kz/wiki > > I'd be interested to hear anyone's experiences... Oh, I've missed a good mutt-notmuch integration, especially with tags in mind. Let me know if you try it out. There was a script called mutt-notmuch once [1], and there still is, but it doesn't work with tags, only indexing. [1] http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/ -- Jostein
Re: can't read attached file docx
2012/4/24 Gerard ROBIN : > Hello, > I use Mutt 1.5.21 (from squeeze-backports) > > When I receive a message with a attached .docx file, sometime I can read > it with libreoffice and sometime I get: Hi Gerard, Sometime I got the same problem here. However, I see that I only get this issue when libreoffice is already running! How reproduce: 1. Open a file (doc, xls, odf, odp, etc) in libreoffice 2. Open mutt and find a message with doc attached 3. Try to open the attached file 4. Libreoffice don't open it 5. Close all libreoffice that was running 6. Try to open that attached file again 7. It wil open normally I don't now how I could bypass this issue here. I hope this help someone to help us Marcelo