From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/7848 Path: main.gmane.org!not-for-mail From: William Perry Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-picons update Date: Mon, 9 Sep 1996 09:51:06 -0700 Message-ID: <199609091651.JAA09612@newman> References: Reply-To: wmperry@aventail.com NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035148104 8728 80.91.224.250 (20 Oct 2002 21:08:24 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:08:24 +0000 (UTC) Cc: ding@ifi.uio.no Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id KAA23204 for ; Mon, 9 Sep 1996 10:26:45 -0700 Original-Received: from newman (root@aventail.seanet.com [199.181.165.9]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 9 Sep 1996 18:52:55 +0200 Original-Received: from kramer.aventail.com (root@newman [192.168.1.1]) by newman (8.6.12/8.6.9) with SMTP id JAA09612; Mon, 9 Sep 1996 09:51:06 -0700 Original-To: Wesley.Hardaker@sphys.unil.ch In-Reply-To: Errors-to: wmperry@aventail.com X-Face: O~Rn;(l][/-o1sALg4A@xpE:9-"'IR[%;,,!m7Hans de Graaff writes: > >> What is irritating about this is that the initial line is just >> text. As soon as the icons get inserted this changes the line height, >> and shifts all other text down. Annoying. How about inserting a small >> blank xpm of the proper height immediately, to reserve the line >> height. > >I've thought about this... However, this would slow it down more and >additionally require reading yet one more image file... You would only need to do this once at startup. And you can build a pixmap pretty easily in memory. I've got the code to do it for Emacs-W3. Try something like: (defun create-blank-pixmap (width height) (let ((retval (concat "/* XPM */\n" "static char *pixmap[] = {\n" ;;"/* width height num_colors chars_per_pixel */\n" (format "\" %d %d 2 1\",\n" width height) ;;"/* colors */\n" "\". c #000000 s background\",\n" "\"# c #FFFFFF s foreground\",\n" ;;"/* pixels /*\n" )) (line (concat "\"" (make-string width ?.) "\""))) (while (/= 1 height) (setq retval (concat retval line ",\n") height (1- height))) (concat retval line "\n};"))) Then: (make-glyph (vector 'xpm :data (create-blank-pixmap 40 40)))) Wheee. -Bill P.