From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wang Lei Newsgroups: gmane.emacs.help Subject: Re: Configuring external viewer for document types in Dired Date: Fri, 28 Aug 2009 21:08:59 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1251466448 30430 80.91.229.12 (28 Aug 2009 13:34:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Aug 2009 13:34:08 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Aug 28 15:34:02 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mh1aY-0006rN-4R for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Aug 2009 15:33:58 +0200 Original-Received: from localhost ([127.0.0.1]:52334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh1aX-00074f-Fq for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Aug 2009 09:33:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mh1CW-0007AN-F3 for help-gnu-emacs@gnu.org; Fri, 28 Aug 2009 09:09:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mh1CQ-00073R-67 for help-gnu-emacs@gnu.org; Fri, 28 Aug 2009 09:09:07 -0400 Original-Received: from [199.232.76.173] (port=46126 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mh1CP-00073H-Sq for help-gnu-emacs@gnu.org; Fri, 28 Aug 2009 09:09:01 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:52721) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mh1CP-0003jt-E3 for help-gnu-emacs@gnu.org; Fri, 28 Aug 2009 09:09:01 -0400 Original-Received: from mail-vw0-f178.google.com ([209.85.212.178]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mh1CO-0002gU-EN for help-gnu-emacs@gnu.org; Fri, 28 Aug 2009 09:09:00 -0400 Original-Received: by vws8 with SMTP id 8so1407130vws.14 for ; Fri, 28 Aug 2009 06:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Kxrj59Lo3mfhE8RP0uZWFUg4wEuXgoTY7gO0IrkS5xw=; b=I9VG6+S9rcy6LRAutVS26oBYDy+fV/0Q/IxiRDxAplpcLN2aiYBpXMiliLJa+NAcLs mPxK1kmVWYcM7zQ+coDFXEwr9hiicqapUEXTBTb7W0jG7hyctDdWOTtW3IRwkfr7qWe6 YgjF2yGfMaWtwGhj5WMwFCsu/i3HlkEitgL5s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=SuXjosw3UbGtNZnaU3dv2oV5+yUnzftoHFulIK2ZoSmUm/g4MNDqF3kr3UQCRlGSne m5AqQ8K2kdtNucX9VrcW8uVrvag6IW8TwwLMVBVTd3bZEbe6Yrgivxp1U2xwt8sPFvR4 AL9JkMeIrx7GMdfEbvMmnZ9i5e4SpSlenVfMU= Original-Received: by 10.220.102.137 with SMTP id g9mr1003803vco.89.1251464939102; Fri, 28 Aug 2009 06:08:59 -0700 (PDT) In-Reply-To: X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:67617 Archived-At: Perhaps, you can use (require 'dired-x) And set dired-guess-shell-alist-user. This is mine: (setq dired-guess-shell-alist-user '(("\\.pdf$" "xpdf * &") ("\\.py$" "python") ("\\.rar$" "unrar x") ("\\.html?$" "iceweasel") ("\\.rmvb$" "mplayer -framedrop -zoom -really-quiet"))) On 8/28/09, Thor376 wrote: > When I invoke Dired, many files in the list can be read by Emacs. > That's just fine. But occasionally I see a PDF file in Dired. Is there > some possibility to configure an external viewer to launch when I > press Enter on a PDF file in Dired? > > My system is Cygwin for Microsoft Windows XP. Emacs is installed from > the Cygwin repository. I use Emacs version 21.2.1. > -- Regards Lei