From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86243 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: PATCH: Unbreak `mailcap-mailcap-entry-passes-test' Date: Tue, 20 Oct 2015 20:11:49 +0900 Organization: Emacsen advocacy group Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1445339578 30281 80.91.229.3 (20 Oct 2015 11:12:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Oct 2015 11:12:58 +0000 (UTC) Cc: ding@gnus.org To: Michael Sperber Original-X-From: ding-owner+M34478@lists.math.uh.edu Tue Oct 20 13:12:45 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZoUqQ-000643-FG for ding-account@gmane.org; Tue, 20 Oct 2015 13:12:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1ZoUph-0007X2-Gf; Tue, 20 Oct 2015 06:11:57 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZoUpf-0007Wa-P8 for ding@lists.math.uh.edu; Tue, 20 Oct 2015 06:11:55 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZoUpe-0002rH-Ue for ding@lists.math.uh.edu; Tue, 20 Oct 2015 06:11:55 -0500 Original-Received: from [216.246.47.56] (helo=memphis.hostforweb.net) by quimby.gnus.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ZoUpd-00085H-Fi for ding@gnus.org; Tue, 20 Oct 2015 13:11:53 +0200 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:62752 helo=localhost) by memphis.hostforweb.net with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZoUpX-001niO-0W; Tue, 20 Oct 2015 06:11:47 -0500 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.130014 (=?utf-8?Q?=E7=9C=9F?= Gnus v0.14) Emacs/25.0.50 (i686-pc-cygwin) Cancel-Lock: sha1:5GztBsS3IkQpzg2ksn3Ctiz8phI= X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - memphis.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: memphis.hostforweb.net: authenticated_id: yamaokac/only user confirmed/virtual account not confirmed X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 1.6 (+) X-Spam-Report: SpamAssassin (3.4.1 2015-04-28) analysis follows Bayesian score: 0.4597 Ham tokens: 0.000-419--21883h-0s--0d--PATCH, 0.000-29--1492h-0s--0d--H*UA:Emacs, 0.000-29--1490h-0s--0d--H*M:fsf, 0.000-29--1470h-0s--0d--H*u:Emacs, 0.000-18--896h-0s--0d--H*u:Gnus Spam tokens: 0.996-12440--258h-7328s--0d--H*r:quimby.gnus.org, 0.995-11335--301h-6715s--0d--H*Ad:D*gnus.org, 0.995-13412--400h-7971s--0d--Hx-spam-relays-external:quimby.gnus.org, 0.995-13412--400h-7971s--0d--H*RU:quimby.gnus.org, 0.994-13324--488h-7971s--0d--H*RT:80.91.231.51 Autolearn status: no autolearn_force=no 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4597] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86243 Archived-At: On Tue, 20 Oct 2015 11:10:55 +0200, Michael Sperber wrote: > I had to apply to attached patch to make mailcap work on XEmacs. I'm > puzzled by this, as I think it should break mailcap for just about > everyone. On the other hand, I don't see how the code (without) the > patch could work as advertised. > So if somebody could review (and maybe apply) it, that - again - would > be much appreciated. This is what I grasped of how mailcap.el does: What is passed to mailcap-mailcap-entry-passes-test is an entry of a mailcap file (user's or system's) like this: image/*; xv %s; test=test -n "$DISPLAY" This entry is parsed by mailcap-parse-mailcap into: ((viewer . "xv %s") (type . "image/*") (test . "test -n \"$DISPLAY\"")) It is passed to mailcap-mailcap-entry-passes-test as an argument, and the result is added to mailcap-mime-data. Where the result is ((viewer . "xv %s") (type . "image/*") (test . t)) if $DISPLAY is not empty, otherwise: ((viewer . "xv %s") (type . "image/*") (test)) If your patch is applied, the `test' token will not be updated whatever $DISPLAY is. Regards,