From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61762 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.emacs.gnus.general Subject: /etc/mailcap test specs Date: Wed, 25 Jan 2006 11:58:59 +1100 Message-ID: <87d5ihw2b0.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1138151031 1902 80.91.229.2 (25 Jan 2006 01:03:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2006 01:03:51 +0000 (UTC) Original-X-From: ding-owner+m10292@lists.math.uh.edu Wed Jan 25 02:03:47 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F1Z4B-00039y-MD for ding-account@gmane.org; Wed, 25 Jan 2006 02:03:20 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F1Z42-0004dt-00; Tue, 24 Jan 2006 19:03:10 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F1Z0O-0004do-00 for ding@lists.math.uh.edu; Tue, 24 Jan 2006 18:59:24 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1F1Z0L-0006kq-HH for ding@lists.math.uh.edu; Tue, 24 Jan 2006 18:59:24 -0600 Original-Received: from mailout2.pacific.net.au ([61.8.0.115]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F1Z0G-0000z6-00 for ; Wed, 25 Jan 2006 01:59:16 +0100 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k0P0xAHO003490 for ; Wed, 25 Jan 2006 11:59:11 +1100 Original-Received: from localhost (ppp2525.dyn.pacific.net.au [61.8.37.37]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k0P0x9hW016367 for ; Wed, 25 Jan 2006 11:59:10 +1100 Original-Received: from gg by localhost with local (Exim 3.36 #1 (Debian)) id 1F1Yzz-0001sT-00; Wed, 25 Jan 2006 11:58:59 +1100 Original-To: ding@gnus.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) X-Spam-Score: -2.6 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61762 Archived-At: --=-=-= I think the "test" specs parsed from /etc/mailcap are not being tried. On a tty with DISPLAY unset I find gnus trying to run xpdf (or acroread), despite having test=test -n "$DISPLAY" I think the info alists in mailcap-mime-data are getting strings "test" rather than symbols `test', which is making those tests invisible to mailcap-viewer-passes-test and mailcap-mailcap-entry-passes-test (those funcs call "(assq 'test info)"). 2006-01-21 Kevin Ryde * mailcap.el (mailcap-parse-mailcap-extras): "test" key must go into alists as symbol not string, since that's what mailcap-viewer-passes-test and mailcap-mailcap-entry-passes-test look for. I'd have thought symbols for all keys would be the way to go, but I see "copiousoutput", "needsx11" and friends are getting tested/used as strings at the moment. --=-=-= Content-Disposition: attachment; filename=mailcap.el.diff --- mailcap.el.~7.7.~ 2005-10-27 09:38:45.000000000 +1000 +++ mailcap.el 2006-01-21 18:46:31.807002888 +1100 @@ -532,7 +532,12 @@ (skip-chars-forward ";")) (setq done t)))) (setq value (buffer-substring val-pos (point)))) - (setq results (cons (cons name value) results)) + ;; `test' as symbol, others like "copiousoutput" and "needsx11" as + ;; strings + (setq results (cons (cons (if (string-equal name "test") + 'test + name) + value) results)) (skip-chars-forward " \";\n\t")) results))) --=-=-=--