From: "Michael Durland" <mdurland@ix.netcom.com>
Subject: Re: virtual space?
Date: Wed, 22 Oct 2003 01:33:05 GMT [thread overview]
Message-ID: <l7llb.461$I04.239@newsread4.news.pas.earthlink.net> (raw)
In-Reply-To: jwv65ii8wwd.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca
"Stefan Monnier" <monnier@iro.umontreal.ca> wrote in message
news:jwv65ii8wwd.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca...
> > Having a virtual cursor would solve the problem.
>
>
> Neither is it for me. At first, it would seem like it'd be very difficult
> to implement, but now that I think about it, I believe it can be done
purely
> in elisp: When going "past the last char" of a line, just add an overlay
at
> the end of the line with an `after-string' property of " ". At least
> here (Emacs-CVS), it seems to move the cursor according to the number of
> spaces you've put, so you can place the cursor where you want on screen
> without modifying the buffer text. The tricky part will be to make the
> other commands work correctly by replacing the overlay with actual spaces
> before doing an insertion.
>
This sounds cool! So is it possible to implement a virtual cursor entirely
as an overlay? I'm imagining that the real cursor would have to be hidden,
but always follow the virtual cursor where there is text. Where there isn't
text, the virtual cursor would travel away from the real cursor. Then when
the virtual cursor got back on to real text, they would sync up again. If
text was inserted at the virtual cursor, yes whitespace would need to be
added to pad the real cursor out to the virtual cursor, but this is
expected. I know a little about overlays, but not enough to write one from
scratch. I'm learning. Any guidance down this path would be appreciated.
Thanks,
Mike
next prev parent reply other threads:[~2003-10-22 1:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-19 21:31 virtual space? Michael Durland
2003-10-19 21:52 ` Sudarshan S. Chawathe
2003-10-19 23:25 ` Michael Durland
2003-10-20 5:36 ` Björn Lindström
2003-10-21 1:52 ` Michael Durland
2003-10-21 4:07 ` Dan Anderson
2003-10-21 5:44 ` Eli Zaretskii
2003-10-21 8:47 ` Barman Brakjoller
2003-10-21 15:04 ` Stefan Monnier
2003-10-22 1:33 ` Michael Durland [this message]
[not found] ` <mailman.2047.1066715377.21628.help-gnu-emacs@gnu.org>
2003-10-22 1:26 ` Michael Durland
2003-10-22 14:37 ` Eli Zaretskii
[not found] ` <mailman.2213.1066834114.21628.help-gnu-emacs@gnu.org>
2003-10-22 15:55 ` Kevin Rodgers
2003-10-22 17:44 ` Eli Zaretskii
[not found] ` <mailman.2225.1066844986.21628.help-gnu-emacs@gnu.org>
2003-12-02 21:09 ` Kai Grossjohann
2003-10-22 17:29 ` Stefan Monnier
2003-12-02 21:04 ` Kai Grossjohann
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='l7llb.461$I04.239@newsread4.news.pas.earthlink.net' \
--to=mdurland@ix.netcom.com \
/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.
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).