all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Ergus <spacibba@aol.com>
Cc: 36423@debbugs.gnu.org
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	[thread overview]
Message-ID: <20190702133641.GA30699@ACM> (raw)
In-Reply-To: <20190628190131.w7ajdhaqqnmebewc@Ergus>

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).





  reply	other threads:[~2019-07-02 13:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 19:01 bug#36423: 27.0.50; electric-pair-mode not working properly depending of file content Ergus
2019-07-02 13:36 ` Alan Mackenzie [this message]
2019-07-03 19:32   ` Ergus
2019-07-04 14:14     ` Alan Mackenzie
2019-07-08  9:48     ` Alan Mackenzie
2019-07-08 10:29       ` Alan Mackenzie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190702133641.GA30699@ACM \
    --to=acm@muc.de \
    --cc=36423@debbugs.gnu.org \
    --cc=spacibba@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.