* Re: [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring'.
[not found] <E1VAAWJ-0007pJ-65@vcs.savannah.gnu.org>
@ 2013-08-16 3:53 ` Stefan Monnier
2013-08-16 6:19 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2013-08-16 3:53 UTC (permalink / raw
To: Xue Fuqiao; +Cc: emacs-devel
> +into the current buffer before point. The text inserted is the region
> +between @var{start} (inclusive) and @var{end} (exclusive). (These
That is misleading: buffer positions are *between* characters (or
alternatively, characters are placed *between* buffer positions).
Talking about "inclusive" and "exclusive" here makes it sound like
buffer positions are placed *on* characters.
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring'.
2013-08-16 3:53 ` [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring' Stefan Monnier
@ 2013-08-16 6:19 ` Eli Zaretskii
2013-08-16 16:20 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2013-08-16 6:19 UTC (permalink / raw
To: Stefan Monnier; +Cc: xfq.free, emacs-devel
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Thu, 15 Aug 2013 23:53:49 -0400
> Cc: emacs-devel@gnu.org
>
> > +into the current buffer before point. The text inserted is the region
> > +between @var{start} (inclusive) and @var{end} (exclusive). (These
>
> That is misleading: buffer positions are *between* characters (or
> alternatively, characters are placed *between* buffer positions).
> Talking about "inclusive" and "exclusive" here makes it sound like
> buffer positions are placed *on* characters.
Are you saying that characters don't have positions? We say
"character at POSITION", and we mean that. What is misleading here?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring'.
2013-08-16 6:19 ` Eli Zaretskii
@ 2013-08-16 16:20 ` Stefan Monnier
2013-08-16 18:43 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2013-08-16 16:20 UTC (permalink / raw
To: Eli Zaretskii; +Cc: xfq.free, emacs-devel
> Are you saying that characters don't have positions?
Obviously not.
> We say "character at POSITION", and we mean that.
We do say that at times, but note that the functions we provide have
names like `char-after' and `char-before'. The naming was sometimes
poorly chosen (e.g. `text-properties-at'), so we're not completely
consistent here.
> What is misleading here?
That saying explicitly "inclusive" and "exclusive" means that using "at"
is not just an abuse of language but is really how things should
be understood.
If we want to be more explicit, then rather than using "inclusive" and
"exclusive", I'd rather we add a blurb like "Remember that positions are
/between/ characters, so the char right \"at\" END will not be included".
Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring'.
2013-08-16 16:20 ` Stefan Monnier
@ 2013-08-16 18:43 ` Eli Zaretskii
2013-08-17 22:27 ` Xue Fuqiao
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2013-08-16 18:43 UTC (permalink / raw
To: Stefan Monnier; +Cc: xfq.free, emacs-devel
> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: xfq.free@gmail.com, emacs-devel@gnu.org
> Date: Fri, 16 Aug 2013 12:20:02 -0400
>
> If we want to be more explicit, then rather than using "inclusive" and
> "exclusive", I'd rather we add a blurb like "Remember that positions are
> /between/ characters, so the char right \"at\" END will not be included".
What's the difference? Both say that character at END will be
excluded.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring'.
2013-08-16 18:43 ` Eli Zaretskii
@ 2013-08-17 22:27 ` Xue Fuqiao
2013-08-18 19:30 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Xue Fuqiao @ 2013-08-17 22:27 UTC (permalink / raw
To: Eli Zaretskii; +Cc: Stefan Monnier, emacs-devel
This rule applies to all functions that use the region. More generally,
it applies all functions that use BEG and END if they are buffer positions.
Since there are too many functions, IMO a better approach is remove them
("inclusive" and "exclusive") from their own documentation and add a
blurb like Stefan said in a node like (info "(elisp) The Region").
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring'.
2013-08-17 22:27 ` Xue Fuqiao
@ 2013-08-18 19:30 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2013-08-18 19:30 UTC (permalink / raw
To: Xue Fuqiao; +Cc: monnier, emacs-devel
> Date: Sun, 18 Aug 2013 06:27:25 +0800
> From: Xue Fuqiao <xfq.free@gmail.com>
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel <emacs-devel@gnu.org>
>
> This rule applies to all functions that use the region. More generally,
> it applies all functions that use BEG and END if they are buffer positions.
>
> Since there are too many functions, IMO a better approach is remove them
> ("inclusive" and "exclusive") from their own documentation and add a
> blurb like Stefan said in a node like (info "(elisp) The Region").
Like I said, I don't see anything wrong with "inclusive" and
"exclusive". But if you want a good place to add such a blurb, do
that in the preamble in the node "Text", which already tries to say
something along these lines. By contrast, "The Region" is only about
the region between mark and point, which is not entirely relevant to
the functions that accept BEG and END as arguments, because these
arguments don't have to come from the region limits.
Btw, this rule applies to string positions as well, I think.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-18 19:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1VAAWJ-0007pJ-65@vcs.savannah.gnu.org>
2013-08-16 3:53 ` [Emacs-diffs] trunk r113909: Refine the documentation of `insert-buffer-substring' Stefan Monnier
2013-08-16 6:19 ` Eli Zaretskii
2013-08-16 16:20 ` Stefan Monnier
2013-08-16 18:43 ` Eli Zaretskii
2013-08-17 22:27 ` Xue Fuqiao
2013-08-18 19:30 ` Eli Zaretskii
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.