From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.help Subject: Re: About `constrain-to-field' Date: Tue, 19 Mar 2013 07:16:03 +0800 Organization: The Church of Emacs Message-ID: <20130319071603.50dc7c163a34a31cfe6953d8@gmail.com> References: <20130318222037.e6e17edb5bc749fd27052199@gmail.com> <83ppyw1ufb.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1363648606 18814 80.91.229.3 (18 Mar 2013 23:16:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Mar 2013 23:16:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 19 00:17:12 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UHjIj-0000Z1-66 for geh-help-gnu-emacs@m.gmane.org; Tue, 19 Mar 2013 00:17:09 +0100 Original-Received: from localhost ([::1]:44361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjIM-0005ji-58 for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Mar 2013 19:16:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:32897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjI7-0005jY-V9 for help-gnu-emacs@gnu.org; Mon, 18 Mar 2013 19:16:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHjI6-0001Yh-8J for help-gnu-emacs@gnu.org; Mon, 18 Mar 2013 19:16:31 -0400 Original-Received: from mail-pd0-f172.google.com ([209.85.192.172]:52464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHjI6-0001YM-1r for help-gnu-emacs@gnu.org; Mon, 18 Mar 2013 19:16:30 -0400 Original-Received: by mail-pd0-f172.google.com with SMTP id w10so973800pde.31 for ; Mon, 18 Mar 2013 16:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:in-reply-to:references :organization:x-mailer:mime-version:content-type :content-transfer-encoding; bh=B8NIU4F7mNx5gsK73ZTuhygS+zQZAUTA+xj513oH0+Y=; b=UWL39uPinVYZCpj3cz4tuKTVYy5P/ITl6y41uD2kzNQwFTZDD4ak3eonql4VilfLNR sU8xx2kxlN8/c46U9fTqTgpGVfSpHb48/xD36FsnMIYh4YkkGyrv/gRIsqBFeBIJkvjZ oXMHFm3o3QSyCsskPo8AdoIfkKdIK8qON1i2t3Pv/PeB1jbRC2cD/6PEqyQAGcHHj6o2 n5dwhSiEOULiUFpzj6GJKs+XpPvkss0+glY824fEGmzw69UT5VcuTaFUAXdb9NPCbFaI dssQYQR7y/6OcB1iHKDDK2aYkYGTnrSMCNew15kOXPVN3rQGfIQG6Jn5eFEXf0Hhpyfn Bxew== X-Received: by 10.66.228.74 with SMTP id sg10mr130773pac.48.1363648568766; Mon, 18 Mar 2013 16:16:08 -0700 (PDT) Original-Received: from Emacs ([192.81.128.82]) by mx.google.com with ESMTPS id rt13sm9881834pac.14.2013.03.18.16.16.05 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Mar 2013 16:16:07 -0700 (PDT) In-Reply-To: <83ppyw1ufb.fsf@gnu.org> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.192.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89590 Archived-At: On Mon, 18 Mar 2013 19:36:56 +0200 Eli Zaretskii wrote: > > I have read (info "(elisp) Fields") and doc string of the function > > `constrain-to-field', but I cannot understand what this function does, > > especially for its optional arguments. > I suggest to grep the Emacs Lisp sources, there are several examples > there. Thanks. It is used in paragraphs.el, simple.el and comint.el. I have read the definition for `delete-horizontal-space', because it is not very complex (comparing with `next-line') and it is written in Lisp (comparing to `beginning-of-line'). But the sexp `(constrain-to-field nil orig-pos t)' is the only expression I don't understand in this function. Is there any relation between field and whitespace? > As for the documentation, the manual sounds very clear to me, so I > suggest to ask specific questions about the parts that confuse you. I did some experiments. I used this function with or without optional arguments to a range of consecutive characters in the buffer that are identified by having the same value of the `field' property. But whether they are in the same line or not, the value returned is always equal to OLD-POS. -- Xue Fuqiao http://www.gnu.org/software/emacs/