Gnus development mailing list
 help / color / mirror / Atom feed
From: Elias Oltmanns <oltmanns@uni-bonn.de>
Subject: [patch] mailcap.el: Error in parsing mailcap entries
Date: Fri, 28 Jul 2006 22:49:12 +0200	[thread overview]
Message-ID: <87y7udqwtz.fsf@denkblock.local> (raw)

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: mailcap.el-1.patch --]
[-- Type: text/x-patch, Size: 538 bytes --]

--- 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))

             reply	other threads:[~2006-07-28 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28 20:49 Elias Oltmanns [this message]
2006-08-01 10:28 ` Elias Oltmanns
  -- strict thread matches above, loose matches on Subject: below --
2006-07-28 19:37 Elias Oltmanns

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y7udqwtz.fsf@denkblock.local \
    --to=oltmanns@uni-bonn.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).