From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64296 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: default mime for attaching files Date: Fri, 09 Feb 2007 11:00:27 +0900 Organization: Emacsen advocacy group Message-ID: References: <87zm7op2y1.fsf@patagonia.sebmags.homelinux.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1170986491 3126 80.91.229.12 (9 Feb 2007 02:01:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Feb 2007 02:01:31 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M12820@lists.math.uh.edu Fri Feb 09 03:01:27 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1HFL4p-0001Mb-EJ for ding-account@gmane.org; Fri, 09 Feb 2007 03:01:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1HFL47-0004F5-4M; Thu, 08 Feb 2007 20:00:43 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1HFL45-0004Eh-Bq for ding@lists.math.uh.edu; Thu, 08 Feb 2007 20:00:41 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.63) (envelope-from ) id 1HFL3z-0005Rv-73 for ding@lists.math.uh.edu; Thu, 08 Feb 2007 20:00:41 -0600 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1HFL3y-0008Ex-00 for ; Fri, 09 Feb 2007 03:00:34 +0100 Original-Received: from [66.225.201.151] (port=49860 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.63) (envelope-from ) id 1HFL40-0003AC-7a for ding@gnus.org; Thu, 08 Feb 2007 20:00:36 -0600 X-Hashcash: 1:20:070209:ding@gnus.org::F3X5W9Pl6KlDzALL:000022RO X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.93 (gnu/linux) Cancel-Lock: sha1:Kg6NW3X46qThn8ogYdXe7FxII2o= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64296 Archived-At: >>>>> 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,