From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kaushal Modi Newsgroups: gmane.emacs.bugs Subject: bug#23949: 25.0.95; Regression in handling error caused by (string-match-p "." nil) Date: Wed, 13 Jul 2016 13:10:46 +0000 Message-ID: References: <83lh17ati6.fsf@gnu.org> <83h9bvarb6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113d3806b1f71c0537841d14 X-Trace: ger.gmane.org 1468416792 25393 80.91.229.3 (13 Jul 2016 13:33:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Jul 2016 13:33:12 +0000 (UTC) Cc: schwab@suse.de, 23949@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 13 15:33:05 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNKHd-0007cy-HI for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jul 2016 15:33:01 +0200 Original-Received: from localhost ([::1]:47532 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNKHc-0007hk-M0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 13 Jul 2016 09:33:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49213) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNJxP-00070E-6j for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2016 09:12:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNJxK-0008N5-EB for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2016 09:12:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNJxK-0008N1-AR for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2016 09:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bNJxK-00013G-5z for bug-gnu-emacs@gnu.org; Wed, 13 Jul 2016 09:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Kaushal Modi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 13 Jul 2016 13:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23949 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23949-submit@debbugs.gnu.org id=B23949.14684154723983 (code B ref 23949); Wed, 13 Jul 2016 13:12:02 +0000 Original-Received: (at 23949) by debbugs.gnu.org; 13 Jul 2016 13:11:12 +0000 Original-Received: from localhost ([127.0.0.1]:49195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNJwS-000128-3L for submit@debbugs.gnu.org; Wed, 13 Jul 2016 09:11:12 -0400 Original-Received: from mail-oi0-f50.google.com ([209.85.218.50]:34873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNJwM-00011a-NJ for 23949@debbugs.gnu.org; Wed, 13 Jul 2016 09:11:06 -0400 Original-Received: by mail-oi0-f50.google.com with SMTP id r2so68890627oih.2 for <23949@debbugs.gnu.org>; Wed, 13 Jul 2016 06:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Vbw0lqejJ5HjPsMmQhXkiPQT3HwnZ3I1aQuG4bpgxmA=; b=sbiO87WA8yK2JiA2iaZB6TlmWUZacBUOBXGlWAwxTLRyVRY/PgStUnUQ/3Gy/SuUGy +C8eRpfZzFaZIXVqiL2mYsk+KlQxquln/G4Dd4oHB/bTsY9kb5vuVuIIODxpEhnUd5hH 88gfbtIdXDiV5Mf0/+w2jXKIzs2dsCsOIRSKmGHbHBsgFTe06zMo20jOpwfwr+SIazIm 0A3BOm7xxjqIGoUnfQ2qfBaudy70bfX5U6BlCznuT0lTLo2pYebclX9Bs4O0HAsYmJ7g bcgKyO1KYbVgjf2vtJpiKzQohBuiZV4bdajP/ixbjn+2Sm3CqMScJUH3tLN16Vf6BS0E 7XYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Vbw0lqejJ5HjPsMmQhXkiPQT3HwnZ3I1aQuG4bpgxmA=; b=iQ0z4jayg/iS8pQx3rJ+Gzed2Cl43fAucETn1SpYmEpPTT0turqf3Dia0oHaHmSVA3 J0anx4c8faQfocL92QkWdvFnOa/fT4qgpm6Q/UnIY2xlIqJ3xWBe947KTbOq815Ph2x7 E5N/RGCmGZv7y1dZAsdD/Dv+ZXgsK1+ReZr8DbYuo3VqyWH7gZQfDPe2RoENF2mtwz9i 51RonxnBitoFQ9VH9TaXnwdlujV4Lxsah0VNuXKjtaGJVg0/vDL6UK7xDKrjUZcXEwlA hS2SyWHJX4YEGSxAV522H1anz3LYuF4W0HIhc19cx8iM9ypQwtU3kSZ6xvgxH5gY/7k1 +SbA== X-Gm-Message-State: ALyK8tKeKXq3rXAOZUA50VCpTikyKO67UyqgUUcCFAIqBz9S07bKFJaw0vcy1FM0sOxB+7CvSm6Vu+rXRUI6lw== X-Received: by 10.202.234.5 with SMTP id i5mr1321837oih.98.1468415456964; Wed, 13 Jul 2016 06:10:56 -0700 (PDT) In-Reply-To: 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:120987 Archived-At: --001a113d3806b1f71c0537841d14 Content-Type: text/plain; charset=UTF-8 On Tue, Jul 12, 2016 at 4:27 PM Stefan Monnier wrote: > Clearly, the problem is that string-match-p uses > "(let ((inhibit-changing-match-data t))", so the debugger is run with > inhibit-changing-match-data bound to t and that breaks lots of > Elisp code. > > 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. > Thanks Stefan. So what is the way forward? 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. As I posted in the emacs-devel thread ( https://lists.gnu.org/archive/html/emacs-devel/2016-07/msg00544.html ), while this string-match-p issue causes a confusing seemingly unrelated error, some other packages cause emacs to freeze up (check the drag-stuff example in the above link). When I get a change I will add a minimum working example for the drag-stuff package causing emacs freeze too. Certainly there was a lower level change after emacs 24.5 that changed the behavior of how the run-hooks behave or how the advices are executed in general or when called within a debugger? -- Kaushal Modi --001a113d3806b1f71c0537841d14 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
On Tue, Jul 12= , 2016 at 4:27 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote:
Clearly, the problem is that string-match-p uses
"(let ((inhibit-changing-match-data t))", so the debugger is run = with
inhibit-changing-match-data bound to t and that breaks lots of
Elisp code.

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.

=
Thanks Stefan.

So what is the way forwa= rd?

Fixing just string-match-p and string-match do= es not seem to the complete solution, because I have seen just let-bound dy= namic vars at many places.

As I posted in the emac= s-devel thread (=C2=A0https://lists.gnu.org/archive/html/emacs-devel/= 2016-07/msg00544.html=C2=A0), while this string-match-p issue causes a = confusing seemingly unrelated error, some other packages cause emacs to fre= eze up (check the drag-stuff example in the above link). When I get a chang= e I will add a minimum working example for the drag-stuff package causing e= macs freeze too.

Certainly there was a lower level= change after emacs 24.5 that changed the behavior of how the run-hooks beh= ave or how the advices are executed in general or when called within a debu= gger?=C2=A0
--

Kaushal Modi

--001a113d3806b1f71c0537841d14--