all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* About `constrain-to-field'
@ 2013-03-18 14:20 Xue Fuqiao
  2013-03-18 17:36 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Xue Fuqiao @ 2013-03-18 14:20 UTC (permalink / raw
  To: help-gnu-emacs

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've searched the archive of this mailing list, but the only two
results are about whitespace characters removing.  Maybe I need
example(s) and some explanation.

-- 
Xue Fuqiao
http://www.gnu.org/software/emacs/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About `constrain-to-field'
  2013-03-18 14:20 About `constrain-to-field' Xue Fuqiao
@ 2013-03-18 17:36 ` Eli Zaretskii
  2013-03-18 23:16   ` Xue Fuqiao
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2013-03-18 17:36 UTC (permalink / raw
  To: help-gnu-emacs

> Date: Mon, 18 Mar 2013 22:20:37 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
> 
> 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've searched the archive of this mailing list, but the only two
> results are about whitespace characters removing.  Maybe I need
> example(s) and some explanation.

I suggest to grep the Emacs Lisp sources, there are several examples
there.

As for the documentation, the manual sounds very clear to me, so I
suggest to ask specific questions about the parts that confuse you.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About `constrain-to-field'
  2013-03-18 17:36 ` Eli Zaretskii
@ 2013-03-18 23:16   ` Xue Fuqiao
  0 siblings, 0 replies; 3+ messages in thread
From: Xue Fuqiao @ 2013-03-18 23:16 UTC (permalink / raw
  To: help-gnu-emacs

On Mon, 18 Mar 2013 19:36:56 +0200
Eli Zaretskii <eliz@gnu.org> 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/



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-18 23:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 14:20 About `constrain-to-field' Xue Fuqiao
2013-03-18 17:36 ` Eli Zaretskii
2013-03-18 23:16   ` Xue Fuqiao

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.