From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#36423: 27.0.50; electric-pair-mode not working properly depending of file content. Date: Tue, 2 Jul 2019 13:36:41 +0000 Message-ID: <20190702133641.GA30699@ACM> References: <20190628190131.w7ajdhaqqnmebewc@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="201285"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: 36423@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 02 15:37:18 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hiIyD-000q1r-JV for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jul 2019 15:37:17 +0200 Original-Received: from localhost ([::1]:53762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiIy5-0004xT-C5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jul 2019 09:37:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34801) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiIxz-0004x8-Gs for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 09:37:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiIxy-0002oN-Hs for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 09:37:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37850) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hiIxy-0002oC-Df for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 09:37:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hiIxy-0005ID-25 for bug-gnu-emacs@gnu.org; Tue, 02 Jul 2019 09:37:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 02 Jul 2019 13:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36423 X-GNU-PR-Package: emacs Original-Received: via spool by 36423-submit@debbugs.gnu.org id=B36423.156207461220330 (code B ref 36423); Tue, 02 Jul 2019 13:37:01 +0000 Original-Received: (at 36423) by debbugs.gnu.org; 2 Jul 2019 13:36:52 +0000 Original-Received: from localhost ([127.0.0.1]:46671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hiIxo-0005Hp-87 for submit@debbugs.gnu.org; Tue, 02 Jul 2019 09:36:52 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:64588 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1hiIxm-0005Hg-5q for 36423@debbugs.gnu.org; Tue, 02 Jul 2019 09:36:50 -0400 Original-Received: (qmail 46769 invoked by uid 3782); 2 Jul 2019 13:36:43 -0000 Original-Received: from acm.muc.de (p4FE15D94.dip0.t-ipconnect.de [79.225.93.148]) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 02 Jul 2019 15:36:41 +0200 Original-Received: (qmail 30770 invoked by uid 1000); 2 Jul 2019 13:36:41 -0000 Content-Disposition: inline In-Reply-To: <20190628190131.w7ajdhaqqnmebewc@Ergus> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:161957 Archived-At: Hello, Ergus. On Fri, Jun 28, 2019 at 21:01:31 +0200, Ergus wrote: > In electric-pair-mode there are some files where inserting one " does > not insert the pair ". But on the other hand when I try to insert a > second " it inserts a pair for it so it ends with """. > It does not happen when the file is empty but for me it happens with > this file content. > --------------------------------------- > #ifndef _SparseMatrix_functions_hpp_ > #define _SparseMatrix_functions_hpp_ > #endif > --------------------------------------- I've just committed a fix to master which fixes some of the problem. (For the rest of the problem, see bug #36474.) > The behavior changes sometimes inserting a new line instead of the first > ", or just not inserting any pair at all. This looks like an issue in a > backward search for a pair or something. Because it changes if withing > the define region or not. Yes. > When a region is active there is not issue and the quotes are inserted > in pairs around the region as expected. Also yes. > This was reproduced with: > emacs -Q file.hpp > M-x electric-pair-modes > In GNU Emacs 27.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.9) > of 2019-06-28 built on Ergus > Repository revision: cb182ce6f8d2fa6e1509252fecc2b0e504e36d63 > Repository branch: master > System Description: Arch Linux Thanks for taking the trouble to report this. It should be somewhat better, now. Just a small point: it would have been helpful if you'd mentioned C++ Mode in the Subject: (or even explicitly in the message). -- Alan Mackenzie (Nuremberg, Germany).