all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16106: 24.3.50; doc of `replace-match'
@ 2013-12-10 23:56 Drew Adams
  2014-02-08  2:54 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2013-12-10 23:56 UTC (permalink / raw)
  To: 16106

State (in doc string and Elisp manual) that N in \N is not just "a
digit" but a digit from 1 through 9.  Make clear that in "Nth
subexpression", N is one-based, not zero-based.

In GNU Emacs 24.3.50.2 (i686-pc-mingw32)
 of 2013-11-28 on LEG570
Bzr revision: 115271 rgm@gnu.org-20131128203155-qjc1xsp19z2k64b2
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'





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

* bug#16106: 24.3.50; doc of `replace-match'
  2013-12-10 23:56 bug#16106: 24.3.50; doc of `replace-match' Drew Adams
@ 2014-02-08  2:54 ` Lars Ingebrigtsen
  2014-02-08  3:33   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-08  2:54 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16106

Drew Adams <drew.adams@oracle.com> writes:

> State (in doc string and Elisp manual) that N in \N is not just "a
> digit" but a digit from 1 through 9.  Make clear that in "Nth
> subexpression", N is one-based, not zero-based.

I don't think that makes any sense.  The wording is:

  `\N' means substitute what matched the Nth `\(...\)'.
       If Nth parens didn't match, substitute nothing.

I can't see anybody interpreting Nth as having "zeroth" as a valid
meaning.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





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

* bug#16106: 24.3.50; doc of `replace-match'
  2014-02-08  2:54 ` Lars Ingebrigtsen
@ 2014-02-08  3:33   ` Drew Adams
  2014-02-10  6:56     ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2014-02-08  3:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16106

> > State (in doc string and Elisp manual) that N in \N is not just "a
> > digit" but a digit from 1 through 9.  Make clear that in "Nth
> > subexpression", N is one-based, not zero-based.
> 
> I don't think that makes any sense.  The wording is:
> 
>   `\N' means substitute what matched the Nth `\(...\)'.
>        If Nth parens didn't match, substitute nothing.
> 
> I can't see anybody interpreting Nth as having "zeroth" as a valid
> meaning.

Most things in Emacs and Lisp in general are zero-based.
It is not obvious that this is one-based.  And Oth and zeroth
make as much sense as 1th and oneth.  If counting is zero-based
then the 0th element is exactly that: the entry that is indexed
by the number zero.





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

* bug#16106: 24.3.50; doc of `replace-match'
  2014-02-08  3:33   ` Drew Adams
@ 2014-02-10  6:56     ` Drew Adams
  0 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2014-02-10  6:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16106

> Most things in Emacs and Lisp in general are zero-based.
> It is not obvious that this is one-based.  And Oth and zeroth
> make as much sense as 1th and oneth.  If counting is zero-based
> then the 0th element is exactly that: the entry that is indexed
> by the number zero.

Let me put it differently: Is there a good reason NOT to say that
"N is a digit from 1 through 9"?





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

end of thread, other threads:[~2014-02-10  6:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-10 23:56 bug#16106: 24.3.50; doc of `replace-match' Drew Adams
2014-02-08  2:54 ` Lars Ingebrigtsen
2014-02-08  3:33   ` Drew Adams
2014-02-10  6:56     ` Drew Adams

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.