From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: Possible problem with Gnus Date: Sat, 15 May 2004 14:33:37 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040509230720.GB20485@fencepost> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1084646308 14086 80.91.224.253 (15 May 2004 18:38:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 15 May 2004 18:38:28 +0000 (UTC) Cc: Andy Tai , monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 15 20:38:22 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BP43C-0007bl-00 for ; Sat, 15 May 2004 20:38:22 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BP43C-0000p0-00 for ; Sat, 15 May 2004 20:38:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BP40g-0004Z5-ML for emacs-devel@quimby.gnus.org; Sat, 15 May 2004 14:35:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BP3zP-0003zg-Oi for emacs-devel@gnu.org; Sat, 15 May 2004 14:34:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BP3yd-0003OW-9H for emacs-devel@gnu.org; Sat, 15 May 2004 14:34:15 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BP3yd-0003OQ-17 for emacs-devel@gnu.org; Sat, 15 May 2004 14:33:39 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1BP3yb-0007nO-Vt; Sat, 15 May 2004 14:33:38 -0400 Original-To: David Kastrup In-reply-to: (message from David Kastrup on 14 May 2004 23:18:06 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23501 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23501 Andy, we have been talking about problems in Emacs code to display postscript in the middle of a document. > The sane thing to do is to serialize the whole GhostScript > operation to have at most one GhostScript process running, and > to not restart this process as long as images remain to be > rendered. > > That does sound desirable. However, > > For this to work, one has to stop passing the information > through an XPixMap but has to go through a file or pipe. > > Using a pixmap is preferable, in general. Why do you think > using a single Ghostscript process is incompatible with using > a pixmap? Because the interface to GhostScript that is used for passing the XPixMap Id and the respective sizes is queried just at the start of GhostScript. I think the solution for this is to make a new interface to allow Emacs to specify the pixmap to an existing GhostScript process when reusing it for another image. Andy, can you implement such an interface for Emacs to use? > In contrast, preview-latex first deals with on-screen images. > Once they are dealt with, it reverts to rendering the rest > off-screen. > > That would be a good optimization to add. Rendering off-screen material is actually not as much an optimization, but an interactivity feature. It means that once GhostScript is through, scrolling through the file is not computationally expensive. However, if some document has thousands of images, it would be saner to render them just to disk in case you'll need them, but not burden Emacs' memory with them unless one actually moves there. That makes sense. Can that be done easily with reuse of a single GhostScript process, with the existing GhostScript features? If not, what new feature do we need?