From: Kenichi Handa <handa@m17n.org>
Cc: monnier+gnu/emacs@rum.cs.yale.edu
Subject: Re: overlay property `after-string'
Date: Fri, 11 Apr 2003 15:30:33 +0900 (JST) [thread overview]
Message-ID: <200304110630.PAA18689@etlken.m17n.org> (raw)
In-Reply-To: <buofzopwrs0.fsf@mcspd15.ucom.lsi.nec.co.jp> (message from Miles Bader on 11 Apr 2003 14:02:23 +0900)
In article <buofzopwrs0.fsf@mcspd15.ucom.lsi.nec.co.jp>, Miles Bader <miles@lsi.nec.co.jp> writes:
> It's dependent on the insertion-type of the overlay; basically, the
> cursor should be displayed relative to the overlay text wherever text
> will be inserted relative to the overlay text.
> For instance, try this modified version of your example:
> (let (overlay)
> (insert "abc")
> (setq overlay (make-overlay (- (point) 3) (point) nil nil t))
> (overlay-put overlay 'after-string "[hello]"))
> Now type -- whoa, wierd!
I see your point. You mean this:
Showing the cursor at where the next typed character
will be displayed.
Correct?
I agree that it is the best behaviour, but, yes, fixing
seems very difficult.
By the way, we will encouter this very tricky case, but it
seems ok to igore such a case.
(let (ov1 ov2)
(insert "abcdef")
(setq ov1 (make-overlay (- (point) 6) (- (point) 3) nil nil t))
(overlay-put ov1 'after-string "[hello]")
(setq ov2 (make-overlay (- (point) 3) (point)))
(overlay-put ov2 'before-string "[world]")
(forward-char -3)
(unwind-protect
(while t
(insert (read-char))
(message (format "%d-%d, %d-%d"
(overlay-start ov1) (overlay-end ov1)
(overlay-start ov2) (overlay-end ov2))))
(delete-overlay ov1)
(delete-overlay ov2)))
---
Ken'ichi HANDA
handa@m17n.org
next prev parent reply other threads:[~2003-04-11 6:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-10 1:44 Potential problem of minibuffer-message Kenichi Handa
2003-04-10 13:44 ` Stefan Monnier
2003-04-11 2:22 ` Kenichi Handa
2003-04-11 2:38 ` Miles Bader
2003-04-11 4:31 ` Kenichi Handa
2003-04-11 4:37 ` Miles Bader
2003-04-11 4:53 ` overlay property `after-string' Kenichi Handa
2003-04-11 5:02 ` Miles Bader
2003-04-11 6:30 ` Kenichi Handa [this message]
2003-04-13 11:23 ` Potential problem of minibuffer-message Richard Stallman
2003-04-10 22:47 ` Richard Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304110630.PAA18689@etlken.m17n.org \
--to=handa@m17n.org \
--cc=monnier+gnu/emacs@rum.cs.yale.edu \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).