From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel Subject: Re: doc-view and mailcap Date: Sun, 25 Nov 2007 23:53:49 +0100 Message-ID: References: <87bqbhkhc6.fsf@baldur.tsdh.de> <878x6ljwb4.fsf@baldur.tsdh.de> <87fy0r2u3z.fsf@baldur.tsdh.de> <87wsu1sear.fsf@baldur.tsdh.de> <878x6gqqfa.fsf@baldur.tsdh.de> <87abqt2x52.fsf@jurta.org> <87bqb8rmk2.fsf@jurta.org> <87ejfwgf5k.fsf@jurta.org> <877ills6b4.fsf@jurta.org> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196031267 24687 80.91.229.12 (25 Nov 2007 22:54:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Nov 2007 22:54:27 +0000 (UTC) Cc: Tassilo Horn , rms@gnu.org, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 25 23:54:33 2007 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 1IwQMy-0006EG-Ew for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2007 23:54:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwQMj-0007QQ-Mx for ged-emacs-devel@m.gmane.org; Sun, 25 Nov 2007 17:54:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IwQMg-0007OH-3K for emacs-devel@gnu.org; Sun, 25 Nov 2007 17:54:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IwQMe-0007MH-Cv for emacs-devel@gnu.org; Sun, 25 Nov 2007 17:54:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwQMe-0007M3-4G for emacs-devel@gnu.org; Sun, 25 Nov 2007 17:54:12 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IwQMY-0006bP-Qu; Sun, 25 Nov 2007 17:54:07 -0500 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.1/8.14.1) with ESMTP id lAPMs3hl029667; Sun, 25 Nov 2007 23:54:03 +0100 (MET) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id AE3ED12C5B; Sun, 25 Nov 2007 23:54:03 +0100 (CET) X-Face: .*T0'iU(sujq_j9\J>-d4fg; N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Followup-To: Juri Linkov , rms@gnu.org, emacs-devel@gnu.org, Tassilo Horn In-Reply-To: (Reiner Steib's message of "Thu, 18 Oct 2007 09:31:56 +0200") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) X-DCC-Rhyolite-Metrics: poseidon 104; Body=4 Fuz1=4 Fuz2=4 X-Virus-Scanned: by amavisd-new X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:84122 Archived-At: On Thu, Oct 18 2007, Reiner Steib wrote: > On Thu, Oct 18 2007, Juri Linkov wrote: [...] >>> (defun doc-view-mode-p () >>> (and (display-graphic-p) > > Maybe an additional test like "(executable-find > doc-view-ghostscript-program)" would be useful here. > >>> (image-type-available-p 'png))) >>> >>> Shouldn't it? >> >> I think the second variant is better. Since this is a matter of doc-view >> to decide if it can support displaying, it should have such a function >> (autoloaded). > > I agree. Committed: (defun doc-view-mode-p (type) "Return non-nil if image type TYPE is available for `doc-view'. Image types are symbols like `dvi', `postscript' or `pdf'." (and (display-graphic-p) (image-type-available-p 'png) (cond ((eq type 'dvi) (and (doc-view-mode-p 'pdf) doc-view-dvipdfm-program (executable-find doc-view-dvipdfm-program))) ((or (eq type 'postscript) (eq type 'ps) (eq type 'pdf)) (and doc-view-ghostscript-program (executable-find doc-view-ghostscript-program))) (t ;; unknown image type nil)))) Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/