GNU bug report logs - #29343
Match data doesn't contain elements for trailing non-matched subgroups

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Fri, 17 Nov 2017 20:12:01 UTC

Severity: minor

Found in version 27.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 29343 <at> debbugs.gnu.org
Subject: bug#29343: 27.0.50; Match data doesn't contain elements for non-matched subgroups
Date: Fri, 19 Apr 2019 14:54:01 -0400
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

>> >> You can get that result by passing a list of the expected length as the
>> >> REUSE argument to match-data:
>> >
>> > True, but that also requires knowing the expected length. In the most
>> > general case this should work for unknown regular expressions.

> The context here is https://github.com/magnars/s.el/pull/117.

Ah, I see, the problem is that s-match is trying to present a "nicer"
interface, so it doesn't have a REUSE argument.

> That Emacs doesn't behave this way is surprising and should at least
> be documented.

Yeah, no argument there.





This bug report was last modified 3 years and 117 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.