From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.help Subject: Re: draw line Date: Thu, 20 Mar 2008 17:20:57 +0100 Message-ID: <87myotwemu.fsf@kfs-lx.rd.rdm> References: <201bac3a0803191400g2dfed3e1kf40180ac098ccf41@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1206051648 28220 80.91.229.12 (20 Mar 2008 22:20:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Mar 2008 22:20:48 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Jonas Bernoulli" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 20 23:21:16 2008 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 1JcT82-0008SU-IL for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Mar 2008 23:20:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcT7R-0002D2-VP for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Mar 2008 18:20:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JcNVr-0000ZB-Po for help-gnu-emacs@gnu.org; Thu, 20 Mar 2008 12:21:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JcNVr-0000Yw-4o for help-gnu-emacs@gnu.org; Thu, 20 Mar 2008 12:21:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcNVq-0000Yt-US for help-gnu-emacs@gnu.org; Thu, 20 Mar 2008 12:21:06 -0400 Original-Received: from mail-relay.sonofon.dk ([212.88.64.25]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1JcNVq-000792-C8 for help-gnu-emacs@gnu.org; Thu, 20 Mar 2008 12:21:06 -0400 Original-Received: (qmail 6490 invoked from network); 20 Mar 2008 16:20:58 -0000 Original-Received: from unknown (HELO kfs-lx.rd.rdm.cua.dk) (213.83.150.21) by 0 with SMTP; 20 Mar 2008 16:20:58 -0000 In-Reply-To: <201bac3a0803191400g2dfed3e1kf40180ac098ccf41@mail.gmail.com> (Jonas Bernoulli's message of "Wed\, 19 Mar 2008 22\:00\:00 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.92 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 X-Mailman-Approved-At: Thu, 20 Mar 2008 18:17:12 -0400 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:52574 Archived-At: "Jonas Bernoulli" writes: > I would like to draw a one-pixel line. I have tried quite a few things > by now but none of them works. > > Here are two ways I have tried. Evaluating them should draw a red line > on the next line, which is only one pixel high. > > (insert (concat "\n" (propertize "\n" 'face '(:background "red") > 'display '(space :height (1))))) > > (insert (concat "\n" (propertize "\n" 'face '(:background "red") > 'line-height 1))) > > This doesn't sound very promissing: > > 38.11 Line Height > ... However, no matter what you specify, the actual line height can > never be less than the default. ... Does this help? A newline can have a `line-height' text or overlay property that controls the total height of the display line ending in that newline. If the property value is `t', the newline character has no effect on the displayed height of the line--the visible contents alone determine the height. This is useful for tiling small images (or image slices) without adding blank areas between the images. -- Kim F. Storm http://www.cua.dk