Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: default mime for attaching files
Date: Fri, 09 Feb 2007 11:00:27 +0900	[thread overview]
Message-ID: <b4mzm7oyts4.fsf@jpl.org> (raw)
In-Reply-To: <87zm7op2y1.fsf@patagonia.sebmags.homelinux.org>

>>>>> In <87zm7op2y1.fsf@patagonia.sebmags.homelinux.org>
>>>>>	Sebastian P. Luque wrote:

> I often need to attach tar.gz archives in messages, and noticed that
> whenever I do 'C-c C-a' (mml-attach-file), I'm faced with the default
> "application/octet-stream".  I don't understand much about mime-types, but
> I gather that tar.gz files should be specified as "application/x-gzip".
> Browsing 'M-x customize-group mime' I can't find some relevant variable to
> set a default (and possibly other files) for files suffixed *.tar.gz.  Any
> suggestions would be welcome.

First of all, application/octet-stream for *.gz files is not so
bad choice.  OTOH, types beginning with x- are non-standard, it
suggests not all mailers support them.

In Gnus, the default type for a certain file name is determined
according to the value of the `mailcap-mime-extensions' variable.
The value of `mailcap-mime-extensions' defined in mailcap.el is
just a default value.  It will be overridden if you have the
file specified by the MIMETYPES environment variable or there
are the files ~/.mime.types, /etc/mime.types, /usr/etc/mime.types,
etc. in your system.  If you prefer application/x-gzip for *.gz
files, create the file named "~/.mime.types" with the following
contents, for example:

--8<---------------cut here---------------start------------->8---
application/x-gzip gz
application/x-tar tar
...
--8<---------------cut here---------------end--------------->8---

If you customize it while Gnus is running, you need to perform
`C-u M-x mailcap-parse-mimetypes RET' after saving the file.
In addition, you may possibly need to set the MIMETYPES
environment variable to the file name.  To do it for only Emacs,
add this line to the ~/.emacs file:

--8<---------------cut here---------------start------------->8---
(setenv "MIMETYPES" "~/.mime.types")
--8<---------------cut here---------------end--------------->8---

Regards,



  reply	other threads:[~2007-02-09  2:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09  0:52 Sebastian P. Luque
2007-02-09  2:00 ` Katsumi Yamaoka [this message]
2007-02-09  5:22   ` Sebastian P. Luque
2007-02-09  5:47     ` Katsumi Yamaoka
2007-02-17 23:46       ` Sebastian P. Luque
2007-02-18  0:34         ` Katsumi Yamaoka
2007-02-18  3:32           ` Miles Bader
2007-02-19 12:22             ` Katsumi Yamaoka
2007-02-19 19:49               ` Reiner Steib
2007-02-19 23:27                 ` Katsumi Yamaoka
2007-02-19 23:49                   ` Sebastian P. Luque

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4mzm7oyts4.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).