From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jerry James Newsgroups: gmane.emacs.devel Subject: Re: make-field suggestion Date: Tue, 07 Sep 2004 10:32:46 -0500 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1094571210 765 80.91.224.253 (7 Sep 2004 15:33:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Sep 2004 15:33:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 07 17:33:18 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C4hyA-00015L-00 for ; Tue, 07 Sep 2004 17:33:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4i3O-0007s9-9a for ged-emacs-devel@m.gmane.org; Tue, 07 Sep 2004 11:38:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C4i3G-0007oC-5Z for emacs-devel@gnu.org; Tue, 07 Sep 2004 11:38:34 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C4i3F-0007nK-BH for emacs-devel@gnu.org; Tue, 07 Sep 2004 11:38:33 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C4i3F-0007mD-8q for emacs-devel@gnu.org; Tue, 07 Sep 2004 11:38:33 -0400 Original-Received: from [129.237.125.220] (helo=stephens.ittc.ku.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C4hxi-0003vI-A8; Tue, 07 Sep 2004 11:32:50 -0400 Original-Received: from diannao.ittc.ku.edu (diannao.ittc.ku.edu [129.237.126.112]) by stephens.ittc.ku.edu (8.12.11/8.12.10/ITTC-ANTISPAM-ANTIVIRUS-3.1) with ESMTP id i87FWkMD027672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 7 Sep 2004 10:32:46 -0500 Original-Received: from diannao.ittc.ku.edu (localhost [127.0.0.1]) by diannao.ittc.ku.edu (8.12.11/8.12.11) with ESMTP id i87FWkGF014718; Tue, 7 Sep 2004 10:32:46 -0500 Original-Received: (from james@localhost) by diannao.ittc.ku.edu (8.12.11/8.12.11/Submit) id i87FWkoo014717; Tue, 7 Sep 2004 10:32:46 -0500 X-Authentication-Warning: diannao.ittc.ku.edu: james set sender to james@eecs.ku.edu using -f Original-To: rms@gnu.org X-Face: +5(Pfr,; N>q#6NT,Qi5^TQh-MaUnz#kGN~OW[CQj~RS+sIor( '_8K^f9u^Y#.N`>9oKN$\JpI In-Reply-To: (Richard Stallman's message of "Wed, 01 Sep 2004 00:57:24 -0400") User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chayote, linux) X-VirusScan: Clean X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26857 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26857 Richard Stallman , on Wed, 01 Sep 2004 at 00:57:24 -0400 you wrote: > I would like to suggest the make-field interface for Emacs. The Emacs > version would look something like this, if defaulting to text properties > is okay: > > (defun make-field (from to value &optional buffer) > "Make a field with value VALUE over the range [FROM, TO) in BUFFER. > BUFFER defaults to the current buffer." > (with-current-buffer (or buffer (current-buffer)) > (put-text-property from to 'field value))) > > We can certainly install something like this, once it is clear what is > best. It depends, I suppose, on how someone would plan to use it. The reason for having a make-field function is to complete the abstraction. It is almost possible to treat fields as abstract data types using field-beginning, etc., but it is not possible to create them without breaking the abstraction. Regards, -- Jerry James http://www.ittc.ku.edu/~james/