unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stephen Compall <s11@member.fsf.org>
Subject: text buffers (was Re: Unicode and Guile)
Date: 03 Nov 2003 13:35:33 +0000	[thread overview]
Message-ID: <xfyfzh5wp5m.fsf_-_@csserver.evansville.edu> (raw)
In-Reply-To: <20031031132525.GB715@lark>

> There's a need for a new type, `text', which acts like the text
> contents of an emacs buffer and has (yes I agree) pretty much the
> Emacs interface. It should all be designed so that, internally,
> people can write new ways to represent text objects and multiple
> text object representations can coexist in the same application
> (just like emacs).  There's no good reason not to throw in
> attributes, overlays, and markers for text objects too (just like
> emacs).

I am working on sort-of transcribing the code in emacs/src/buffer.[hc]
into a "buffer" data type in a Guile module.  I need this because I am
terribly dependent on buffers for almost any kind of data processing
:)

The advantages of transcribing Emacs source are fewer bugs and
carrying over the lovely optimizations, like the gap, that make
buffers work.

Right now, markers are part of the `impl_buffer' C data type.  The
intention of `impl_buffer' is to push most of the "good" interface out
to a goops class.  However, some of the details, like overlays, may be
better to leave as object properties or new behavior in subclasses,
rather than explicitly in impl_buffer as Emacs does it.  And then just
specify that even when (point buf) => 100, and (- (point-max buf)
(point-min buf)) => something over 100, (forward-char buf) won't
necessarily make (point buf) => 101 :)

The other interesting extension is making markers ports.  Generics
also provide a solution to the whole "current buffer" annoyance.

On a tangent, would it be useful to generalize the gap concept to be
available to any collection, not just ordered collections of
characters?

--
Stephen Compall or s11 or sirian

Intellect annuls Fate.
So far as a man thinks, he is free.
		-- Ralph Waldo Emerson

afsatcom INSCOM JPL broadside Defcon Waco, Texas BCCI kibo Ermes Reno
Crypto AG Telex jihad Panama 22nd SAS


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2003-11-03 13:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21 17:15 Unicode and Guile Andy Wingo
2003-10-25 17:08 ` Stephen Compall
2003-10-26  0:03   ` Tom Lord
2003-10-26 12:34     ` Which Encoding? (was Re: Unicode and Guile) Stephen Compall
2003-10-31 13:25     ` Unicode and Guile Andy Wingo
2003-11-03 13:35       ` Stephen Compall [this message]
2003-11-03 20:34         ` text buffers (was Re: Unicode and Guile) Tom Lord
2003-11-04 10:04           ` Stephen Compall
2003-11-03 20:31       ` Unicode and Guile Tom Lord
2003-11-06 18:16         ` Andy Wingo
2003-11-11 19:02           ` Tom Lord
2003-11-12  0:29             ` Marius Vollmer
2003-11-12  1:40               ` Tom Lord
2003-11-12  2:30                 ` Marius Vollmer
2003-11-12  4:03                   ` Tom Lord
2003-11-12 16:59                     ` Marius Vollmer
2003-11-17 16:17             ` Andy Wingo
2003-11-12  0:06           ` Marius Vollmer
2003-11-12  1:27             ` Tom Lord
2003-10-31 13:16   ` Andy Wingo
2003-11-02 21:23 ` Kevin Ryde
2003-11-26 20:35 ` Mikael Djurfeldt

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/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xfyfzh5wp5m.fsf_-_@csserver.evansville.edu \
    --to=s11@member.fsf.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.
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).