From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Branham Newsgroups: gmane.emacs.bugs Subject: bug#31155: 26.1; electric-pair-mode sometimes inserts extra ) in process buffers Date: Thu, 26 Apr 2018 11:08:38 -0500 Message-ID: <8736zilzll.fsf@gmail.com> References: <87a7u5o5ux.fsf@gmail.com> <87d0z1jxt6.fsf@gmail.com> <878t9po5c8.fsf@gmail.com> <871sfct2x4.fsf@gmail.com> <87a7tu9ec4.fsf@gmail.com> <877eoxse1o.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524759405 29737 195.159.176.226 (26 Apr 2018 16:16:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2018 16:16:45 +0000 (UTC) User-Agent: mu4e 1.0; emacs 26.1 Cc: 31155@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 26 18:16:40 2018 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 1fBjZW-0007ZY-8M for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Apr 2018 18:16:38 +0200 Original-Received: from localhost ([::1]:43277 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBjbc-0002MM-VY for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Apr 2018 12:18:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBjSD-0002l0-Vt for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBjSA-0002Tb-PE for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:09:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBjSA-0002TN-Ja for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fBjSA-0002WN-Dt for bug-gnu-emacs@gnu.org; Thu, 26 Apr 2018 12:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Branham Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Apr 2018 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31155 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 31155-submit@debbugs.gnu.org id=B31155.15247589319676 (code B ref 31155); Thu, 26 Apr 2018 16:09:02 +0000 Original-Received: (at 31155) by debbugs.gnu.org; 26 Apr 2018 16:08:51 +0000 Original-Received: from localhost ([127.0.0.1]:40674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBjRz-0002Vy-HM for submit@debbugs.gnu.org; Thu, 26 Apr 2018 12:08:51 -0400 Original-Received: from mail-oi0-f46.google.com ([209.85.218.46]:33020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fBjRv-0002Vk-7L for 31155@debbugs.gnu.org; Thu, 26 Apr 2018 12:08:49 -0400 Original-Received: by mail-oi0-f46.google.com with SMTP id 126-v6so24619332oig.0 for <31155@debbugs.gnu.org>; Thu, 26 Apr 2018 09:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=RqoZd6aZCpqK2f/Lx9HmeXRc6TEYsmxYdEfQYcKXIEU=; b=akG6daSN0E3A1NmpljpOBRXzNpN5xVP/lqisl+YINjcs9cFVZgpicUBUr0cDiGfGML Hb5EhR8W79RsU2RodncG947v+jdsz6OOzMDPV8wZmAknbnC0ALUYF5uuaQ6mRtTQz+lj 2zTO2tZ3mVTRpzMjqz8vnf7+7ATUo9kNYsacpFnogLMr+ENpkUPCwSYiBezPhkbIOg7o 4QLlr9ehBwTLpgbn5GRd2RwhSbegS6ikRygafmzEkfvXI+CgIu/jThvC/IG4o3vITL7g kroky4IYhFYJsr5Bju2MTLALQcwXuQpczco4MtIYJbfA07EVIdCNyCIBknm6aivnvVSl B+wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=RqoZd6aZCpqK2f/Lx9HmeXRc6TEYsmxYdEfQYcKXIEU=; b=RotDg/A/+uHspibkk+f+uwayjHqXO2IAxnw/88EsRQzUBWWiBF5fZ7y2jS11xRy24l Zd5jEqtWL75sm5FOQFe9mcXzy3waAThMf5o/+Nxjh/8hzVyGUI3unFp8EhjovnTeiGE/ VgHX4RV8mG8PUryBtZcgFDBGl+6p1PnPlmTGvJkgUwztTzr1UJ9AFuLd1XmtZfmar9vm HY8EMWY3Tf8cKvD5ELwq84E99rwTzlWBIPz1xfWrE4+MNT9vYHSTwqB1Qo+n/r7Na5Ok Xi/Rj8aR9xFuKNCh91BudyCL0pfpRiCcKSdmVscBjcHc3uOFYcZLJogPMOYm7c9AIFje XWTQ== X-Gm-Message-State: ALQs6tBZ5nX0cUqy8+YK7lrZ9HPIZI6iAcCQz+4X6Z+FM6p1FUElNNV9 JXFtuq4ZX2GlflKSn2AELra/Un5+ X-Google-Smtp-Source: AB8JxZq6qFByKspV2CSZ1xmSYTW0gM5Nei/Q23bm36CHeTwGswtSlxQPoJB11eXlVoKAYksXcQoLxw== X-Received: by 2002:aca:5603:: with SMTP id k3-v6mr7847638oib.77.1524758921445; Thu, 26 Apr 2018 09:08:41 -0700 (PDT) Original-Received: from earth (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id e68-v6sm11820254oih.16.2018.04.26.09.08.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Apr 2018 09:08:40 -0700 (PDT) In-reply-to: <877eoxse1o.fsf@gmail.com> 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:145767 Archived-At: On Mon 23 Apr 2018 at 18:23, Noam Postavsky wrote: > Alex Branham writes: > >> Sorry for taking so long to respond, it is difficult to capture this >> happening. > > No worries, it takes as long as it takes. > >> 1 -> (electric-pair-syntax-info 91) >> 1 <- electric-pair-syntax-info: (40 93 nil 79153) >> ====================================================================== >> 1 -> (electric-pair--balance-info 1 79153) >> 1 <- electric-pair--balance-info: ((nil . 93) nil . 93) > >> This happened when I typed (in an inferior R buffer): >> >> Rhats[[ > > Ah, this is a slightly different scenario than I thought, we're missing > close brackets, rather than inserting too many. The > electric-pair--balance-info seems to be saying that you're inside a > string or comment. Was that the case? Or was there a stray quote in > the buffer? Sorry, I wasn't clear. This was slightly different behavior than what I previously reported, though I assume it's related. I was not inside a string or comment, and there could have been a stray quote in the buffer. I'm not sure though as I didn't save it (will do in the future!). > Anyway, I think tracing a few more functions will be helpful: > > (dolist (fun '(electric-pair--balance-info > electric-pair-skip-if-helps-balance > electric-pair-inhibit-if-helps-balance > electric-pair-syntax-info > electric-pair-default-inhibit > electric-pair-default-skip-self > electric-pair-post-self-insert-function)) > (trace-function-background fun)) I'll do that next time I stumble into this.