From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stephen Compall Newsgroups: gmane.lisp.guile.devel Subject: text buffers (was Re: Unicode and Guile) Date: 03 Nov 2003 13:35:33 +0000 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <20031021171534.GA13246@lark> <200310260003.RAA10375@morrowfield.regexps.com> <20031031132525.GB715@lark> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1067869179 8411 80.91.224.253 (3 Nov 2003 14:19:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 3 Nov 2003 14:19:39 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Nov 03 15:19:37 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AGfYP-0004Ym-00 for ; Mon, 03 Nov 2003 15:19:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AGfTP-0005Ic-Eh for guile-devel@m.gmane.org; Mon, 03 Nov 2003 09:14:27 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AGfFH-0003pF-Hj for guile-devel@gnu.org; Mon, 03 Nov 2003 08:59:51 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AGf1m-0001Uq-DX for guile-devel@gnu.org; Mon, 03 Nov 2003 08:46:25 -0500 Original-Received: from [192.195.228.35] (helo=csserver.evansville.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AGex9-0000yL-Rg for guile-devel@gnu.org; Mon, 03 Nov 2003 08:41:07 -0500 Original-Received: from csserver.evansville.edu (localhost.localdomain [127.0.0.1]) by csserver.evansville.edu (8.12.8/8.12.8) with ESMTP id hA3DZXBT003372 for ; Mon, 3 Nov 2003 07:35:33 -0600 Original-Received: (from sc87@localhost) by csserver.evansville.edu (8.12.8/8.12.8/Submit) id hA3DZXtX003368; Mon, 3 Nov 2003 13:35:33 GMT X-Authentication-Warning: csserver.evansville.edu: sc87 set sender to s11@member.fsf.org using -f Original-To: guile-devel@gnu.org In-Reply-To: <20031031132525.GB715@lark> Original-Lines: 43 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2967 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2967 > 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