unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* set-the-color-of-the-character-underneath-the-cursor "white"
@ 2008-06-09 23:45 jidanni
  2008-06-10  8:10 ` Peter Dyballa
  2008-06-10 17:04 ` Joel J. Adamson
  0 siblings, 2 replies; 3+ messages in thread
From: jidanni @ 2008-06-09 23:45 UTC (permalink / raw)
  To: help-gnu-emacs

In my bid to make the purple block cursor a little more noticeable,
I can do (set-cursor-color "black").
But then how can I do something like
(set-the-color-of-the-character-underneath-the-cursor "white")

DA> Cursor color is unrelated to the color of buffer characters, so it makes no
DA> difference whether you first (set-cursor-color "black").

DA> For the second, it depends on what you mean by setting the color of that
DA> character. Text property? Overlay? Font-lock coloring? Foreground? Background?

DA> The character underneath the cursor is the character at (point) (actually, the
DA> character between (point) and (1+ point)). You can change the foreground and
DA> background colors there in various ways.

DA> Have a look at facemenu and hi-lock. Look also here:
DA> http://www.emacswiki.org/cgi-bin/wiki/HighlightTemporarily
DA> http://www.emacswiki.org/cgi-bin/wiki/FaceMenuPlus

DA> I get the impression you will want to start with facemenu. That seems more like
DA> what you're looking for.

I did try indeed downloading that but didn't get far -- as you see I
am now twice the age of everybody, and can't use fancy things. All I
want is just one line:
(set-the-color-of-the-character-underneath-the-cursor "white")
if somebody can give me an example of how I might write that one line
it would be great.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: set-the-color-of-the-character-underneath-the-cursor "white"
  2008-06-09 23:45 set-the-color-of-the-character-underneath-the-cursor "white" jidanni
@ 2008-06-10  8:10 ` Peter Dyballa
  2008-06-10 17:04 ` Joel J. Adamson
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Dyballa @ 2008-06-10  8:10 UTC (permalink / raw)
  To: jidanni; +Cc: help-gnu-emacs


Am 10.06.2008 um 01:45 schrieb jidanni:

> But then how can I do something like
> (set-the-color-of-the-character-underneath-the-cursor "white")


In my Emacsen the cursor turns the character's colour from foreground  
colour or any face to white. My cursor colours are all not black,  
only GNU Emacs 20.7 (powerpc-apple-darwin8.2.0, *Step 8.0-rc5) does  
not follow this ...


Since this works im Emacsen 21.x, 22.x, and 23.x, I presume you have  
some setting in your init files that change the default behaviour.  
Could you launch GNU Emacs with -Q (and another time with -q) and see  
how the cursor works?

--
Greetings

   Pete

And always remember the last words of my grandfather, who said: “A  
truck!”
				— Emo Phillips







^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: set-the-color-of-the-character-underneath-the-cursor "white"
  2008-06-09 23:45 set-the-color-of-the-character-underneath-the-cursor "white" jidanni
  2008-06-10  8:10 ` Peter Dyballa
@ 2008-06-10 17:04 ` Joel J. Adamson
  1 sibling, 0 replies; 3+ messages in thread
From: Joel J. Adamson @ 2008-06-10 17:04 UTC (permalink / raw)
  To: jidanni; +Cc: help-gnu-emacs

jidanni@jidanni.org writes:

> (set-the-color-of-the-character-underneath-the-cursor "white")
> if somebody can give me an example of how I might write that one line
> it would be great.

You could probably do it, but it would be a lot easier to customize the
cursor face.  The background is the color of the cursor and the foreground
is the color of the character "underneath" the cursor.

I use a black background, with a pink cursor, and the character beneath
the cursor is black (my default face color is white).

Joel

-- 
Joel J. Adamson
(303) 880-3109
Public key: http://pgp.mit.edu
Homepage: http://www.unc.edu/~adamsonj
Please read http://www.unc.edu/~adamsonj/roe.html




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-06-10 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 23:45 set-the-color-of-the-character-underneath-the-cursor "white" jidanni
2008-06-10  8:10 ` Peter Dyballa
2008-06-10 17:04 ` Joel J. Adamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).