From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: doc-view.el --- View PDF/PostScript/DVI files in Emacs Date: Sun, 26 Aug 2007 12:20:25 +0200 Message-ID: <87d4xalhqu.fsf@baldur.tsdh.de> References: <87d4xd19f8.fsf@baldur.tsdh.de> <87ejhtkvc7.fsf@cadilhac.name> <87ir753qgu.fsf@baldur.tsdh.de> <85r6lsfw3q.fsf@lola.goethe.zz> <87zm0fmsod.fsf@baldur.tsdh.de> <854pincvkt.fsf@lola.goethe.zz> 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 1188123652 24979 80.91.229.12 (26 Aug 2007 10:20:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Aug 2007 10:20:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 26 12:20:51 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 1IPFEb-0008ED-2I for ged-emacs-devel@m.gmane.org; Sun, 26 Aug 2007 12:20:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPFEY-0001ba-74 for ged-emacs-devel@m.gmane.org; Sun, 26 Aug 2007 06:20:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPFET-0001ZF-V1 for emacs-devel@gnu.org; Sun, 26 Aug 2007 06:20:37 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPFET-0001Y5-5W for emacs-devel@gnu.org; Sun, 26 Aug 2007 06:20:37 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPFET-0001Xu-20 for emacs-devel@gnu.org; Sun, 26 Aug 2007 06:20:37 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IPFES-0000dM-EC for emacs-devel@gnu.org; Sun, 26 Aug 2007 06:20:36 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IPFEQ-0004m2-Iy for emacs-devel@gnu.org; Sun, 26 Aug 2007 12:20:34 +0200 Original-Received: from dslb-084-063-021-197.pools.arcor-ip.net ([84.63.21.197]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Aug 2007 12:20:34 +0200 Original-Received: from tassilo by dslb-084-063-021-197.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 26 Aug 2007 12:20:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dslb-084-063-021-197.pools.arcor-ip.net Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUSEQ9eW1Dkxz/6+fjQ w52JeEi7Imd/AAAACXBIWXMAAAsSAAALEgHS3X78AAAATnRFWHRSYXcgcHJvZmlsZSB0eXBlIGV4 aWYACmV4aWYKICAgICAgMjAKNDU3ODY5NjYwMDAwNGQ0ZDAwMmEwMDAwMDAwODAwMDAwMDAwMDAw MAqJuBZbAAAACXZwQWcAAAAwAAAAMADO7oxXAAABk0lEQVQ4y32TS3KDMAxAxQB7uyEHiGvvoSh7 sMSeJnD/q9Q/DBmYamNZz/oioM8ySkn7DbL2bHiUV+CODTflGXTSC5xBWwRAJzBAkPIEhLMWANUZ 3ETRt1CcAbcVdhdgmMZq5CsPsS6iufJ4EY7rFVg0WwNwblA5+Q/QCbADtLeewUxKcT/n1g8x0UVp c5Lt7Op4ANw+wfwOB+YxJoA5wlZXMnSwT788gmEbhUtSHMFWPuEnwK0WD6IOKUDISIckkFYk+KWl qHYgUvGIOKYkEeQJEQ5H0EETrERIbWoxgTLmQCLvsQNRhpqQELvmF3Kop17Ce+yJf6WsM7D8CMNF 7pcZoN5C4cLWlUXsiHY5bAKsmXn2c2BCPYkGI0BtHTGFrxX5RUz8jkBZ1tqKt8vOrC1bNgk4M6v5 5jyYvzQrtjqCICN7+8hWaaXNAahvwn66R92QA88ENCPPCSze4ycBI6WQdVBXOoYy/ndeN3tocH35 68MDH8os26zQGHd/+XcYE+xbMpk1LuC0mo9NdANOX10n5Q8J6syYNMm6EgAAABp6VFh0anBlZzpj b2xvcnNwYWNlAAB42jMCAAAzADOJOCM1AAAAJnpUWHRqcGVnOnNhbXBsaW5nLWZhY3RvcgAAeNoz qjDSMawwBGEAEYMC6T2XL08AAAAASUVORK5CYII= User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:SypvEmy2pZBBCzg7GpwXi55CUqI= X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) 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:77200 Archived-At: David Kastrup writes: Hi David, >> I changed doc-view.el so that it uses plain ghostscript (plus dvipdfm >> for DVI files) which gives good results and is about ten times faster >> than with ImageMagick's convert. >> >> The only downside is that I don't know how to cut off the margins. >> Those waste a lot of buffer space when displaying the image. >> converts -trim option was very nice for that cause. Do you know how >> one can do that with ghostview? > > Well, that is one of the things done in preview-latex. Do you have > the bounding box information for your images (preview-latex takes them > from TeX usually)? No, how should I get it? I only have PDF/PS or DVI files with no sources at all. >>> Ghostscript is used as a daemon in order to render the stuff in a >>> useful order, and a single Ghostscript session renders all images. >> >> Well, the conversion in doc-view.el runs asynchronous, too. Users >> can go on with their work and eventually the *DocView* buffer will >> pop up. > > preview-latex provides a working view of the buffer straight away, > rendering images and replacing place-holders first on the displayed > screen area, then off-screen. That way, you get immediate visual > feedback where you need it, even though the rendering of thousands of > images might take a minute or so. Yes, I know. I use it sometimes to check if the LaTeX source I write is correct, especially for huge math formulas. > It is really several years of optimizations and user feedback that > went into the code base. You should take it for a test drive before > deciding that its behavior does not suggest interesting material to > your project. If it can be useful if everything I have is the plain document with no additional source or infos about included images, then I'll do it. So can it do that? Bye, Tassilo -- Früher haben wir vor dem Essen immer gebetet, aber jetzt hat meine Frau einen Kochkurs gemacht.