all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 36423@debbugs.gnu.org
Subject: bug#36423: 27.0.50; electric-pair-mode not working properly depending of file content.
Date: Wed, 3 Jul 2019 21:32:00 +0200	[thread overview]
Message-ID: <20190703193200.awabu3ell7vsrcpj@Ergus> (raw)
In-Reply-To: <20190702133641.GA30699@ACM>

[-- Attachment #1: Type: text/plain, Size: 2402 bytes --]

Hi Alan:

Sorry for the bother again. After the fix you did, the "" issue is
better, but now there are new issues with the {} when I use pragmas for
example.

I attached you a picture (because this is the easier way to explain it)

As you can see it does not recognize the pairs correctly in one
case. And in the other it does not recognize the () at all. (Maybe the
second is not exactly the same issue) 

The main problem is that because of this the automatic indentation is
affected.

An interesting thing is that in the line 136 out(vout[0; size]) it works
correctly. Maybe it has to do with the \ in the pragmas?

Thanks for the previous patch and in advance for the next ;)
Ergus


On Tue, Jul 02, 2019 at 01:36:41PM +0000, Alan Mackenzie wrote:
>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).

[-- Attachment #2: Screenshot_2019-07-03_21-14-59.png --]
[-- Type: image/png, Size: 25173 bytes --]

[-- Attachment #3: Screenshot_2019-07-03_21-22-52.png --]
[-- Type: image/png, Size: 20684 bytes --]

  reply	other threads:[~2019-07-03 19:32 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
2019-07-03 19:32   ` Ergus [this message]
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=20190703193200.awabu3ell7vsrcpj@Ergus \
    --to=spacibba@aol.com \
    --cc=36423@debbugs.gnu.org \
    --cc=acm@muc.de \
    /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.