From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Newsgroups: gmane.emacs.devel Subject: Re: make-field suggestion Date: 31 Aug 2004 11:39:48 -0400 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 1093966853 9588 80.91.224.253 (31 Aug 2004 15:40:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Aug 2004 15:40:53 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 31 17:40:21 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 1C2Ak9-0001t8-00 for ; Tue, 31 Aug 2004 17:40:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2Ap1-0004gE-Lf for ged-emacs-devel@m.gmane.org; Tue, 31 Aug 2004 11:45:23 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C2Aom-0004dh-Sy for emacs-devel@gnu.org; Tue, 31 Aug 2004 11:45:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C2Aok-0004dG-If for emacs-devel@gnu.org; Tue, 31 Aug 2004 11:45:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C2Aok-0004dD-Et for emacs-devel@gnu.org; Tue, 31 Aug 2004 11:45:06 -0400 Original-Received: from [206.47.199.165] (helo=simmts7-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C2Ajd-0008Do-Ps for emacs-devel@gnu.org; Tue, 31 Aug 2004 11:39:50 -0400 Original-Received: from empanada-wifi.home ([67.68.216.70]) by simmts7-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20040831153755.LNEP1960.simmts7-srv.bellnexxia.net@empanada-wifi.home>; Tue, 31 Aug 2004 11:37:55 -0400 Original-Received: by empanada-wifi.home (Postfix, from userid 502) id B3FF52CEE52; Tue, 31 Aug 2004 11:39:48 -0400 (EDT) Original-To: Jerry James In-Reply-To: Original-Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:26652 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26652 > (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." > (overlay-put (make-overlay from to buffer) 'field value)) The only place where I've use fields is for minibuffer-like entry things with completion (where I reuse the minibuffer completion code, suitably fixed not to assume it's in a minibuffer). In such cases, it's often important that if the user reduces the size of the field to 0 it can still grow it back later on by inserting text into it, i.e. I've had to use an overlay and it had to be created as: (make-overlay from to nil nil t) so I suggest to at least make it possible to pass the front/rear stickiness as an argument. Stefan