Re: bug saving attachments
On 15 Jan 2008 16:23 +0100, by [EMAIL PROTECTED] (Rocco Rutte): > Oh, escaping doesn't work as mutt treats the \ literally. So you need to > prepend './' (like in deleting a file named '-f' in the current dir). > That's what mutt should be abled to do more or less easily. If nothing else, it can be done through a macro. I do something very similar using a folder-hook to save attachments in a specific directory by default when in a particular mailbox. This should replicate the default behavior but prepend ./ to the file name when saving: macro attach s "./" But I agree, this is something that should be done automatically when the attachment file name begins with a character that has a special meaning in mutt-speak. -- Michael Kjörling .. [EMAIL PROTECTED] .. http://michael.kjorling.se * . No bird soars too high if he soars with his own wings . * * ENCRYPTED email preferred -- OpenPGP key ID: 0x(758F8749)BDE9ADA6 * * ASCII Ribbon Campaign: Against HTML mail, proprietary attachments * pgp4CJNAgJOMg.pgp Description: PGP signature
Re: bug saving attachments
Hi, * Luciano Rocha wrote: On Tue, Jan 15, 2008 at 02:18:33PM +0100, Rocco Rutte wrote: So it's rather undocumented, also see ticket #1719 (http://dev.mutt.org/trac/ticket/1719). Saving to \-Casamento.pps should work. Yeah, but as Francis mentioned, mutt should escape all magic chars from the attachment name. Oh, escaping doesn't work as mutt treats the \ literally. So you need to prepend './' (like in deleting a file named '-f' in the current dir). That's what mutt should be abled to do more or less easily. Rocco
Re: bug saving attachments
On Tue, Jan 15, 2008 at 02:18:33PM +0100, Rocco Rutte wrote: > Hi, > > * Luciano Rocha wrote: > > > I received a file from a friend starting with '-': > > --=_NextPart_000_1cd4_6abd_704a > > Content-Type: application/vnd.ms-powerpoint; name="-Casamento.pps"; > > Content-Transfer-Encoding: base64 > > Content-Disposition: attachment; filename="-Casamento.pps"; > > > While saving the attachment, mutt prompted for the filename and > > presented the default of -Casamento.pps, that I accepted: > > Save to file: -Casamento.pps > > > However, it didn't save to that file, but to a file with the '-' > > replaced to the last folder I was in: > > ~/Maildir/fooCasamento.pps > > Umm, that's not a bug but rather a feature. Mutt expands certain shortcuts > in paths, including '!' ($spoolfile), '^' (current), '=' ($folder)... and > '-' for the last folder opened. > > So it's rather undocumented, also see ticket #1719 > (http://dev.mutt.org/trac/ticket/1719). > > Saving to \-Casamento.pps should work. Yeah, but as Francis mentioned, mutt should escape all magic chars from the attachment name. -- lfr 0/0 pgpztVPtN2a4y.pgp Description: PGP signature
Re: bug saving attachments
On Jan 15, 2008 2:18 PM, Rocco Rutte <[EMAIL PROTECTED]> wrote: > Hi, > > * Luciano Rocha wrote: > > >I received a file from a friend starting with '-': > >--=_NextPart_000_1cd4_6abd_704a > >Content-Type: application/vnd.ms-powerpoint; name="-Casamento.pps"; > >Content-Transfer-Encoding: base64 > >Content-Disposition: attachment; filename="-Casamento.pps"; > > >While saving the attachment, mutt prompted for the filename and > >presented the default of -Casamento.pps, that I accepted: > >Save to file: -Casamento.pps > > >However, it didn't save to that file, but to a file with the '-' > >replaced to the last folder I was in: > >~/Maildir/fooCasamento.pps > > Umm, that's not a bug but rather a feature. Mutt expands certain > shortcuts in paths, including '!' ($spoolfile), '^' (current), '=' > ($folder)... and '-' for the last folder opened. > > So it's rather undocumented, also see ticket #1719 > (http://dev.mutt.org/trac/ticket/1719). > > Saving to \-Casamento.pps should work. > Shouldn't mutt prompt for "\-Casamento.pps" instead of "-Casamento.pps" ? -- Francis
Re: bug saving attachments
Hi, * Luciano Rocha wrote: I received a file from a friend starting with '-': --=_NextPart_000_1cd4_6abd_704a Content-Type: application/vnd.ms-powerpoint; name="-Casamento.pps"; Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="-Casamento.pps"; While saving the attachment, mutt prompted for the filename and presented the default of -Casamento.pps, that I accepted: Save to file: -Casamento.pps However, it didn't save to that file, but to a file with the '-' replaced to the last folder I was in: ~/Maildir/fooCasamento.pps Umm, that's not a bug but rather a feature. Mutt expands certain shortcuts in paths, including '!' ($spoolfile), '^' (current), '=' ($folder)... and '-' for the last folder opened. So it's rather undocumented, also see ticket #1719 (http://dev.mutt.org/trac/ticket/1719). Saving to \-Casamento.pps should work. Rocco