all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: help-gnu-emacs@gnu.org
Subject: Re: narrow color bar using display properties
Date: Tue, 05 Mar 2013 15:33:42 +0100	[thread overview]
Message-ID: <87r4jtzzjt.fsf@web.de> (raw)
In-Reply-To: <mailman.21422.1362464496.855.help-gnu-emacs@gnu.org> (Eric Abrahamsen's message of "Tue, 05 Mar 2013 14:26:45 +0800")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I've got my cursor-type set to a colored bar, and looking at it today I
> thought it would be very nice if I could create a similar effect with
> code: presumably using text properties (I'm guessing the display
> property) to lay a bar of color (either background color or a
> transparent foreground color) over existing text, only a couple of
> pixels wide and aligned left, without otherwise disturbing the placement
> of the text beneath.
>
> Right now the most promising approach seems to be the image display
> property (presumably I could use the :data specification just to draw a
> block of colored pixels), except that if I understand it correctly that
> will replace the underlying text, not add to it.
>
> Does anyone have advice on achieving this?

You may want to try using faces using the stipple attribute (see (elisp)
Face Attributes) and use them in text properties or overlays.

Using stipple is easy, e.g. like this:

  (defface test '((t (:stipple "hlines2"))) "Doc...")

The downside: stipple doesn't work in Windows AFAIK.


Regards,

Michael.



       reply	other threads:[~2013-03-05 14:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.21422.1362464496.855.help-gnu-emacs@gnu.org>
2013-03-05 14:33 ` Michael Heerdegen [this message]
2013-03-05  6:26 narrow color bar using display properties Eric Abrahamsen
2013-03-05 15:46 ` Stefan Monnier
2013-03-05 17:49 ` Eli Zaretskii
2013-03-05 18:16   ` Peter Dyballa
2013-03-05 18:43     ` Eli Zaretskii
2013-03-05 18:45     ` Drew Adams
2013-03-06  1:52       ` Eric Abrahamsen
     [not found] ` <mailman.21466.1362505829.855.help-gnu-emacs@gnu.org>
2013-03-05 18:26   ` Dan Espen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r4jtzzjt.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.