From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.help Subject: Re: doc-view.el --- View PDF/PostStript/DVI files in Emacs Date: Wed, 22 Aug 2007 22:28:38 +0200 Organization: T-Online Message-ID: References: <87wsvnfoyp.fsf@baldur.tsdh.de> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1187815266 18988 80.91.229.12 (22 Aug 2007 20:41:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Aug 2007 20:41:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 22 22:41:03 2007 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 1INx0b-0004En-6d for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Aug 2007 22:40:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1INx0a-0006oq-Op for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Aug 2007 16:40:56 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!newsfeed2.ip.tiscali.net!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.sources,gnu.emacs.help Original-Followup-To: gnu.emacs.help Original-Lines: 50 Original-X-Trace: news.t-online.com 1187814538 01 21995 MENZ1hqLhFYkAyE 070822 20:28:58 Original-X-Complaints-To: usenet-abuse@t-online.de X-ID: Zkvw8gZawepQfwsT9mThdu4EzkBZE+IPcRAxbU-D6kcaGdkEbUP0rI X-Face: :6KQZ[nyoS_edmB.%gw-=)BYth^|2+Y+^cu%I$FSx!&>-'om>3H7A|M&n(V7fIo3P.; yo.b yq4$p; ZaBtkv)\}biaiBQe"mD}iib1AA@99-fZ7i*bLhNRVC&0Wkxg9)SH?oWc@{ Mail-Copies-To: nobody User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:29vZvnBk2XjDJedkjsQLAiKr3e8= Original-Xref: shelby.stanford.edu gnu.emacs.sources:12226 gnu.emacs.help:151189 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:46762 Archived-At: [ Crosspost & Followup-To: gnu.emacs.help ] On Wed, Aug 22 2007, Tassilo Horn wrote: > (defcustom doc-view-cache-directory "/tmp/doc-view" Maybe use `temporary-file-directory' or `make-temp-name'. > "The base directory, where the PNG imoges will be saved."   images > (defun doc-view-file-name-to-directory-name (file) > "Return the directory where the png files of FILE should be saved. > > It'a a subdirectory of `doc-view-cache-directory'." > (concat (directory-file-name doc-view-cache-directory) > "/" > (replace-regexp-in-string "/" "!" file))) Probably not portable, I think. Windows users may set the directory to "c:\foo\bar". Maybe you could do like the package formerly knows as `tumme.el' does it. Ah, it's `image-dired.el' now: `image-dired-thumb-name'. > (defun doc-view-convert-file (file) [...] > (let* ((dir (doc-view-file-name-to-directory-name file)) > (png-file (concat dir "/" "page.png"))) ,----[ (info "(elisp)Directory Names") ] | If you want to use a directory file name in making such a | combination, you must first convert it to a directory name using | `file-name-as-directory': | | (concat (file-name-as-directory DIRFILE) RELFILE) | | Don't try concatenating a slash by hand, as in | | ;;; Wrong! | (concat DIRFILE "/" RELFILE) | | because this is not portable. Always use `file-name-as-directory'. `---- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/