From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/63522 Path: news.gmane.org!not-for-mail From: Elias Oltmanns Newsgroups: gmane.emacs.gnus.general Subject: [patch] mailcap.el: Error in parsing mailcap entries Date: Fri, 28 Jul 2006 21:37:13 +0200 Message-ID: <87mzatcyhi.fsf@denkblock.local> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1154116165 20364 80.91.229.2 (28 Jul 2006 19:49:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Jul 2006 19:49:25 +0000 (UTC) Original-X-From: ding-owner+m12049@lists.math.uh.edu Fri Jul 28 21:49:17 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 1G6YIo-00060A-JF for ding-account@gmane.org; Fri, 28 Jul 2006 21:47:19 +0200 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 1G6YIA-0001EG-00; Fri, 28 Jul 2006 14:46:38 -0500 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1G6Y9a-0001EB-00 for ding@lists.math.uh.edu; Fri, 28 Jul 2006 14:37:46 -0500 Original-Received: from quimby.gnus.org ([80.91.227.211]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1G6Y9W-0004Vl-5d for ding@lists.math.uh.edu; Fri, 28 Jul 2006 14:37:45 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1G6Y9Q-0002RN-00 for ; Fri, 28 Jul 2006 21:37:36 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G6Y9D-00040l-A6 for ding@gnus.org; Fri, 28 Jul 2006 21:37:23 +0200 Original-Received: from pd9e85bf7.dip.t-dialin.net ([217.232.91.247]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Jul 2006 21:37:23 +0200 Original-Received: from oltmanns by pd9e85bf7.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 28 Jul 2006 21:37:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Lines: 44 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pd9e85bf7.dip.t-dialin.net User-Agent: Gnus/5.110006 (No Gnus v0.6) Cancel-Lock: sha1:Ya942YqJ5/9mHM5BMlB5EgvDpqM= X-Spam-Score: -1.1 (-) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:63522 Archived-At: --=-=-= Hi all, in current cvs trunk gnus' mailcap parsing has been corrupted. The problem is that mailcap-viewer-passes-test caches its results even if the symbol test is nil. This makes (nil nil) appear in mailcap-viewer-test-cache and all subsequent tests for viewers that do have a test clause of any kind will fail in consequence. The little patch attached fixes this problem. Additionally, I'd like to have the tests performed in mailcap-mailcap-entry-passes-test incorporated into the caching system. That way, you would just have to flush the cache whenever something changes in the environment; just consider the case when you connect to a screen session on a remote machine with emacs already running. What do you think about that? Regards, Elias --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=mailcap.el-1.patch --- gnus/lisp/mailcap.el.orig 2006-01-31 02:11:48.000000000 +0100 +++ gnus/lisp/mailcap.el 2006-07-28 17:54:39.000000000 +0200 @@ -647,11 +647,11 @@ (cond ((setq cache (assoc test mailcap-viewer-test-cache)) (cadr cache)) ((not test-info) t) ; No test clause + ((not test) nil) ; Already failed test (t (setq result (cond - ((not test) nil) ; Already failed test ((eq test t) t) ; Already passed test ((functionp test) ; Lisp function as test (funcall test type-info)) --=-=-=--