From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/26112 Path: main.gmane.org!not-for-mail From: Mark Buda Newsgroups: gmane.emacs.gnus.general Subject: mailcap-viewer-lessp is just plain wrong Date: 01 Nov 1999 14:42:08 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <87aeoyvw1b.fsf@pazuzu.eudaemonia.org> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035163381 17649 80.91.224.250 (21 Oct 2002 01:23:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:23:01 +0000 (UTC) Return-Path: Original-Received: from lisa.math.uh.edu (lisa.math.uh.edu [129.7.128.49]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA01269 for ; Mon, 1 Nov 1999 14:43:18 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by lisa.math.uh.edu (8.9.1/8.9.1) with ESMTP id NAB14949; Mon, 1 Nov 1999 13:42:59 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 01 Nov 1999 13:42:57 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id NAA23360 for ; Mon, 1 Nov 1999 13:42:47 -0600 (CST) Original-Received: from pazuzu.eudaemonia.org (cc1018780-a.hwrd1.md.home.com [24.3.62.129]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id OAA01262 for ; Mon, 1 Nov 1999 14:42:13 -0500 (EST) Original-Received: (from hermit@localhost) by pazuzu.eudaemonia.org (8.9.3/8.9.3/Debian/GNU) id OAA18373; Mon, 1 Nov 1999 14:42:10 -0500 Original-To: ding@gnus.org Original-Lines: 35 User-Agent: Gnus/5.070097 (Pterodactyl Gnus v0.97) XEmacs/20.4 (Emerald) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:26112 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:26112 In pgnus-0.97/lisp/mailcap.el, this seems to be just wrong: (defun mailcap-viewer-lessp (x y) ;; Return t iff viewer X is more desirable than viewer Y (let ((x-wild (string-match "[*?]" (or (cdr-safe (assq 'type x)) ""))) (y-wild (string-match "[*?]" (or (cdr-safe (assq 'type y)) ""))) (x-lisp (not (stringp (or (cdr-safe (assq 'viewer x)) "")))) (y-lisp (not (stringp (or (cdr-safe (assq 'viewer y)) ""))))) (cond ((and x-lisp (not y-lisp)) t) ((and (not y-lisp) x-wild (not y-wild)) t) ((and (not x-wild) y-wild) t) (t nil)))) Shouldn't it be more like: ; blah blah blah (cond ((and x-lisp (not y-wild)) t) ((and y-wild (not x-wild)) t) ((and y-wild (not y-lisp)) t) (t nil)))) ? Even if mine isn't right, the existing function is just wrong. How can X be better if only one is wild, regardless of which one is wild? -- I get my monkeys for nothing and my chimps for free. http://www.clark.net/pub/hermit/