From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Sean O'Rourke" Newsgroups: gmane.emacs.devel Subject: patch: handle PS/PDF in Gnus Date: Fri, 06 Jul 2007 08:21:11 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1183735424 710 80.91.229.12 (6 Jul 2007 15:23:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 Jul 2007 15:23:44 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 06 17:23:43 2007 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I6pen-0004uk-Ql for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2007 17:23:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6peW-0004IK-OS for ged-emacs-devel@m.gmane.org; Fri, 06 Jul 2007 11:23:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6pcW-0003pQ-84 for emacs-devel@gnu.org; Fri, 06 Jul 2007 11:21:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6pcU-0003od-7m for emacs-devel@gnu.org; Fri, 06 Jul 2007 11:21:19 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6pcU-0003oZ-2E for emacs-devel@gnu.org; Fri, 06 Jul 2007 11:21:18 -0400 Original-Received: from outbound1.ucsd.edu ([132.239.1.205]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1I6pcT-0005kA-BR for emacs-devel@gnu.org; Fri, 06 Jul 2007 11:21:17 -0400 Original-Received: from smtp.ucsd.edu (smtp.ucsd.edu [132.239.1.49]) by outbound1.ucsd.edu (8.13.6/8.13.6) with ESMTP id l66FLEHN006180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 6 Jul 2007 08:21:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=2007001; d=ucsd.edu; c=simple; q=dns; b=fyTHFKzyR+YCkDJC65G0jiRf9JHBqkMvCDIvd1Wfka13B2mQQ82rqhZuYPOPaHyHf GvDK0/9/kEPBnh+/YMZ3w== Original-Received: from mister-foo.local ([128.54.220.221]) by smtp.ucsd.edu (8.13.6/8.13.4) with ESMTP id l66FLDdc027531 for ; Fri, 6 Jul 2007 08:21:14 -0700 (PDT) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (darwin) X-detected-kernel: FreeBSD 6.x (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:74398 Archived-At: The following patch makes Gnus handle Postscript and PDF attachments on Mac OS X. Something similar should probably be done for a bunch of other attachment types, but these are the ones I have needed. /s, browsing the accumulated diff between his sources and CVS... Index: mailcap.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/gnus/mailcap.el,v retrieving revision 1.16 diff -u -r1.16 mailcap.el --- mailcap.el 21 Jan 2007 02:54:13 -0000 1.16 +++ mailcap.el 6 Jul 2007 15:20:50 -0000 @@ -137,6 +137,11 @@ (type . "application/zip") ("copiousoutput")) ("pdf" + (viewer . "open %s") + (type . "application/pdf") + (test . (eq window-system 'mac)) + ("print" . ,(concat "pdf2ps %s - | " mailcap-print-command))) + ("pdf" (viewer . "gv -safer %s") (type . "application/pdf") (test . window-system) @@ -157,6 +162,11 @@ ("print" . ,(concat "pdftops %s - | " mailcap-print-command)) ("copiousoutput")) ("postscript" + (viewer . "open %s") + (type . "application/postscript") + (test . (eq window-system 'mac)) + ("print" . ,(concat mailcap-print-command " %s"))) + ("postscript" (viewer . "gv -safer %s") (type . "application/postscript") (test . window-system)