all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: colorizing empty space
Date: Thu, 16 Dec 2010 13:13:57 -0600	[thread overview]
Message-ID: <87oc8la5u2.fsf@lifelogs.com> (raw)

Say you have a buffer with this text (showing newlines as \n)

Hello\n
there\n
everyone\n

and you want to colorize the text background.  You'd end up with a
ragged appearance on the right, because the text ends at the newlines,
or (if you choose to colorize the newlines) the background would extend
to the right margin of the buffer, which looks awful when rendering
readable text in very wide buffers.

I wonder if there's a way to give all the lines max(paragraph lines)+1
width using "visual" space, so at least one "visual" space is added on
the right (shown with x):

Helloxxxx\n
therexxxx\n
everyonex\n

which can then be colorized with the proper background.  I'd like this
to happen without actually modifying the text (so if copied it will
retain the original content), so I was wondering if font-lock or some
other Emacs wizardry could be used to create this "visual" space effect.

Thanks
Ted




             reply	other threads:[~2010-12-16 19:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16 19:13 Ted Zlatanov [this message]
2010-12-20 10:50 ` colorizing empty space Chong Yidong
2011-01-24 18:17   ` Ted Zlatanov
2011-01-24 22:16     ` Lars Ingebrigtsen
2011-01-24 23:02       ` Lars Ingebrigtsen
2011-01-24 23:14         ` Lars Ingebrigtsen
2011-01-24 23:26           ` Lars Ingebrigtsen
2011-01-25  8:24 ` Daniel Colascione
2011-01-25 10:17   ` Lennart Borgman
2011-01-25 12:51     ` Daniel Colascione
2011-01-26  2:28       ` Stephen J. Turnbull
2011-01-26  3:23         ` Stefan Monnier
2011-01-26  4:46           ` Miles Bader
2011-01-26  6:28             ` Eli Zaretskii
2011-01-26  6:50               ` Miles Bader
2011-01-26  6:52               ` Daniel Colascione

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=87oc8la5u2.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=emacs-devel@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.