From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#29343: 27.0.50; Match data doesn't contain elements for non-matched subgroups Date: Fri, 17 Nov 2017 21:11:13 +0100 Message-ID: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1510949533 10431 195.159.176.226 (17 Nov 2017 20:12:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Nov 2017 20:12:13 +0000 (UTC) To: 29343@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 17 21:12:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFmzd-0002ET-Iw for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Nov 2017 21:12:05 +0100 Original-Received: from localhost ([::1]:47665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFmzk-0003g7-Gm for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Nov 2017 15:12:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFmzb-0003el-SL for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 15:12:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFmza-0003vR-HX for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 15:12:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36642) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFmza-0003vF-Cf for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 15:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eFmza-0001uu-4G for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 15:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Nov 2017 20:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 29343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15109494877324 (code B ref -1); Fri, 17 Nov 2017 20:12:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Nov 2017 20:11:27 +0000 Original-Received: from localhost ([127.0.0.1]:45323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFmz0-0001u3-TY for submit@debbugs.gnu.org; Fri, 17 Nov 2017 15:11:27 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFmyz-0001tq-QF for submit@debbugs.gnu.org; Fri, 17 Nov 2017 15:11:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFmyt-0003Ld-Cw for submit@debbugs.gnu.org; Fri, 17 Nov 2017 15:11:20 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:33554) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eFmyt-0003LX-8a for submit@debbugs.gnu.org; Fri, 17 Nov 2017 15:11:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFmyr-0003Af-Um for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 15:11:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFmyq-0003J2-Qh for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 15:11:17 -0500 Original-Received: from mail-wr0-x22c.google.com ([2a00:1450:400c:c0c::22c]:37678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFmyq-0003Hl-IN for bug-gnu-emacs@gnu.org; Fri, 17 Nov 2017 15:11:16 -0500 Original-Received: by mail-wr0-x22c.google.com with SMTP id k61so3063787wrc.4 for ; Fri, 17 Nov 2017 12:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=74NrpUz4gCwja7UUGMNtKXnJ2m5KLHJJT8qQSUCf+4Y=; b=J+2KVgmm2w9ucICQH6HaA2aXGdKNoEmVi4JCdJCVPaA7d3EUlstP0nWTun2LCZJIc0 szVyFMq2K2bxRoDegzufWTd3wjZtrIyddSi9eeGr96XqWRFPNClSkDBFzEzEKknIrTde xWb/3zE4GrU8oGzKtOMIV4RGNUvfS5Vnu/ZB7h7418UUcra8j38IZF5YSzQt42SSpF7W /aj0QRudXldlgjYnWngcSc6lN3Zy2tq1+R7sfwWwq/TtVDBw6uu44boXq52HPWTJX7vu tfjD6u+R7/9lIVROmYKychVCRmAPQ6fLLuZWWtbKa3h3inidh37RDVT7kZ3qMFaclBo+ 1jBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=74NrpUz4gCwja7UUGMNtKXnJ2m5KLHJJT8qQSUCf+4Y=; b=H9c/u5VimtG5MZk3VFdHvEV+yeGrAYFsHQzHFEKVRcJNTVIBGLisidqZpOPfZNdv8T Bu+rTqHWmhvz50r8Jrhql7gb2sIYh1r6FwAiTttmGx+090tHXrZkHuLHgWjNkv8ntqfS 4N3FbzmA0hr1DCuCoH6PHiVk3/61af/z2RXJYSL74ZfA/DkmPs3A5DGCbXReZFCk2Vzv xGSUhGlav6UOZFAsW5aghF1yzJsJ03lxjmd12VY9YjZfHtSr3VdVJEln4qKDsSuaRz71 +4TEpJPbqepktLwBrXX8NnvJ1SeuMRmimYnJ2dzPBxGDhPoyJk9ZV+UDAt+4/RrcbXAZ flAg== X-Gm-Message-State: AJaThX4eAZ8tc7SIJTOUlJDa94nL7vFbsxAPg1lM5/tSC1KTqhi4p6KL TOJNw0u7d7xjKjqSRjBT8GaxIJm6 X-Google-Smtp-Source: AGs4zMYmVAB15nNBCrpXlh5s3Cc1SMfmM9AD2H24qilD/LSC5iQGdwijL2XvEEmBEPlNWKntJpqZTg== X-Received: by 10.223.165.67 with SMTP id j3mr5677086wrb.181.1510949475037; Fri, 17 Nov 2017 12:11:15 -0800 (PST) Original-Received: from a.muc.corp.google.com ([2a00:79e0:15:4:bfda:710c:4a38:a674]) by smtp.gmail.com with ESMTPSA id p42sm6918884wrb.28.2017.11.17.12.11.14 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 17 Nov 2017 12:11:14 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140027 Archived-At: $ emacs -Q -batch -eval '(progn (string-match "^\\(a\\)?\\(b\\)\\(c\\)?$" "= b") (print (match-data)))' (0 1 nil nil 0 1) Note that neither the `a` nor the `c` group matched, but there are entries for `a` in `match-data`, but not for `c`. This makes working with the match data unnecessarily hard because its length depends on whether certain optional groups have matched or not. I haven't seen any discussion about this behavior in either the manual or the docstring. I think the match data in this case should be (0 1 nil nil 0 1 nil nil). In GNU Emacs 27.0.50 (build 12, x86_64-pc-linux-gnu, GTK+ Version 3.22.17) of 2017-11-16 built on localhost Repository revision: bc462efec89c3317a6ee3ef9404356c1c7e52bda Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 System Description: Debian GNU/Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --enable-gcc-warnings=3Dwarn-only --enable-gtk-deprecation-warnings --without-pop --with-mailutils --enable-checking --enable-check-lisp-object-type --with-modules 'CFLAGS=3D-O0 -ggdb3'' Configured features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config 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 elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 95129 7264) (symbols 48 20393 1) (miscs 40 41 120) (strings 32 28284 1631) (string-bytes 1 747257) (vectors 16 14056) (vector-slots 8 497402 8748) (floats 8 49 68) (intervals 56 224 0) (buffers 992 12)) --=20 Google Germany GmbH Erika-Mann-Stra=C3=9Fe 33 80636 M=C3=BCnchen Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Gesch=C3=A4ftsf=C3=BChrer: Paul Manicle, Halimah DeLaine Prado If you received this communication by mistake, please don=E2=80=99t forward= it to anyone else (it may contain confidential or privileged information), please erase all copies of it, including all attachments, and please let the sender know it went to the wrong person. Thanks.