From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86245 Path: news.gmane.org!not-for-mail From: Michael Sperber Newsgroups: gmane.emacs.gnus.general Subject: Re: PATCH: Unbreak `mailcap-mailcap-entry-passes-test' Date: Tue, 20 Oct 2015 13:51:38 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445341946 5039 80.91.229.3 (20 Oct 2015 11:52:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 20 Oct 2015 11:52:26 +0000 (UTC) Cc: ding@gnus.org To: Katsumi Yamaoka Original-X-From: ding-owner+M34479@lists.math.uh.edu Tue Oct 20 13:52:13 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 1ZoVSe-00017H-4V for ding-account@gmane.org; Tue, 20 Oct 2015 13:52:12 +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 1ZoVSG-0007m8-Lm; Tue, 20 Oct 2015 06:51:48 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1ZoVSD-0007le-IW for ding@lists.math.uh.edu; Tue, 20 Oct 2015 06:51:45 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1ZoVSC-0004Mk-Dm for ding@lists.math.uh.edu; Tue, 20 Oct 2015 06:51:45 -0500 Original-Received: from deinprogramm.de ([88.198.58.179] helo=mx.deinprogramm.de) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1ZoVS9-0000Zk-To for ding@gnus.org; Tue, 20 Oct 2015 13:51:41 +0200 Original-Received: from jellaby.local (unknown [195.52.203.132]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.deinprogramm.de (Postfix) with ESMTPSA id 57B563028E; Tue, 20 Oct 2015 11:51:37 +0000 (UTC) Original-Received: by jellaby.local (Postfix, from userid 2246) id 83A942486DFE; Tue, 20 Oct 2015 13:51:38 +0200 (CEST) In-Reply-To: (Katsumi Yamaoka's message of "Tue, 20 Oct 2015 20:11:49 +0900") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) XEmacs/21.5-b34 (darwin) X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86245 Archived-At: Thanks for the quick action! Katsumi Yamaoka writes: > 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)) Right. However, many typical mailcap entries will not have a test clause. > If your patch is applied, the `test' token will not be updated > whatever $DISPLAY is. I don't think so: If there's a test clause present, the same code as before runs - mutating the cdr as before. If not, the function simply returns t, as documented. (In that case, there's nothing to mutate.) -- Regards, Mike