all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23884: 24.5; `(query)-replace-regexp` doc: be clearer about \N
@ 2016-07-02 14:36 Drew Adams
  2016-07-02 15:06 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Drew Adams @ 2016-07-02 14:36 UTC (permalink / raw)
  To: 23884

Please make it clear what N is in \N in a replacement pattern.  State
that \0 matches the entire input pattern, rather than the first
subgroup.  Users of Emacs regexps might be used to this, but it doesn't
hurt to call it out explicitly in this doc (both manual and doc
strings).

Here is proof that at least one user, who was trying to use this feature
normally, and seems to be quite competent, tried to use \0 to match the
first subgroup:

http://emacs.stackexchange.com/q/24329/105

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --host=i686-pc-mingw32'





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

* bug#23884: 24.5; `(query)-replace-regexp` doc: be clearer about \N
  2016-07-02 14:36 bug#23884: 24.5; `(query)-replace-regexp` doc: be clearer about \N Drew Adams
@ 2016-07-02 15:06 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2016-07-02 15:06 UTC (permalink / raw)
  To: Drew Adams; +Cc: 23884-done

> Date: Sat, 2 Jul 2016 07:36:23 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> 
> Please make it clear what N is in \N in a replacement pattern.  State
> that \0 matches the entire input pattern, rather than the first
> subgroup.  Users of Emacs regexps might be used to this, but it doesn't
> hurt to call it out explicitly in this doc (both manual and doc
> strings).
> 
> Here is proof that at least one user, who was trying to use this feature
> normally, and seems to be quite competent, tried to use \0 to match the
> first subgroup:
> 
> http://emacs.stackexchange.com/q/24329/105

Whole generations of programmers were brain-washed with the zero-based
counting, and with the idea that reading the documentation is not
necessary.

Fixed.





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

end of thread, other threads:[~2016-07-02 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-02 14:36 bug#23884: 24.5; `(query)-replace-regexp` doc: be clearer about \N Drew Adams
2016-07-02 15:06 ` 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.