From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#36006: electric-pair-mode fails to balance in certain cases Date: Thu, 06 Jun 2019 19:39:57 -0400 Message-ID: <87d0jq2she.fsf@gmail.com> References: <87woi80yfw.fsf@gmail.com> <85blzjdeu0.fsf@gmail.com> <8736kvd30p.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="10837"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) Cc: 36006@debbugs.gnu.org To: Dario Gjorgjevski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 07 01:41:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.47]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hZ20N-0002iO-SW for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Jun 2019 01:41:11 +0200 Original-Received: from localhost ([::1]:45018 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZ20M-0000Yw-9w for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Jun 2019 19:41:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47316) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hZ20F-0000Yd-Qc for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 19:41:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hZ20E-00070f-V8 for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 19:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37264) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hZ20E-00070S-MT for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 19:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hZ20E-0004mx-IO for bug-gnu-emacs@gnu.org; Thu, 06 Jun 2019 19:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Jun 2019 23:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36006 X-GNU-PR-Package: emacs Original-Received: via spool by 36006-submit@debbugs.gnu.org id=B36006.155986440618333 (code B ref 36006); Thu, 06 Jun 2019 23:41:02 +0000 Original-Received: (at 36006) by debbugs.gnu.org; 6 Jun 2019 23:40:06 +0000 Original-Received: from localhost ([127.0.0.1]:50808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZ1zJ-0004lY-Uf for submit@debbugs.gnu.org; Thu, 06 Jun 2019 19:40:06 -0400 Original-Received: from mail-io1-f41.google.com ([209.85.166.41]:35981) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hZ1zI-0004kt-Gz; Thu, 06 Jun 2019 19:40:05 -0400 Original-Received: by mail-io1-f41.google.com with SMTP id h6so29375ioh.3; Thu, 06 Jun 2019 16:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=F6WKbFnq6ztmnwNmHYbI+gT82gW4kQpTodrm0blts2E=; b=V2mZ5IBwmZ5kd40p0/qmiUhWfHevHNofxymsa/HjDM5J5EQtvG8V2RMXsV82bViN0t jUl3nRblBVMA50KInjY8YbZMRbuGU27aT3MQhGUaSgTGHD8P75511IarpgkZhZeUOQQ2 Tme4Np7/dR76FZ9iBDNoXXVNzMklIWy+aOVjOQouweKRKPWSSc6HRWn+6eSYBVGwJgf0 OdzVUKRqHKKt5IvAbLCaT41GQaovf9Du2lmw7zbrkpTeGiz+XcCCRRmwGq+QWCCL5MhF YRU3FiKzwXfk5S5hv0AkPxKIHlxuWcloQssGUPV/cxQ1TZjpfIZ8dKuI4p5slcWcXmae ixbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=F6WKbFnq6ztmnwNmHYbI+gT82gW4kQpTodrm0blts2E=; b=mxUMlOJh1G0V0DBAS77UwWSebYAwCBRQm2nRAG+LY9u9uEtj8lcMysnaaJaYx/lhhg u5C7oiLg6zBsIh1rcKAwW+huLkxilCqwuncTaOXpFTJd57n09TCx0kWgQIF30PNSfpnM ljakNsnPToV0okT6+GXyRu1KWlo6Y3rHKXDUcqd7eZOiArWBcZIHsaxtee2B+VOh8DqG N/3EzNZEzmrziPhcjQ7gOcEIv5yI2ZTysEe1VchOJU5P4Nq2L7qI6jSJ960wT1u3g7i8 ybn7w+VVkm9F3gJfgdGxSKpG/Eg+/Sz2xkqy8soTrfxg7gFHjwOq+rG2qpMPL1btBySX x0FA== X-Gm-Message-State: APjAAAVYfvknYxomAuSpKtXJtZN+5nnhg7zelxDxkAySrOUcywGkg/hG G0y2kLKoB+sw0P92TJf9aiUBdDp4 X-Google-Smtp-Source: APXvYqxOSk9F0cT9DcDiXKsbiDAunPtxyBV0XVzyHtrBZx6L2BIxd7MdDQ7Al1i2GZAWJAgta6qfbg== X-Received: by 2002:a6b:6b14:: with SMTP id g20mr29806956ioc.28.1559864398705; Thu, 06 Jun 2019 16:39:58 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id a1sm132864ioo.5.2019.06.06.16.39.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Jun 2019 16:39:58 -0700 (PDT) In-Reply-To: <8736kvd30p.fsf@gmail.com> (Dario Gjorgjevski's message of "Thu, 30 May 2019 23:51:50 +0200") 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: 209.51.188.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:160198 Archived-At: found 36006 27.0.50 tags 36006 + confirmed quit Dario Gjorgjevski writes: >> I'm having trouble reproducing this; what's the exact sequence of input >> starting from 'emacs -Q'? > > Run 'emacs -Q'; it opens up with the *scratch* buffer. Now: > > 1. M-x electric-pair-mode > 2. M-x html-mode > 3.
Ah, got it now, I think I was inserting before starting html-mode before. > From my debugging, the culprit seems to be an unnecessary (or mistaken?) > use of electric-pair--with-uncached-syntax. I am not sure *why* exactly > it happens, and would appreciate further insight. It doesn't happen in emacs-26, which has the same electric-pair--with-uncached-syntax call, so it's not just that alone. I suspect this could be related to the recent changes to mark ">" outside of tags with punctuation syntax (technically, a > b is valid, only "<" needs to be escaped as <). This is kind of a pain to debug, when I stepped with edebug, it worked, I think because stepping gives time for syntax-propertize to run.