GNU bug report logs - #36423
27.0.50; electric-pair-mode not working properly depending of file content.

Previous Next

Package: emacs;

Reported by: Ergus <spacibba <at> aol.com>

Date: Fri, 28 Jun 2019 19:03:02 UTC

Severity: normal

Found in version 27.0.50

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 36423 <at> debbugs.gnu.org (full text, mbox):

From: Alan Mackenzie <acm <at> muc.de>
To: Ergus <spacibba <at> aol.com>
Cc: 36423 <at> debbugs.gnu.org
Subject: Re: bug#36423: 27.0.50; electric-pair-mode not working properly
 depending of file content.
Date: Tue, 2 Jul 2019 13:36:41 +0000
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).




This bug report was last modified 5 years and 319 days ago.

Previous Next


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