Gnus development mailing list
 help / color / mirror / Atom feed
* [patch] mailcap.el: Error in parsing mailcap entries
@ 2006-07-28 19:37 Elias Oltmanns
  0 siblings, 0 replies; 3+ messages in thread
From: Elias Oltmanns @ 2006-07-28 19:37 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 754 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))

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [patch] mailcap.el: Error in parsing mailcap entries
@ 2006-07-28 20:49 Elias Oltmanns
  2006-08-01 10:28 ` Elias Oltmanns
  0 siblings, 1 reply; 3+ messages in thread
From: Elias Oltmanns @ 2006-07-28 20:49 UTC (permalink / 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))

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-01 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-28 19:37 [patch] mailcap.el: Error in parsing mailcap entries Elias Oltmanns
2006-07-28 20:49 Elias Oltmanns
2006-08-01 10:28 ` Elias Oltmanns

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