From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: make-field suggestion Date: Wed, 8 Sep 2004 18:44:51 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <20040908224451.GA14164@fencepost> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1094683534 26522 80.91.224.253 (8 Sep 2004 22:45:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 8 Sep 2004 22:45:34 +0000 (UTC) Cc: emacs-devel@gnu.org, Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 09 00:45:28 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 1C5BBv-0001ei-00 for ; Thu, 09 Sep 2004 00:45:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5BHD-00042g-RS for ged-emacs-devel@m.gmane.org; Wed, 08 Sep 2004 18:50:55 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C5BH3-000403-Kw for emacs-devel@gnu.org; Wed, 08 Sep 2004 18:50:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C5BH2-0003zN-VC for emacs-devel@gnu.org; Wed, 08 Sep 2004 18:50:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5BH2-0003zE-QD for emacs-devel@gnu.org; Wed, 08 Sep 2004 18:50:44 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C5BBM-0001Fs-6e for emacs-devel@gnu.org; Wed, 08 Sep 2004 18:44:53 -0400 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.34) id 1C5BBL-0004Jr-OC; Wed, 08 Sep 2004 18:44:51 -0400 Original-To: Jerry James Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i Blat: Foop 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:26904 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26904 On Wed, Sep 08, 2004 at 05:26:22PM -0500, Jerry James wrote: > > I think some attention should be paid to the issue of creating > > text-property fields vs. overlay fields -- both are useful in different > > circumstances, so any `make-field' function should allow creating both > > (or there should be multiple `make...field' functions). > > That makes sense. How about something like this? > > (defun make-field (from to value &optional buffer front-advance rear-advance > use-text-props) The question remains which should be the default -- most current uses of fields use text properties; perhaps this is not the right thing, but it's worth considering. > I'm not sure what this function could usefully return. It ought to > return a reference to a field object, but there is no such thing. In the button package the text-property variants just return the position of the first character, since for text properties that's usable as a handle to get at the properties (the various abstract button- operations know how to deal with both positions and overlays). Since all current field functions use the buffer position anyway, this should work for both overlays and text-properties. -Miles -- `Life is a boundless sea of bitterness'