Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Faking filenames for attachments
@ 2014-02-09 11:43 Tim Landscheidt
  2014-02-12 10:00 ` Thien-Thi Nguyen
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Landscheidt @ 2014-02-09 11:43 UTC (permalink / raw)
  To: info-gnus-english

Hi,

usually, if I attach a file /a/b/c.e to a message, it gets
MIME headers:

| Content-Type: mime/type
| Content-Disposition: attachment; filename=c.e

However, I want to pretend the filename is d.e.

mml-attach-file doesn't seem to support that, so after a
look at (emacs-mime)MML Definition I resented to using
mml-insert-empty-tag directly:

| (mml-insert-empty-tag 'part
|                       'type "mime/type"
|                       'filename "/a/b/c.e")
|                       'name "d.e"
|                       'disposition "attachment")

With that, the headers looked like:

| Content-Type: mime/type; name=d.e
| Content-Disposition: attachment; filename=c.e

Still there!  More debugging led to removing 'filename from
mml-content-disposition-parameters which for the mimicry
case resulted in:

| Content-Type: mime/type; name=d.e
| Content-Disposition: attachment

which is okay, but the headers generated by mml-attach-file
lacked any filename:

| Content-Type: mime/type
| Content-Disposition: attachment

which isn't.

So now I have a working solution (advise mml-attach-file to
add a 'name parameter, remove 'filename from
mml-content-disposition-parameters), but this doesn't seem
to be very stable.  Are there other options that I have
missed?

TIA,
Tim

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-05 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.14370.1391946212.10748.info-gnus-english@gnu.org>
2014-03-05 13:29 ` Faking filenames for attachments Lars Ingebrigtsen
2014-02-09 11:43 Tim Landscheidt
2014-02-12 10:00 ` Thien-Thi Nguyen
2014-02-12 10:44   ` Tim Landscheidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).