From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/13670 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.gnus.user Subject: Re: Opening pdf files in Acroread Date: Wed, 17 Feb 2010 15:39:06 +0100 Organization: ThierryVolpiatto Message-ID: <87tytgc4fp.fsf@tux.homenetwork> References: <87sk93h3az.fsf@linux-lqcw.site> <87sk905cp3.fsf@linux-lqcw.site> <87tytgca1l.fsf@mean.albasani.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1266417883 14050 80.91.229.12 (17 Feb 2010 14:44:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Feb 2010 14:44:43 +0000 (UTC) To: info-gnus-english@gnu.org Original-X-From: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Wed Feb 17 15:44:39 2010 Return-path: Envelope-to: gegu-info-gnus-english@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Nhl8p-00004t-FS for gegu-info-gnus-english@m.gmane.org; Wed, 17 Feb 2010 15:44:39 +0100 Original-Received: from localhost ([127.0.0.1]:49605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nhl8o-0001rD-PO for gegu-info-gnus-english@m.gmane.org; Wed, 17 Feb 2010 09:44:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nhl8N-0001f2-Ih for info-gnus-english@gnu.org; Wed, 17 Feb 2010 09:44:11 -0500 Original-Received: from [140.186.70.92] (port=37809 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nhl8M-0001eY-Ja for info-gnus-english@gnu.org; Wed, 17 Feb 2010 09:44:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nhl8K-0004TH-3y for info-gnus-english@gnu.org; Wed, 17 Feb 2010 09:44:10 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:47667) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nhl8J-0004Sy-M0 for info-gnus-english@gnu.org; Wed, 17 Feb 2010 09:44:08 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Nhl8E-00086n-LZ for info-gnus-english@gnu.org; Wed, 17 Feb 2010 15:44:02 +0100 Original-Received: from 85.211.85-79.rev.gaoland.net ([79.85.211.85]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Feb 2010 15:44:02 +0100 Original-Received: from thierry.volpiatto by 85.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 17 Feb 2010 15:44:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 71 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 85.211.85-79.rev.gaoland.net Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUHBARgJRFPS0WbMBTC TSG/uJs0yyVHAAAACXBIWXMAAAsSAAALEgHS3X78AAAACXZwQWcAAAAwAAAAMADO7oxXAAABpUlE QVQ4y3VTQXKDMAyUnD7AwvQOhtxj5N4LFh9ow/+/UtlpM0BczWSS0Wola7UBeEb3+3kJ/5p9ZLz3 UI0n0J0Y4K/lh1nG24FhlJOR2LdSKtpV5gfi/Zd+NdaJBbB4D5N0JnfUIVp6obZURkJwS2a8b9uX AkgxA5gCEcknAH1s2z0DPooWmjGKcJR+HNZt+9bm0GtGRycRuZGs98Ffr02vABWGopIAhmXmxnQN BwBXZjgFLHRoqbfeYxCLWqsjLyKhbEHW+A5nEs699Q2O80ALrgHTmUTy6P0MnKyKQpKHpoNWokxs F0D5VegvWmEozyE6nuMiS98mWzlUQ9bW8qYfqOaFtzWlYCqGeIs6HEyl08jkrxUG9MF5ipXpOOpd ZMoXPPVSLWJiiwNNB+eRSyxJZmQKcacikgucnCRiHuJOLmyYJRDPwOqAvY4pA+Wy+VS8G26BAsdb Ph2Hw7ORy/H0IOG0TnaM8Cp0XrFYyU0v2z8AqkifPVbLZ0qo/gsRg60C7p+8Ov9jrUIxFde+jnAq X42hyp/c+ZcnVyUYBarrqZt3+R8450png3cWKgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAwOC0wNS0z MVQyMjoxNDoyMiswMjowMK3VBDcAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMDctMTAtMjhUMTc6MDg6 NDgrMDE6MDDLdIcLAAAAEXRFWHRqcGVnOmNvbG9yc3BhY2UAMix1VZ8AAAAgdEVYdGpwZWc6c2Ft cGxpbmctZmFjdG9yADJ4MiwxeDEsMXgxSfqmtAAAAABJRU5ErkJggg== User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.92 (gnu/linux) Cancel-Lock: sha1:L7+myA4uaiZ4fVz7P4JUpQ5vN4E= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Errors-To: info-gnus-english-bounces+gegu-info-gnus-english=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.gnus.user:13670 Archived-At: Memnon Anon writes: > Cecil Westerhof writes: >> Thierry Volpiatto writes: >>> Not sure from where you try to open file, but adding a line like this in >>> your ~/.mailcap should help: >>> >>> ,----[ mailcap entry ] >>> | application/pdf; acroread %s >>> `---- >> That file was not on my system. The file /etc/mailcap was, but had no >> entry for pdf. I made the .mailcap file with the named entry, but to no >> avail. > > Hi, > > I have this (Debian Testing) > > ,----[ /etc/mailcap ] > | application/pdf; /usr/bin/xpdf '%s'; test=test "$DISPLAY" != ""; description=Portable Document Format; nametemplate=%s.pdf > | application/x-pdf; /usr/bin/xpdf '%s'; test=test "$DISPLAY" != ""; description=Portable Document Format; nametemplate=%s.pdf > `---- > > Pressing 'e' on an attached pdf opens xpdf for me. > > What does "C-h v mailcap-mime-data" give for you? > Here is my relevant output: > > Value: > (("application" > ("vnd\\.oasis\\.opendocument\\.database" > > [...] > > ("pdf" > (viewer . "/usr/bin/xpdf '%s'") > (type . "application/pdf") > ("nametemplate" . "%s.pdf") > ("description" . "Portable Document Format") > (test . "test \"$DISPLAY\" != \"\"")) > ("x-pdf" > (viewer . "/usr/bin/xpdf '%s'") > (type . "application/x-pdf") > ("nametemplate" . "%s.pdf") > ("description" . "Portable Document Format") > (test "test" "\"$DISPLAY\"" "!=" "\"\"")) > ("pdf" > (viewer . "fbgs -c '%s'") > (type . "application/pdf") > ("needsterminal" . t) > (test)) > > [...] > > hth This little function will give you the command used by mailcap for a given file: (defun get-mailcap-for-file (filename) "Get the command to use for FILENAME from mailcap file. The command is like and is meant to use with `format'." (let* ((ext (file-name-extension filename)) (mime (when ext (mailcap-extension-to-mime ext)))) (when mime (mailcap-mime-info mime)))) (get-mailcap-for-file "foo.pdf") ==> "xpdf %s" -- Thierry Volpiatto