GNU bug report logs - #23949
25.0.95; Regression in handling error caused by (string-match-p "." nil)

Previous Next

Package: emacs;

Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>

Date: Mon, 11 Jul 2016 20:13:02 UTC

Severity: normal

Tags: fixed

Merged with 16294, 24166

Found in versions 25.0.95, 24.3.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Kaushal Modi <kaushal.modi <at> gmail.com>
Cc: schwab <at> suse.de, Eli Zaretskii <eliz <at> gnu.org>, 23949 <at> debbugs.gnu.org
Subject: bug#23949: 25.0.95; Regression in handling error caused by (string-match-p "." nil)
Date: Wed, 13 Jul 2016 09:59:33 -0400
>> That's a general problem with the use dynamic binding to pass extra
>> parameters: you end up passing them not just to that one function but
>> also to all other functions called from that one.
> So what is the way forward?

I think it's a fairly fundamental problem that's hard/impossible to "fix".

> Fixing just string-match-p and string-match does not seem to the complete
> solution, because I have seen just let-bound dynamic vars at many places.

A way to fix *some* of the problems is to use concurrency (not yet in
"master"), and make the debugger run in another thread so it's not
affected by the dynamic bindings of the code that signaled the error.

For the more general problem, the only "fix" is to try and remove those
uses of dynamic bindings and replace them with something else, which
seems like a very large undertaking and whose benefits are not
necessarily that clear (the problem being to decide what that "something
else" should be, and the fact that this "something else" will come with
its own problems).

In the case of string-match-p I think we should get rid of
inhibit-changing-match-data and implement string-match-p (and
looking-at-p) some other way.


        Stefan




This bug report was last modified 8 years and 167 days ago.

Previous Next


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