From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/28513 Path: main.gmane.org!not-for-mail From: Hans de Graaff Newsgroups: gmane.emacs.gnus.general Subject: Re: Guessing based on file extension Date: 02 Jan 2000 09:02:53 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: <879028vr2q.fsf@graaff.xs4all.nl> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035165347 30258 80.91.224.250 (21 Oct 2002 01:55:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:55:47 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 9B750D051E for ; Sun, 2 Jan 2000 06:34:04 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id FAB04450; Sun, 2 Jan 2000 05:33:42 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 02 Jan 2000 05:32:15 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id FAA26561 for ; Sun, 2 Jan 2000 05:32:03 -0600 (CST) Original-Received: from graaff.xs4all.nl (graaff.xs4all.nl [194.109.62.76]) by mailhost.sclp.com (Postfix) with SMTP id 224AED051E for ; Sun, 2 Jan 2000 06:30:25 -0500 (EST) Original-Received: (qmail 670 invoked by uid 1000); 2 Jan 2000 08:02:53 -0000 Original-To: ding@gnus.org X-Face: ,i^c$X{l+r}VV%(bl{^[ writes: > If the type is "application/octet-stream", then we look at the thing > after the dot, and use that as the "real" type. > > On the one hand, this is user friendly. On the other hand, guessing > is yucky. One could add a used config variable to control whether to > do it or not, but if that defaults to nil, then that won't be very > used friendly. If application/octet-stream is all we have then gussing may be the best way to go. Perhaps we could save the first part of the file and run it through 'file' to see what kind of file it really is? That would be more foolproof at least than only looking at the file extension. Hans