* overlays inserted
@ 2006-06-20 11:10 Daniel Carvalho
2006-06-20 11:40 ` Kim F. Storm
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Carvalho @ 2006-06-20 11:10 UTC (permalink / raw)
hi,
I wan't to display a message in the screen, that follows the mouse
cursor.
I can track the mouse movement using the functions "track-mouse" and
"read-event". Then i would make an overlay to display the message at
that point.
(setq ov (make-overlay pos (+ pos 5)))
(overlay-put ov 'face cara)
(overlay-put ov 'before-string ">> <<")
then, i would use the function "move-overlay" to move the message.
The problem is that the value of the "before-string" property is
displayed as if INSERTED in the buffer text. The text after the point is
displayed shifted to the right. Is it possible to create an overlay the
OVERWRITES the text? (but without having to edit the buffer)
thanks
daniel
--
-> danielpc@fastmail.fm
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: overlays inserted
2006-06-20 11:10 overlays inserted Daniel Carvalho
@ 2006-06-20 11:40 ` Kim F. Storm
0 siblings, 0 replies; 3+ messages in thread
From: Kim F. Storm @ 2006-06-20 11:40 UTC (permalink / raw)
Cc: help-gnu-emacs
"Daniel Carvalho" <dcarvalho@xsmail.com> writes:
> (setq ov (make-overlay pos (+ pos 5)))
> (overlay-put ov 'face cara)
> (overlay-put ov 'before-string ">> <<")
>
> then, i would use the function "move-overlay" to move the message.
>
> The problem is that the value of the "before-string" property is
> displayed as if INSERTED in the buffer text. The text after the point is
> displayed shifted to the right. Is it possible to create an overlay the
> OVERWRITES the text? (but without having to edit the buffer)
Try:
(setq ov (make-overlay pos (+ pos 5)))
(overlay-put ov 'face cara)
(overlay-put ov 'display ">> <<")
--
Kim F. Storm http://www.cua.dk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: overlays inserted
[not found] <mailman.3050.1150801839.9609.help-gnu-emacs@gnu.org>
@ 2006-06-20 13:00 ` Johan Bockgård
0 siblings, 0 replies; 3+ messages in thread
From: Johan Bockgård @ 2006-06-20 13:00 UTC (permalink / raw)
"Daniel Carvalho" <dcarvalho@xsmail.com> writes:
> The problem is that the value of the "before-string" property is
> displayed as if INSERTED in the buffer text. The text after the
> point is displayed shifted to the right. Is it possible to create an
> overlay the OVERWRITES the text? (but without having to edit the
> buffer)
Use the `display' property.
--
Johan Bockgård
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-20 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-20 11:10 overlays inserted Daniel Carvalho
2006-06-20 11:40 ` Kim F. Storm
[not found] <mailman.3050.1150801839.9609.help-gnu-emacs@gnu.org>
2006-06-20 13:00 ` Johan Bockgård
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).