Subject: 26.3; regular expressions documentation

From: jan <[email-masked]>
Date: Fri, 1 May 2020 20:06:06 +0100

Hi, 3 issues (nothing major).

1. Suggest emacs' excellent documentation should not distinguish between
Regexps and Regexp Backslash in the manual.
That is, these 2 should be combined:

  * Regexps::                   Syntax of regular expressions.
  * Regexp Backslash::          Regular expression constructs starting with ‘\’.

AFAICS the difference is purely arbitrary.
There have been times I've looked for the syntax for such syntax and
found it only because I knew it was there, but not in the same
section. A beginner might conclude emacs doesn't support them.

2. The documentation for {N, M} repetitions matching is incomplete (has
been a long time). Docs say M may be omitted but from testing I find N
may be omitted also ie \{,M\} is valid, and useful.

eg.

ba\{,2\}d

correctly matches only the top 2 of

bad
baad
baaad
baaaad

3. This from the docs

‘\=’
     matches the empty string, but only at point.

baffles me. I've had a hard look for any examples of how it may be used
and found nothing. I feel I may be missing something extremely useful, I
just don't know what!

thanks

jan

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29 built on CIRROCUMULUS
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor 'Microsoft Corp.', version 6.1.7601
Recent messages:
Loading desktop...done
Warning: desktop file appears to be in use by PID 4740.
Using it may cause conflicts.  Use it anyway? (y or n) n
Desktop file in use; not loaded.
For information about GNU Emacs and the GNU system, type C-h C-a.
Mark saved where search started
Mark set
Quit
Mark saved where search started

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Text

Minor modes in effect:
  desktop-save-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: (only . t)

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils browse-url url-util thingatpt misearch
multi-isearch elec-pair edmacro kmacro desktop frameset cus-start
cus-load finder-inf info package easymenu epg-config url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads w32notify w32 lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 132611 9138)
 (symbols 48 23577 1)
 (miscs 40 56 151)
 (strings 32 41277 1782)
 (string-bytes 1 1117275)
 (vectors 16 18093)
 (vector-slots 8 539691 7632)
 (floats 8 60 91)
 (intervals 56 259 5)
 (buffers 992 12))